From: Trond Myklebust <Trond.Myklebust@netapp.com>
To: "J. Bruce Fields" <bfields@fieldses.org>
Cc: linux-nfs@vger.kernel.org
Subject: Re: mountpoint-crossing
Date: Sun, 13 Dec 2009 17:33:15 -0500 [thread overview]
Message-ID: <1260743595.3076.12.camel@localhost> (raw)
In-Reply-To: <20091213213945.GB20421@fieldses.org>
On Sun, 2009-12-13 at 16:39 -0500, J. Bruce Fields wrote:
> On a recent kernel:
>
> # mount -tnfs4 pearlet1:/ /mnt/
> # find /mnt/
> /mnt/
> find: File system loop detected; `/mnt/DIR' is part of the same
> file system loop as `/mnt/'.
>
> Here /mnt/DIR is a server-side mountpoint, hence has a different fsid
> than /mnt/. Wireshark confirms that the server is returning a different
> fsid. However, 'strace -v find /mnt/' shows stat returning
> st_dev=makedev(0, 22) for both /mnt and /mnt/DIR.
>
> If I then do a 'ls /mnt/DIR', followed by another find, the error goes
> away, and this time an strace shows that stat is returning (0, 23) for
> /mnt/DIR.
>
> I don't see any obvious problem with the network trace, so it looks to
> me like the client is failing to recognize the mountpoint when it
> should?
This is a known consequence of the way we treat submounts (and
referrals); we're basically treating them as a special kind of symlink.
The problem then arises when syscalls such as stat() fail to set the
LOOKUP_FOLLOW flag, and so the user is granted a temporary peek of the
underlying inode.
I'm not sure how we should treat this. I suppose we could change the
test in __link_path_walk() so that it always call follow_link() if the
inode is not a symlink...
Cheers
Trond
next prev parent reply other threads:[~2009-12-13 22:33 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-13 21:39 mountpoint-crossing J. Bruce Fields
2009-12-13 22:33 ` Trond Myklebust [this message]
2009-12-14 13:38 ` mountpoint-crossing Jeff Layton
[not found] ` <20091214083843.5e6e73f5-9yPaYZwiELC+kQycOl6kW4xkIHaj4LzF@public.gmane.org>
2009-12-14 15:24 ` mountpoint-crossing J. Bruce Fields
2009-12-14 15:52 ` mountpoint-crossing Jeff Layton
[not found] ` <20091214105214.64714867-9yPaYZwiELC+kQycOl6kW4xkIHaj4LzF@public.gmane.org>
2009-12-14 16:04 ` mountpoint-crossing J. Bruce Fields
2009-12-14 16:44 ` mountpoint-crossing Jeff Layton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1260743595.3076.12.camel@localhost \
--to=trond.myklebust@netapp.com \
--cc=bfields@fieldses.org \
--cc=linux-nfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.