From: NeilBrown <neilb@suse.de>
To: "J. Bruce Fields" <bfields@fieldses.org>
Cc: Boaz Harrosh <openosd@gmail.com>, NFS <linux-nfs@vger.kernel.org>
Subject: Re: Should exportfs/mountd cope with case-insensitive directory names.
Date: Fri, 4 Apr 2014 08:21:54 +1100 [thread overview]
Message-ID: <20140404082154.4cfdab5a@notabene.brown> (raw)
In-Reply-To: <20140403172431.GB5884@fieldses.org>
[-- Attachment #1: Type: text/plain, Size: 1457 bytes --]
On Thu, 3 Apr 2014 13:24:31 -0400 "J. Bruce Fields" <bfields@fieldses.org>
wrote:
> On Thu, Apr 03, 2014 at 01:16:25PM -0400, J. Bruce Fields wrote:
> > In the presence of bind mounts it's definitely possible for two
> > different paths to reach the same directory.
> >
> > I don't know if that's actually a problem here....
>
> Without testing: if we've got the same filesystem mounted at /foo/bar
> and /foo/baz, but only export /foo/bar, will this change make that
> export show up at /foo/baz as well?
>
> (Since we'll now consider /foo/bar and /foo/baz to match where
> previously they didn't?)
Good question. I should test, but I suspect "yes". I'm not really happy
about that.
Maybe we could use name_to_handle_at(). That returns the mnt_id
which is different for different bind mounts.
So if the mnt_id and the handle are the same, it is the same directory. If
not, then not.
I did worry a bit about all the extra stat calls, but as you say: they are
cached so it shouldn't be a big problem.
It would make sense to stat (or name_to_handle_at) the name from the kernel
just once, then compare the value against everything in the export table.
We could possible store handles in the export table, but then we would need
to check for changes to mountinfo (I think 'poll' can do that) and clear out
the cache whenever a mount changes.
I might play with some code if I find time...
Thanks,
NeilBrown
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 828 bytes --]
next prev parent reply other threads:[~2014-04-03 21:22 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-03 5:46 Should exportfs/mountd cope with case-insensitive directory names NeilBrown
2014-04-03 13:09 ` J. Bruce Fields
2014-04-03 16:02 ` Boaz Harrosh
2014-04-03 17:16 ` J. Bruce Fields
2014-04-03 17:24 ` J. Bruce Fields
2014-04-03 21:21 ` NeilBrown [this message]
2014-04-03 21:36 ` J. Bruce Fields
2014-04-03 22:13 ` NeilBrown
2014-04-04 14:34 ` J. Bruce Fields
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=20140404082154.4cfdab5a@notabene.brown \
--to=neilb@suse.de \
--cc=bfields@fieldses.org \
--cc=linux-nfs@vger.kernel.org \
--cc=openosd@gmail.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).