Re: [PATCH 02/52] introduced guards for mount_lock

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

 



Al Viro <viro@xxxxxxxxxxxxxxxxxx>:
> When the last reference to
> mount past the umount_tree() (i.e. already with NULL ->mnt_ns) goes away, anything
> subtree stuck to it will be detached from it and have its root unhashed and dropped.
> In other words, such tree (e.g. result of umount -l) decays from root to leaves -
> once all references to root are gone, it's cut off and all pieces are left
> to decay.  That is done with mount_writer (has to be - there are mount hash changes
> and for those mount_writer is a hard requirement) and only after the final reference
> to root has been dropped.

I'm unable to understand this.

As well as I understand your text, when you unmount some directory /a using "umount -l /a", then /a and
all its children will stay as long as there are references to /a . This contradicts to reality.

Consider this:

# mount -t tmpfs tmpfs /a
# mkdir /a/b
# mount -t tmpfs tmpfs /a/b
# mkdir /a/b/c
# cd /a
# umount -l /a

According to your text, both /a and /a/b will stay, because we have reference to /a (via our cwd).

But in reality /a/b disappears immidiately (i. e. "ls b" shows nothing, as opposed to "c").

This happens even if I test with your patches applied.

So, your explanation seems to be wrong.

-- 
Askar Safin




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

  Powered by Linux