From 38c387b52d8404f8fd29d8c26bebc83a80733657 Mon Sep 17 00:00:00 2001 From: "J. Bruce Fields" Date: Fri, 16 Sep 2011 17:42:48 -0400 Subject: 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 --- fs/nfsd/state.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'fs/nfsd/state.h') diff --git a/fs/nfsd/state.h b/fs/nfsd/state.h index a8324b868a3..e807abb116f 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 */ -- cgit v1.2.3-18-g5258