Re: Some way of telling which block devices are in use (and how)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux