Bug 538536 - find fails silently on a remount during traverse
find fails silently on a remount during traverse
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: findutils (Show other bugs)
12
All Linux
medium Severity medium
: ---
: ---
Assigned To: Kamil Dudka
Fedora Extras Quality Assurance
:
Depends On: 501848
Blocks:
  Show dependency treegraph
 
Reported: 2009-11-18 13:59 EST by Kamil Dudka
Modified: 2009-12-26 15:01 EST (History)
14 users (show)

See Also:
Fixed In Version: 4.4.2-6.fc12
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 501848
Environment:
Last Closed: 2009-12-26 15:01:11 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Kamil Dudka 2009-11-18 13:59:19 EST
+++ This bug was initially created as a clone of Bug #501848 +++

--- Additional comment from kdudka@redhat.com on 2009-10-21 14:27:51 EDT ---

Reported upstream:
http://lists.gnu.org/archive/html/bug-gnulib/2009-10/msg00207.html

--- Additional comment from kdudka@redhat.com 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 jlayton@redhat.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.

Longer answer:

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 kdudka@redhat.com 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
/home/test

# printf "/ *(fsid=0,crossmnt)\n/home *(crossmnt)\n" \
    > /etc/exports

# 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 kdudka@redhat.com on 2009-11-03 15:22:57 EDT ---

A patch for gnulib proposed upstream:

http://lists.gnu.org/archive/html/bug-gnulib/2009-11/msg00027.html

--- Additional comment from meyering@redhat.com on 2009-11-04 15:07:51 EDT ---

FYI, I've (re)raised the issue on LKML:

    http://lkml.org/lkml/2009/11/4/451
Comment 1 Fedora Update System 2009-11-18 14:01:31 EST
findutils-4.4.2-5.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/findutils-4.4.2-5.fc12
Comment 2 Fedora Update System 2009-11-20 00:29:15 EST
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
Comment 3 Fedora Update System 2009-12-26 14:54:14 EST
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.

Note You need to log in before you can comment on or make changes to this bug.