From: NeilBrown <neilb@suse.de>
To: Jeff Layton <jlayton@redhat.com>
Cc: Al Viro <viro@ZenIV.linux.org.uk>,
Trond Myklebust <Trond.Myklebust@netapp.com>,
linux-nfs@vger.kernel.org, linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH v1] vfs: allow umount to handle mountpoints without revalidating them
Date: Tue, 2 Jul 2013 11:42:34 +1000 [thread overview]
Message-ID: <20130702114234.41cc66dc@notabene.brown> (raw)
In-Reply-To: <1372684830-13272-1-git-send-email-jlayton@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1560 bytes --]
On Mon, 1 Jul 2013 09:20:30 -0400 Jeff Layton <jlayton@redhat.com> wrote:
> Christopher reported a regression where he was unable to unmount a NFS
> filesystem where the root had gone stale. The problem is that
> d_revalidate handles the root of the filesystem differently from other
> dentries, but d_weak_revalidate does not. We could simply fix this by
> making d_weak_revalidate return success on IS_ROOT dentries, but there
> are cases where we do want to revalidate the root of the fs.
>
> A umount is really a special case. We generally aren't interested in
> anything but the dentry and vfsmount that's attached at that point. If
> the inode turns out to be stale we just don't care since the intent is
> to stop using it anyway.
>
> Try to handle this situation better by treating umount as a special
> case in the lookup code. Have it resolve the parent using normal
> means, and then do a lookup of the final dentry without revalidating
> it. In most cases, the final lookup will come out of the dcache, but
> the case where there's a trailing symlink or !LAST_NORM entry on the
> end complicates things a bit.
>
> Reported-by: Christopher T Vogan <cvogan@us.ibm.com>
> Signed-off-by: Jeff Layton <jlayton@redhat.com>
Thanks for this Jeff. It certainly looks credible to me.
There is a lot of code copied from the "user_path_at" path which is a shame,
but probably better that putting in lots of "is this an unmount" tests which
would slow done the common case.
On balance, I like it.
Thanks,
NeilBrown
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 828 bytes --]
next prev parent reply other threads:[~2013-07-02 1:42 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-01 13:20 [PATCH v1] vfs: allow umount to handle mountpoints without revalidating them Jeff Layton
2013-07-02 1:42 ` NeilBrown [this message]
2013-07-02 10:34 ` Jeffrey Layton
[not found] ` <1372761278.2620.13.camel-9yPaYZwiELC+kQycOl6kW4xkIHaj4LzF@public.gmane.org>
2013-07-02 12:14 ` Jeff Layton
2013-07-03 0:47 ` NeilBrown
[not found] ` <20130703104733.0dd1937d-wvvUuzkyo1EYVZTmpyfIwg@public.gmane.org>
2013-07-03 12:21 ` 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=20130702114234.41cc66dc@notabene.brown \
--to=neilb@suse.de \
--cc=Trond.Myklebust@netapp.com \
--cc=jlayton@redhat.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=viro@ZenIV.linux.org.uk \
/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).