Re: [RFC PATCH 1/2] vfs: add an interface to do some preparation for umount

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

 



On Thu, Mar 22, 2012 at 11:13:15AM +0800, Miao Xie wrote:
> Some file systems can do some works in the background by kthreads, we'd
> better stop those works before we umount the file system, or it is easy to
> introduce some problems. So we add an interface that is used to do some
> preparation for umount.

NAK.  First of all, fs might be in active use _after_ umount.  man 8 umount,
see umount -l there.  Moreover, the same superblock may very well be mounted
more than once, so umount of an individual mountpoint would better not do
anything nasty to users of other ones.

IOW, this is completely misguided - you are dealing with whatever problem it
is at least two layers above the right one.

1) vfsmount may be detached from mount trees but remain in active use.
2) there may be many vfsmounts over given struct super_block.

Doing things earlier than the final mntput() runs afoul of (1); doing
them before the final deactivate_locked_super() runs afoul of (2).

What the hell is that thread doing that needs ->s_umount for serialization
and why is it doing that?
--
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