Red Hat Bugzilla – Bug 538536
find fails silently on a remount during traverse
Last modified: 2009-12-26 15:01:11 EST
+++ This bug was initially created as a clone of Bug #501848 +++
--- Additional comment from email@example.com on 2009-10-21 14:27:51 EDT ---
--- Additional comment from firstname.lastname@example.org on 2009-10-31 09:13:44 EDT ---
(In reply to comment #42)
> What event triggers the mount?
From my observation with gdb:
1. calling fstatat() with AT_SYMLINK_NOFOLLOW does NOT trigger the mount.
2. calling fstatat() without AT_SYMLINK_NOFOLLOW triggers the mount, opening a directory as well.
If you are asking which events are guaranteed to trigger the mount and/or which events are guaranteed to NOT trigger the mount, kernel guys might give you a reliable answer.
Jeff, any idea?
--- Additional comment from email@example.com on 2009-11-02 14:01:06 EDT ---
Submounts are triggered via the follow_link inode operation, so in some ways these are treated like symlinks...
The short answer is that the mount will be triggered whenever you walk a path in such a way that, if this component were a symlink it would be resolved to its target.
If the place where you transition into a new filesystem is in the middle of a path, then generally the path will be resolved. If it's the last component of the path, then it depends on whether the LOOKUP_FOLLOW link flag is set in nameidata in the kernel. That varies with the type of operation -- for instance, lstat() won't have that set, but a "normal" stat() generally will.
--- Additional comment from firstname.lastname@example.org on 2009-11-03 07:41:30 EDT ---
Minimal example which works reliably on my Fedora 11 installation:
# mount | grep ^/
/dev/sda1 on / type ext3 (rw)
/dev/sda3 on /home type ext4 (rw)
# ls -d /home/test
# printf "/ *(fsid=0,crossmnt)\n/home *(crossmnt)\n" \
# service nfs restart
# mkdir /tmp/mnt
# mount -t nfs4 localhost:/ /tmp/mnt \
&& stat --printf "%d\t%i\t%n\n" /tmp/mnt/home \
&& stat --printf "%d\t%i\t%n\n" /tmp/mnt/home/test \
&& stat --printf "%d\t%i\t%n\n" /tmp/mnt/home
29 2 /tmp/mnt/home
30 12 /tmp/mnt/home/test
30 2 /tmp/mnt/home
--- Additional comment from email@example.com on 2009-11-03 15:22:57 EDT ---
A patch for gnulib proposed upstream:
--- Additional comment from firstname.lastname@example.org on 2009-11-04 15:07:51 EDT ---
FYI, I've (re)raised the issue on LKML:
findutils-4.4.2-5.fc12 has been submitted as an update for Fedora 12.
findutils-4.4.2-5.fc12 has been pushed to the Fedora 12 testing repository. If problems still persist, please make note of it in this bug report.
If you want to test the update, you can install it with
su -c 'yum --enablerepo=updates-testing update findutils'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F12/FEDORA-2009-11813
findutils-4.4.2-6.fc12 has been pushed to the Fedora 12 stable repository. If problems still persist, please make note of it in this bug report.