summaryrefslogtreecommitdiff
path: root/fs/nfsd/state.h
diff options
context:
space:
mode:
authorJ. Bruce Fields <bfields@redhat.com>2011-09-17 01:42:48 +0400
committerJ. Bruce Fields <bfields@redhat.com>2011-09-17 18:01:54 +0400
commit38c387b52d8404f8fd29d8c26bebc83a80733657 (patch)
tree41879d4c05ef03368856439f232df7ac1fcc2b0b /fs/nfsd/state.h
parentdad1c067eb42ec8bedadd64f681056914547d22e (diff)
downloadlinux-38c387b52d8404f8fd29d8c26bebc83a80733657.tar.xz
nfsd4: match close replays on stateid, not open owner id
Keep around an unhashed copy of the final stateid after the last close using an openowner, and when identifying a replay, match against that stateid instead of just against the open owner id. Free it the next time the seqid is bumped or the stateowner is destroyed. Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd/state.h')
-rw-r--r--fs/nfsd/state.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/nfsd/state.h b/fs/nfsd/state.h
index a8324b868a36..e807abb116f6 100644
--- a/fs/nfsd/state.h
+++ b/fs/nfsd/state.h
@@ -370,8 +370,10 @@ struct nfs4_openowner {
struct nfs4_stateowner oo_owner; /* must be first field */
struct list_head oo_perclient;
struct list_head oo_close_lru; /* tail queue */
+ struct nfs4_ol_stateid *oo_last_closed_stid;
time_t oo_time; /* time of placement on so_close_lru */
#define NFS4_OO_CONFIRMED 1
+#define NFS4_OO_PURGE_CLOSE 2
unsigned char oo_flags;
};
@@ -514,5 +516,6 @@ extern int nfsd4_create_clid_dir(struct nfs4_client *clp);
extern void nfsd4_remove_clid_dir(struct nfs4_client *clp);
extern void release_session_client(struct nfsd4_session *);
extern __be32 nfs4_validate_stateid(stateid_t *, bool);
+extern void nfsd4_purge_closed_stateid(struct nfs4_stateowner *);
#endif /* NFSD4_STATE_H */