From: Joshua Watt <jpewhacker@gmail.com>
To: Trond Myklebust <trondmy@primarydata.com>,
"bfields@fieldses.org" <bfields@fieldses.org>,
"jlayton@redhat.com" <jlayton@redhat.com>,
"neilb@suse.com" <neilb@suse.com>
Cc: "viro@zeniv.linux.org.uk" <viro@zeniv.linux.org.uk>,
"linux-nfs@vger.kernel.org" <linux-nfs@vger.kernel.org>,
"dhowells@redhat.com" <dhowells@redhat.com>
Subject: Re: [RFC v3 0/7] NFS Force Unmounting
Date: Wed, 15 Nov 2017 10:10:49 -0600 [thread overview]
Message-ID: <1510762249.2569.19.camel@gmail.com> (raw)
In-Reply-To: <1510753204.9878.52.camel@primarydata.com>
On Wed, 2017-11-15 at 13:40 +0000, Trond Myklebust wrote:
> On Tue, 2017-11-14 at 17:06 -0600, Joshua Watt wrote:
> > After some additional testing on version 2, I realized that 1) my
> > test
> > setup was bad (Doh!) and 2) using remount isn't really an ideal
> > method
> > for setting the "serverfailed" mount flag. The reason being that
> > any
> > userspace remount is going to touch the file system and probably
> > invoke
> > some RPCs for inode validation as such. If the server is truly
> > dead,
> > these RPCs will have to time out before the flag could actually be
> > set.
> > This not only takes a long time, but will probably also fail,
> > causing
> > the remount to fail and not set the flag, defeating the purpose.
>
> Why? There should be no reason to have to revalidate the path in
> order
> to change mount options on a mount point.
I figured this out... the revalidation is not required for the mount(2)
syscall when remounting. However, libmount tries to do a few file
system checks that do required validation. You can convince it to skip
these checks like so:
mount -c 172.16.9.0:/ /tmp/nfsmount -o remount,serverfailed
The "-c" prevents canonicalizing the mount path (meaning you must
provide the canonical path on the command line), and you have to
specify the "block device" (e.g. "172.16.9.0:/") to prevent it doing
some fstatat() checks on the mount path while parsing through mtab.
It's annoying you can't do the easier:
mount /tmp/nfsmount -o remount,serverfailed
but that's not the kernels fault.
>
> > This patch set works around this by exposing the failed server flag
> > in
> > debugfs. In addition, the flag now applies at the nfs_client level
> > (instead of the nfs_server). Setting the flag will cancel all RPCs
> > in
> > the client, as well as all nfs_servers attached to it. This ensures
> > that
> > you get all the mounts, even when dealing with submounts that cross
> > remote device boundaries. This is also where the nosharecache
> > option
> > applying to nfs_clients becomes useful... it will prevent sharing
> > between other explicit mount calls, but submounts will all still
> > share a
> > nfs_client (and fail together).
> >
> > Obviously, debugfs is not a permanent solution for this, so some
> > discussion needs to be had on how this will be administered "in the
> > real
> > world" (I think "remount" is off the table).
> >
>
> We're not adding any APIs to debugfs. That's a deal breaker...
Sure. Is the mount option still the best way forward then, or are there
other options to be explored?
>
> --
> Trond Myklebust
> Linux NFS client maintainer, PrimaryData
> trond.myklebust@primarydata.com
prev parent reply other threads:[~2017-11-15 16:10 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-14 23:06 [RFC v3 0/7] NFS Force Unmounting Joshua Watt
2017-11-14 23:06 ` [RFC v3 1/7] SUNRPC: Add flag to kill new tasks Joshua Watt
2017-11-14 23:06 ` [RFC v3 2/7] SUNRPC: Expose kill_new_tasks in debugfs Joshua Watt
2017-11-14 23:06 ` [RFC v3 3/7] SUNRPC: Simplify client shutdown Joshua Watt
2017-11-14 23:06 ` [RFC v3 4/7] NFS: Add debugfs for nfs_server and nfs_client Joshua Watt
2017-11-14 23:06 ` [RFC v3 5/7] NFS: Propagate NFS_MOUNT_UNSHARED to clients Joshua Watt
2017-11-14 23:06 ` [RFC v3 6/7] NFS: Add API to fail client Joshua Watt
2017-11-14 23:06 ` [RFC v3 7/7] NFS: Control failed clients through debugfs Joshua Watt
2017-11-15 13:40 ` [RFC v3 0/7] NFS Force Unmounting Trond Myklebust
2017-11-15 16:10 ` Joshua Watt [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=1510762249.2569.19.camel@gmail.com \
--to=jpewhacker@gmail.com \
--cc=bfields@fieldses.org \
--cc=dhowells@redhat.com \
--cc=jlayton@redhat.com \
--cc=linux-nfs@vger.kernel.org \
--cc=neilb@suse.com \
--cc=trondmy@primarydata.com \
--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).