kernel-hacking-2024-linux-s.../fs/nfsd
Jeff Layton cc8a55320b nfsd: serialize layout stateid morphing operations
In order to allow the client to make a sane determination of what
happened with racing LAYOUTGET/LAYOUTRETURN/CB_LAYOUTRECALL calls, we
must ensure that the seqids return accurately represent the order of
operations. The simplest way to do that is to ensure that operations on
a single stateid are serialized.

This patch adds a mutex to the layout stateid, and locks it when
checking the layout stateid's seqid. The mutex is held over the entire
operation and released after the seqid is bumped.

Note that in the case of CB_LAYOUTRECALL we must move the increment of
the seqid and setting into a new cb "prepare" operation. The lease
infrastructure will call the lm_break callback with a spinlock held, so
and we can't take the mutex in that codepath.

Cc: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jeff Layton <jeff.layton@primarydata.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
2015-10-23 15:57:32 -04:00
..
acl.h
auth.c
auth.h
blocklayout.c nfsd/blocklayout: accept any minlength 2015-10-09 16:11:40 -04:00
blocklayoutxdr.c pnfs: move common blocklayout XDR defintions to nfs4.h 2015-08-17 13:22:49 -05:00
blocklayoutxdr.h pnfs: move common blocklayout XDR defintions to nfs4.h 2015-08-17 13:22:49 -05:00
cache.h nfsd: Remove the cache_hash list 2014-08-17 12:00:12 -04:00
current_stateid.h
export.c sunrpc/nfsd: Remove redundant code by exports seq_operations functions 2015-08-13 08:59:02 -04:00
export.h nfsd: include linux/nfs4.h in export.h 2015-08-13 10:21:21 -04:00
fault_inject.c nfsd: remove old fault injection infrastructure 2014-08-05 10:55:10 -04:00
idmap.h nfsd: Remove duplicate define of IDMAP_NAMESZ/IDMAP_TYPE_xx 2015-07-20 14:58:46 -04:00
Kconfig Merge branch 'for-4.1' of git://linux-nfs.org/~bfields/linux 2015-04-24 07:46:05 -07:00
lockd.c
Makefile nfsd: pNFS block layout driver 2015-02-05 14:35:18 +01:00
netns.h nfsd: New counter for generating client confirm verifier 2015-08-10 16:05:47 -04:00
nfs2acl.c nfsd: Add macro NFS_ACL_MASK for ACL 2015-07-20 14:58:46 -04:00
nfs3acl.c nfsd: Add macro NFS_ACL_MASK for ACL 2015-07-20 14:58:46 -04:00
nfs3proc.c VFS: normal filesystems (and lustre): d_inode() annotations 2015-04-15 15:06:57 -04:00
nfs3xdr.c nfsd: switch unsigned char flags in svc_fh to bools 2015-10-12 17:31:04 -04:00
nfs4acl.c nfsd: Fix two typos in comments 2015-08-13 10:26:24 -04:00
nfs4callback.c nfsd: New helper nfsd4_cb_sequence_done() for processing more cb errors 2015-08-13 08:57:06 -04:00
nfs4idmap.c nfsd: Remove duplicate define of IDMAP_NAMESZ/IDMAP_TYPE_xx 2015-07-20 14:58:46 -04:00
nfs4layouts.c nfsd: serialize layout stateid morphing operations 2015-10-23 15:57:32 -04:00
nfs4proc.c nfsd: serialize layout stateid morphing operations 2015-10-23 15:57:32 -04:00
nfs4recover.c nfsd: don't WARN/backtrace for invalid container deployment. 2015-08-31 16:32:08 -04:00
nfs4state.c nfsd: improve client_has_state to check for unused openowners 2015-10-23 15:57:31 -04:00
nfs4xdr.c NFSD: Return word2 bitmask if setting security label in OPEN/CREATE 2015-08-31 16:16:40 -04:00
nfscache.c nfsd: drop null test before destroy functions 2015-10-12 17:31:04 -04:00
nfsctl.c nfsd: fix nsfd startup race triggering BUG_ON 2015-04-21 16:16:03 -04:00
nfsd.h nfsd: eliminate NFSD_DEBUG 2015-04-21 16:16:02 -04:00
nfsfh.c nfsd: switch unsigned char flags in svc_fh to bools 2015-10-12 17:31:04 -04:00
nfsfh.h nfsd: switch unsigned char flags in svc_fh to bools 2015-10-12 17:31:04 -04:00
nfsproc.c nfsd: Disable NFSv2 timestamp workaround for NFSv3+ 2015-05-29 11:04:01 -04:00
nfssvc.c nfsd/sunrpc: abstract out svc_set_num_threads to sv_ops 2015-08-10 16:05:43 -04:00
nfsxdr.c VFS: normal filesystems (and lustre): d_inode() annotations 2015-04-15 15:06:57 -04:00
pnfs.h nfsd4: fix v3-less build 2015-02-16 11:43:13 -05:00
state.h nfsd: serialize layout stateid morphing operations 2015-10-23 15:57:32 -04:00
stats.c
stats.h
trace.c nfsd: move include of state.h from trace.c to trace.h 2015-10-23 15:57:29 -04:00
trace.h nfsd: move include of state.h from trace.c to trace.h 2015-10-23 15:57:29 -04:00
vfs.c nfsd: switch unsigned char flags in svc_fh to bools 2015-10-12 17:31:04 -04:00
vfs.h nfsd: switch unsigned char flags in svc_fh to bools 2015-10-12 17:31:04 -04:00
xdr.h
xdr3.h
xdr4.h nfsd: switch unsigned char flags in svc_fh to bools 2015-10-12 17:31:04 -04:00
xdr4cb.h nfsd: implement pNFS layout recalls 2015-02-02 18:09:43 +01:00