linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC v3 0/7] NFS Force Unmounting
@ 2017-11-14 23:06 Joshua Watt
  2017-11-14 23:06 ` [RFC v3 1/7] SUNRPC: Add flag to kill new tasks Joshua Watt
                   ` (7 more replies)
  0 siblings, 8 replies; 10+ messages in thread
From: Joshua Watt @ 2017-11-14 23:06 UTC (permalink / raw)
  To: NeilBrown, Jeff Layton, Trond Myklebust, J . Bruce Fields
  Cc: linux-nfs, Al Viro, David Howells, Joshua Watt

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.

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).

Joshua Watt (7):
  SUNRPC: Add flag to kill new tasks
  SUNRPC: Expose kill_new_tasks in debugfs
  SUNRPC: Simplify client shutdown
  NFS: Add debugfs for nfs_server and nfs_client
  NFS: Propagate NFS_MOUNT_UNSHARED to clients
  NFS: Add API to fail client
  NFS: Control failed clients through debugfs

 fs/nfs/Makefile             |   2 +-
 fs/nfs/client.c             | 121 ++++++++++++++++++++++++--
 fs/nfs/debugfs.c            | 202 ++++++++++++++++++++++++++++++++++++++++++++
 fs/nfs/inode.c              |   5 ++
 fs/nfs/internal.h           |  11 +++
 fs/nfs/nfs3client.c         |   2 +
 fs/nfs/nfs4client.c         |   5 ++
 include/linux/nfs_fs_sb.h   |   8 ++
 include/linux/sunrpc/clnt.h |   1 +
 net/sunrpc/clnt.c           |  12 +--
 net/sunrpc/debugfs.c        |   4 +
 net/sunrpc/sched.c          |   3 +
 12 files changed, 360 insertions(+), 16 deletions(-)
 create mode 100644 fs/nfs/debugfs.c

-- 
2.13.6


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2017-11-15 16:10 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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).