summaryrefslogtreecommitdiffstats
path: root/fs/nfs/nfs4_fs.h
diff options
context:
space:
mode:
authorTrond Myklebust2013-03-17 20:52:00 +0100
committerTrond Myklebust2013-03-25 17:04:10 +0100
commit9b20614988199fb03580b335a28250922e902098 (patch)
treeeb8020ff76d93017af31f10dbdd4b5d929dd4369 /fs/nfs/nfs4_fs.h
parentNFS: __nfs_find_lock_context needs to check ctx->lock_context for a match too (diff)
downloadkernel-qcow2-linux-9b20614988199fb03580b335a28250922e902098.tar.gz
kernel-qcow2-linux-9b20614988199fb03580b335a28250922e902098.tar.xz
kernel-qcow2-linux-9b20614988199fb03580b335a28250922e902098.zip
NFSv4: The stateid must remain the same for replayed RPC calls
If we replay a READ or WRITE call, we should not be changing the stateid. Currently, we may end up doing so, because the stateid is only selected at xdr encode time. This patch ensures that we select the stateid after we get an NFSv4.1 session slot, and that we keep that same stateid across retries. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/nfs4_fs.h')
-rw-r--r--fs/nfs/nfs4_fs.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/nfs/nfs4_fs.h b/fs/nfs/nfs4_fs.h
index 9ce90135bf22..8309e98c44f9 100644
--- a/fs/nfs/nfs4_fs.h
+++ b/fs/nfs/nfs4_fs.h
@@ -234,6 +234,10 @@ extern struct rpc_clnt *nfs4_proc_lookup_mountpoint(struct inode *, struct qstr
extern int nfs4_proc_secinfo(struct inode *, const struct qstr *, struct nfs4_secinfo_flavors *);
extern int nfs4_release_lockowner(struct nfs4_lock_state *);
extern const struct xattr_handler *nfs4_xattr_handlers[];
+extern void nfs4_set_rw_stateid(nfs4_stateid *stateid,
+ const struct nfs_open_context *ctx,
+ const struct nfs_lock_context *l_ctx,
+ fmode_t fmode);
#if defined(CONFIG_NFS_V4_1)
static inline struct nfs4_session *nfs4_get_session(const struct nfs_server *server)