summaryrefslogtreecommitdiffstats
path: root/fs/nfsd/state.h
diff options
context:
space:
mode:
authorJ. Bruce Fields <bfields@redhat.com>2011-09-08 12:07:44 -0400
committerJ. Bruce Fields <bfields@redhat.com>2011-09-13 18:30:32 -0400
commitd5477a8db8134c481ad7b4b745f6defa119253e1 (patch)
treedba3b9a52068041ddaa2bcdfb88dd181fb698c6e /fs/nfsd/state.h
parentdcef0413da9a17bfca917d8b49baf309ce76b737 (diff)
downloadop-kernel-dev-d5477a8db8134c481ad7b4b745f6defa119253e1.zip
op-kernel-dev-d5477a8db8134c481ad7b4b745f6defa119253e1.tar.gz
nfsd4: add common dl_stid field to delegation
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd/state.h')
-rw-r--r--fs/nfsd/state.h20
1 files changed, 11 insertions, 9 deletions
diff --git a/fs/nfsd/state.h b/fs/nfsd/state.h
index d7fffab..e3ff7c9 100644
--- a/fs/nfsd/state.h
+++ b/fs/nfsd/state.h
@@ -76,6 +76,15 @@ struct nfsd4_callback {
bool cb_done;
};
+struct nfs4_stid {
+#define NFS4_OPEN_STID 1
+#define NFS4_LOCK_STID 2
+#define NFS4_DELEG_STID 4
+ char sc_type;
+ struct list_head sc_hash;
+ stateid_t sc_stateid;
+};
+
struct nfs4_delegation {
struct list_head dl_perfile;
struct list_head dl_perclnt;
@@ -86,7 +95,7 @@ struct nfs4_delegation {
u32 dl_type;
time_t dl_time;
/* For recall: */
- stateid_t dl_stateid;
+ struct nfs4_stid dl_stid;
struct knfsd_fh dl_fh;
int dl_retries;
struct nfsd4_callback dl_recall;
@@ -446,14 +455,7 @@ static inline struct file *find_any_file(struct nfs4_file *f)
* we should consider defining separate structs for the two cases.
*/
-struct nfs4_stid {
-#define NFS4_OPEN_STID 1
-#define NFS4_LOCK_STID 2
- char sc_type;
- struct list_head sc_hash;
- stateid_t sc_stateid;
-};
-
+/* "ol" stands for "Open or Lock". Better suggestions welcome. */
struct nfs4_ol_stateid {
struct nfs4_stid st_stid;
struct list_head st_perfile;
OpenPOWER on IntegriCloud