Am 28.02.2014 14:29, schrieb Alexander Viro: > On Fri, Feb 28, 2014 at 01:12:58PM +0100, Donald Buczek wrote: > >> Obviously, "cleared mounted on dentry" is missing. >> >> It looks like we enter put_mountpoint() but don't get to >> dentry->d_flags &= ~DCACHE_MOUNTED; >> >> mp->m_count is not zero probably. >> >> What does it mean? The mount is still locked but not in the mount hash? > No, it means that something else is mounted on the same dentry (in another > part of mount tree, obviously). > > If you mount the same fs on two different mountpoints, e.g. > mount /dev/sda1 /mnt > mount /dev/sda1 /tmp/foo > you will have the same dentries seen in two places. Now, > mount /dev/sdb11 /mnt/a > mount /dev/sdc5 /tmp/foo/a > > and you've got two different filesystems mounted on two different places > (/mnt/a and /tmp/foo/a). These two places have different vfsmounts, > but the same dentry. struct mountpoint is associated with dentry, so > it's also the same for both. And it serves as a mountpoint for two > vfsmounts - one for fs from sdb11, another for fs from sdc5. > > Now umount /mnt/a; one of those two vfsmounts is gone now. struct mountpoint > survives, of course, and dentry is *still* a mountpoint. sdc5 is still > mounted on /tmp/foo/a, after all... Thanks. So I guess, the idea of "struct mountpoint" is to make the dentries smaller by not having the mount count embedded in each one, 99.9% not needing it? OMG, I've just found this in the log: > 91286 2014-02-26T14:09:56.830515+01:00 kasslerbraten kernel: > [195977.007799] pid 8644: d_set_mounted: dentry=ffff88004690c710 root > 91287 2014-02-26T14:09:56.830527+01:00 kasslerbraten kernel: > [195977.007802] pid 8644: d_set_mounted: set mounted on > dentry=ffff88004690c710 root > 91288 2014-02-26T14:09:56.830529+01:00 kasslerbraten kernel: > [195977.007873] pid 8644: put_mountpoint: mp=ffff8800b8aa1a38 > 91289 2014-02-26T14:09:56.830530+01:00 kasslerbraten kernel: > [195977.007877] pid 8644: d_set_mounted: dentry=ffff8800ca45e810 tmp > 91290 2014-02-26T14:09:56.830535+01:00 kasslerbraten kernel: > [195977.007878] pid 8644: d_set_mounted: set mounted on > dentry=ffff8800ca45e810 tmp > 91291 2014-02-26T14:09:56.830536+01:00 kasslerbraten kernel: > [195977.007881] pid 8644: put_mountpoint: mp=ffff8800b8aa1a38 > 91292 2014-02-26T14:09:56.830537+01:00 kasslerbraten kernel: > [195977.007900] pid 8644: d_set_mounted: dentry=ffff880046960450 > old-root-mjn70Q > 91293 2014-02-26T14:09:56.830538+01:00 kasslerbraten kernel: > [195977.007901] pid 8644: d_set_mounted: set mounted on > dentry=ffff880046960450 old-root-mjn70Q > 91294 2014-02-26T14:09:56.830539+01:00 kasslerbraten kernel: > [195977.007903] pid 8644: put_mountpoint: mp=ffff8800a5f1dbd0 > 91295 2014-02-26T14:09:56.830540+01:00 kasslerbraten kernel: > [195977.007904] pid 8644: put_mountpoint: cleared mounted on > dentry=ffff88004690c710 root > 91296 2014-02-26T14:09:56.830541+01:00 kasslerbraten kernel: > [195977.007905] pid 8644: put_mountpoint: mp=ffff8800a5f1da90 > 91297 2014-02-26T14:09:56.830541+01:00 kasslerbraten kernel: > [195977.007954] pid 8644: put_mountpoint: mp=0000014f00490049 > 91298 2014-02-26T14:09:56.830542+01:00 kasslerbraten kernel: > [195977.007955] pid 8644: put_mountpoint: mp=0000000000000006 > 91299 2014-02-26T14:09:56.830543+01:00 kasslerbraten kernel: > [195977.007961] pid 8644: put_mountpoint: mp=ffff8800a5f1dbd0 > 91300 2014-02-26T14:09:56.830544+01:00 kasslerbraten kernel: > [195977.007963] pid 8644: put_mountpoint: mp=ffff8800a6023d10 > 91301 2014-02-26T14:09:56.830544+01:00 kasslerbraten kernel: > [195977.007963] pid 8644: put_mountpoint: mp=ffff8800a6023d10 > 91302 2014-02-26T14:09:56.830545+01:00 kasslerbraten kernel: > [195977.007964] pid 8644: put_mountpoint: mp=ffff8800a5f1dbd0 What is this? Where does "root" and "old-root-" come from? Why does 8644 survive dereferencing mp=0000000000000006 from the kernel? Is this still related to autofs? D. -- Donald Buczek buczek@molgen.mpg.de Tel: +49 30 8413 1433