From: "J. Bruce Fields" <bfields@fieldses.org>
To: Steve Dickson <SteveD@redhat.com>
Cc: "J. Bruce Fields" <bfields@redhat.com>, linux-nfs@vger.kernel.org
Subject: Re: nfs-utils crossmnt bugfix, and cleanup
Date: Sat, 18 Jun 2011 15:50:00 -0400 [thread overview]
Message-ID: <20110618195000.GA28536@fieldses.org> (raw)
In-Reply-To: <4DFCA7C2.8050604@RedHat.com>
On Sat, Jun 18, 2011 at 09:27:30AM -0400, Steve Dickson wrote:
> Hey Bruce,
>
> On 06/14/2011 10:58 AM, J. Bruce Fields wrote:
> > We've long had a bug with crossmnt handling which could cause a parent's
> > export options to override those of a child in some cases.
> >
> > While I was there, I also did some cleanup, mainly of nfsd_fh(). It was
> > long and complicated, now it's short and complicated. We could probably
> > simplify the logic with a little more work.
> >
> > --b.
> Which bug are you referring to?
Suppose /etc/exports contains:
/foo *(rw,crossmnt)
/foo/bar *(ro)
The "crossmnt" tells us to export all filesystems under /foo recursively
with the same options as /foo is exported with. So there's a conflict:
should /foo/bar be exported ro, or rw?
The logical thing to do is to make the "ro" on the explicit export of
/foo/bar override the inherited "rw" from /foo, and in practice that's
what people have obviously expected in every case I've seen.
But we don't do that. Actually, it's worse than that: the /foo export
wins in the nfsd_fh upcall, and the /foo/bar export wins in the
nfsd_export upcall. So you can get inconsistent results depending on
which order things happen in.
So the first patch fixes nfsd_fh to behave like nfsd_export does, and
prefer /foo/bar.
This was most commonly a problem with people doing fsid=0 exports, so
it's less of a problem now that we have the v4root stuff, but definitely
it still needs fixing.
--b.
prev parent reply other threads:[~2011-06-18 19:50 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-14 14:58 nfs-utils crossmnt bugfix, and cleanup J. Bruce Fields
2011-06-14 14:58 ` [PATCH 1/4] mountd: prefer explicit subexports over crossmnt parents J. Bruce Fields
2011-06-14 14:58 ` [PATCH 2/4] mountd: gather fsid information into one struct J. Bruce Fields
2011-06-14 14:58 ` [PATCH 3/4] mountd: move fsidtype-specific code to helpers J. Bruce Fields
2011-06-14 14:58 ` [PATCH 4/4] mountd: don't automatically add subexports to kernel cache J. Bruce Fields
2011-06-22 22:30 ` Steve Dickson
2011-06-22 22:34 ` J. Bruce Fields
2011-06-27 16:36 ` Steve Dickson
2011-06-18 13:27 ` nfs-utils crossmnt bugfix, and cleanup Steve Dickson
2011-06-18 19:50 ` J. Bruce Fields [this message]
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=20110618195000.GA28536@fieldses.org \
--to=bfields@fieldses.org \
--cc=SteveD@redhat.com \
--cc=bfields@redhat.com \
--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 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).