summaryrefslogtreecommitdiffstats
path: root/fs/nfsd/xdr4.h
diff options
context:
space:
mode:
authorSachin Bhamare <sachin.bhamare@primarydata.com>2015-04-27 14:50:14 +0200
committerJ. Bruce Fields <bfields@redhat.com>2015-05-04 12:02:39 -0400
commit8287f009bd95a5e548059dba62a67727bb9549cd (patch)
tree12d451819b0e805fd86172cdb120cb77014c5e75 /fs/nfsd/xdr4.h
parentebe9cb3bb13e7b9b281969cd279ce70834f7500f (diff)
downloadop-kernel-dev-8287f009bd95a5e548059dba62a67727bb9549cd.zip
op-kernel-dev-8287f009bd95a5e548059dba62a67727bb9549cd.tar.gz
nfsd: fix pNFS return on close semantics
For the sake of forgetful clients, the server should return the layouts to the file system on 'last close' of a file (assuming that there are no delegations outstanding to that particular client) or on delegreturn (assuming that there are no opens on a file from that particular client). In theory the information is all there in current data structures, but it's not efficiently available; nfs4_file->fi_ref includes references on the file across all clients, but we need a per-(client, file) count. Walking through lots of stateid's to calculate this on each close or delegreturn would be painful. This patch introduces infrastructure to maintain per-client opens and delegation counters on a per-file basis. [hch: ported to the mainline pNFS support, merged various fixes from Jeff] Signed-off-by: Sachin Bhamare <sachin.bhamare@primarydata.com> Signed-off-by: Jeff Layton <jlayton@primarydata.com> Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd/xdr4.h')
-rw-r--r--fs/nfsd/xdr4.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/nfsd/xdr4.h b/fs/nfsd/xdr4.h
index f982ae8..2f8c092 100644
--- a/fs/nfsd/xdr4.h
+++ b/fs/nfsd/xdr4.h
@@ -247,6 +247,7 @@ struct nfsd4_open {
struct nfs4_openowner *op_openowner; /* used during processing */
struct nfs4_file *op_file; /* used during processing */
struct nfs4_ol_stateid *op_stp; /* used during processing */
+ struct nfs4_clnt_odstate *op_odstate; /* used during processing */
struct nfs4_acl *op_acl;
struct xdr_netobj op_label;
};
OpenPOWER on IntegriCloud