summaryrefslogtreecommitdiff
path: root/fs/nfsd/state.h
diff options
context:
space:
mode:
authorJ. Bruce Fields <bfields@redhat.com>2011-09-17 00:12:38 (GMT)
committerJ. Bruce Fields <bfields@redhat.com>2011-09-19 12:39:34 (GMT)
commitf7a4d872078a5e143d88adb561627f637046b05a (patch)
tree9a61699ca2705a48a46e5c276f587f1825dd27a0 /fs/nfsd/state.h
parentd3b313a463c64c54d57c6af09c4a5d20106c1d1c (diff)
downloadlinux-f7a4d872078a5e143d88adb561627f637046b05a.tar.xz
nfsd4: hash closed stateid's like any other
Look up closed stateid's in the stateid hash like any other stateid rather than searching the close lru. This is simpler, and fixes a bug: currently we handle only the case of a close that is the last close for a given stateowner, but not the case of a close for a stateowner that still has active opens on other files. Thus in a case like: open(owner, file1) open(owner, file2) close(owner, file2) close(owner, file2) the final close won't be recognized as a retransmission. Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd/state.h')
-rw-r--r--fs/nfsd/state.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/nfsd/state.h b/fs/nfsd/state.h
index d6aec4f..da68bf6 100644
--- a/fs/nfsd/state.h
+++ b/fs/nfsd/state.h
@@ -76,7 +76,9 @@ struct nfs4_stid {
#define NFS4_OPEN_STID 1
#define NFS4_LOCK_STID 2
#define NFS4_DELEG_STID 4
- char sc_type;
+/* For an open stateid kept around *only* to process close replays: */
+#define NFS4_CLOSED_STID 8
+ unsigned char sc_type;
struct list_head sc_hash;
stateid_t sc_stateid;
};