public inbox for linux-nfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH/RFC 0/7] Volatile Filehandle Client-side Support
@ 2011-11-11 23:04 Matthew Treinish
  2011-11-11 23:04 ` [PATCH/RFC 1/7] New mount option for volatile filehandle recovery Matthew Treinish
                   ` (8 more replies)
  0 siblings, 9 replies; 41+ messages in thread
From: Matthew Treinish @ 2011-11-11 23:04 UTC (permalink / raw)
  To: linux-nfs; +Cc: treinish

This patch series implements client side support for volatile file handle
recovery (RFC 3530 section 4.2 and 4.3) with walk back using the dcache. To
test the client you either need a server that supports volatile file handles or 
you can hard code the server to output NFS4ERR_FHEXPIRED instead of
NFSERR_STALE. (See the last patch in the series)

The approach used here for recovery is to perform lookups for each file handle
that receives a FHEXPIRED error. If the lookup also fails with FHEXPIRED using
the dcache, it will recursively walk back to the root of the mount, and recover 
that using get_root. 

Simple testing has shown that this approach works and will correctly recover
from a FHEXPIRED error code. However, the current implementation uses
d_obtain_alias if a nfs4_proc function is only given an inode. When hardlinks 
are involved, this results in getting a path, but not necessarily a path which
the user has access, which might lead to permission issues.

Since the RFC did not mandate how to recover from FHEXPIRED I would
assume this approach solves majority of the generic use cases, but, I think
that some more discussion is needed on this topic. Also, considering that this
is my first kernel patch set, I think it definitely needs review.

Matthew Treinish (7):
  New mount option for volatile filehandle recovery
  Added support for FH_EXPIRE_TYPE attribute.
  Add VFS objects from nfs4_proc calls into  nfs4_exception.
  Save root file handle in nfs_server.
  Added VFH FHEXPIRED recovery functions.
  Perform recovery on both inodes for rename.
  Added error handling for NFS4ERR_FHEXPIRED

 fs/nfs/client.c           |    3 +
 fs/nfs/getroot.c          |    7 ++
 fs/nfs/nfs4_fs.h          |    2 +
 fs/nfs/nfs4proc.c         |  245 +++++++++++++++++++++++++++++++++++++++------
 fs/nfs/nfs4xdr.c          |   27 +++++
 fs/nfs/super.c            |    6 +
 include/linux/nfs_fs_sb.h |    2 +
 include/linux/nfs_mount.h |    1 +
 include/linux/nfs_xdr.h   |    1 +
 9 files changed, 265 insertions(+), 29 deletions(-)

-- 
1.7.4.4


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

end of thread, other threads:[~2012-01-17 19:44 UTC | newest]

Thread overview: 41+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-11 23:04 [PATCH/RFC 0/7] Volatile Filehandle Client-side Support Matthew Treinish
2011-11-11 23:04 ` [PATCH/RFC 1/7] New mount option for volatile filehandle recovery Matthew Treinish
2011-11-12  0:19   ` Trond Myklebust
2011-11-12  3:35     ` Malahal Naineni
2011-11-11 23:04 ` [PATCH/RFC 2/7] Added support for FH_EXPIRE_TYPE attribute Matthew Treinish
2011-11-11 23:04 ` [PATCH/RFC 3/7] Add VFS objects from nfs4_proc calls into nfs4_exception Matthew Treinish
2011-11-11 23:04 ` [PATCH/RFC 4/7] Save root file handle in nfs_server Matthew Treinish
2011-11-11 23:04 ` [PATCH/RFC 5/7] Added VFH FHEXPIRED recovery functions Matthew Treinish
2011-11-12  0:27   ` Trond Myklebust
2011-11-12  3:45     ` Malahal Naineni
2011-11-12 17:16       ` Trond Myklebust
2011-11-14 21:12         ` Matthew Treinish
2011-11-11 23:04 ` [PATCH/RFC 6/7] Perform recovery on both inodes for rename Matthew Treinish
2011-11-11 23:04 ` [PATCH/RFC 7/7] Added error handling for NFS4ERR_FHEXPIRED Matthew Treinish
2011-11-11 23:04 ` [PATCH/RFC] Hard code testing on server <ONLY FOR TESTING> Matthew Treinish
2011-11-12  0:13 ` [PATCH/RFC 0/7] Volatile Filehandle Client-side Support Trond Myklebust
2011-11-12 14:49   ` Christoph Hellwig
2011-11-13  3:54     ` NeilBrown
2011-11-13 13:45       ` Tigran Mkrtchyan
2011-11-13 16:36         ` J. Bruce Fields
2011-11-13 21:07           ` NeilBrown
2011-11-14  0:42             ` J. Bruce Fields
2011-11-14  1:26               ` NeilBrown
2011-11-14 17:27             ` Trond Myklebust
2011-11-15  6:33             ` Trond Myklebust
2012-01-13 17:09               ` Malahal Naineni
2012-01-14  1:38                 ` J. Bruce Fields
2012-01-16 16:52                   ` Malahal Naineni
2012-01-17 15:18                     ` J. Bruce Fields
2012-01-17 17:22                       ` Malahal Naineni
2012-01-17 18:47                         ` J. Bruce Fields
2012-01-17 19:43                           ` Malahal Naineni
2011-11-14 16:29         ` Trond Myklebust
2011-11-13 16:42       ` J. Bruce Fields
2011-11-13 16:45         ` J. Bruce Fields
2011-11-13 18:25           ` Matthew Treinish
2011-11-13 18:06       ` Matthew Treinish
2011-11-14  9:09         ` Tigran Mkrtchyan
2011-11-14 21:47           ` Matthew Treinish
2011-11-15  6:49         ` Trond Myklebust
2011-11-15 22:38           ` Matthew Treinish

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox