diff options
author | Tigran Mkrtchyan <kofemann@gmail.com> | 2012-02-13 22:55:32 +0100 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2012-02-15 17:20:45 +0100 |
commit | 37c593c57324740821766c56e48cf09776a68a9c (patch) | |
tree | 9c6f91acb532da56f5d5f24c2aa8a345f717c81a /fs/nfsd/xdr4.h | |
parent | nfsd41: consume current stateid on DELEGRETURN and OPENDOWNGRADE (diff) | |
download | linux-37c593c57324740821766c56e48cf09776a68a9c.tar.xz linux-37c593c57324740821766c56e48cf09776a68a9c.zip |
nfsd41: use current stateid by value
Signed-off-by: Tigran Mkrtchyan <kofemann@gmail.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd/xdr4.h')
-rw-r--r-- | fs/nfsd/xdr4.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/fs/nfsd/xdr4.h b/fs/nfsd/xdr4.h index 3c1ddd7f13a4..12789eb3f911 100644 --- a/fs/nfsd/xdr4.h +++ b/fs/nfsd/xdr4.h @@ -43,6 +43,13 @@ #define NFSD4_MAX_TAGLEN 128 #define XDR_LEN(n) (((n) + 3) & ~3) +#define CURRENT_STATE_ID_FLAG (1<<0) +#define SAVED_STATE_ID_FLAG (1<<1) + +#define SET_STATE_ID(c, f) ((c)->sid_flags |= (f)) +#define HAS_STATE_ID(c, f) ((c)->sid_flags & (f)) +#define CLEAR_STATE_ID(c, f) ((c)->sid_flags &= ~(f)) + struct nfsd4_compound_state { struct svc_fh current_fh; struct svc_fh save_fh; @@ -54,8 +61,10 @@ struct nfsd4_compound_state { size_t iovlen; u32 minorversion; u32 status; - const stateid_t *current_stateid; - const stateid_t *save_stateid; + stateid_t current_stateid; + stateid_t save_stateid; + /* to indicate current and saved state id presents */ + u32 sid_flags; }; static inline bool nfsd4_has_session(struct nfsd4_compound_state *cs) |