On Sun, Apr 29, 2012 at 06:05:12PM -0400, Ted Ts'o wrote: > I've been looking more closely at this, and I think we can make things > better by having the file system create a symlink from partition's > holders directory to the file system's kobject (assuming the file > system has a kobject, which most do not have). i.e., I'd add to > ext4_fill_super() something like this: > > ret = add_symlink(bdev->bd_part->holder_dir, &ext4_kset->kobj); But, as you point out, not all filesystems have /sys/fs/ entries. In fact, the large majority do not. And why would you be doing this at a fs-specific level? If you want to know what type of filesystem is mounted on each block device, yes, that would matter, but you don't. You want to know what is "busy", right? And "busy" means different things, including the fact that the whole block device underneath can disappear at any moment no matter how much it isn't nice that this happens. So a combination of 'lsof' and other things might just be the best that we can do, like GNOME and KDE are doing today. As you point out the mount namespace issue, it gets really tricky to try to figure it all out, so maybe we really don't want to? thanks, greg k-h -- 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