It would be useful if there was a way to be able to determine, conclusively, whether a partciular block is in device, and how (i.e., whether some process has the block open, or it is mounted, or it is being used as part of a device mapper, or md setup, etc.). That way when users complain that trying to open a particular device in exclusive mode returns EBUSY, there's an easy way to figure out why this might be the case. The lsof program works for the first method, but it doesn't help for the other cases; and using /proc/mounts doesn't help if the block device is mounted in some other namespace; you could try to look at /proc/*/mounts for every single process, but that's exquisitely painful, and only works for block devices used by mounted file systems. So the question is, what's the best way of doing this? Adding a new flags field after the block device name in /proc/partitions would be the simplest, but that might break some userspace programs that aren't expecting it. There's the holders directory in sysfs, i.e., /sys/dev/block/8:5/holders/*, but that only seems to only record usage by device mapper. Should we extend the holders directory in the block device directory in sysfs? Add a new directory to record when a file system might be mounted? Add a new /proc file? What do folks think makes the most amount of sense? Al, Greg, do you have any opinions or suggestions? Thanks, - Ted -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html