aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/nfs4_fs.h
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2007-07-05 18:07:55 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2007-07-10 23:40:41 -0400
commit003707c7225dbd4bf879b6c204743554de0a08d6 (patch)
treeb5ca79744badf011d15111d819f629cfc69452ba /fs/nfs/nfs4_fs.h
parent0f9f95e0ad1f9d07d77832c5b60f7d30440602ee (diff)
NFSv4: Always use the delegation if we have one
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/nfs4_fs.h')
-rw-r--r--fs/nfs/nfs4_fs.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/fs/nfs/nfs4_fs.h b/fs/nfs/nfs4_fs.h
index 44b56c915f72..4a1c4d80a577 100644
--- a/fs/nfs/nfs4_fs.h
+++ b/fs/nfs/nfs4_fs.h
@@ -122,7 +122,10 @@ struct nfs4_lock_state {
122/* bits for nfs4_state->flags */ 122/* bits for nfs4_state->flags */
123enum { 123enum {
124 LK_STATE_IN_USE, 124 LK_STATE_IN_USE,
125 NFS_DELEGATED_STATE, 125 NFS_DELEGATED_STATE, /* Current stateid is delegation */
126 NFS_O_RDONLY_STATE, /* OPEN stateid has read-only state */
127 NFS_O_WRONLY_STATE, /* OPEN stateid has write-only state */
128 NFS_O_RDWR_STATE, /* OPEN stateid has read/write state */
126}; 129};
127 130
128struct nfs4_state { 131struct nfs4_state {
@@ -136,11 +139,12 @@ struct nfs4_state {
136 unsigned long flags; /* Do we hold any locks? */ 139 unsigned long flags; /* Do we hold any locks? */
137 spinlock_t state_lock; /* Protects the lock_states list */ 140 spinlock_t state_lock; /* Protects the lock_states list */
138 141
139 nfs4_stateid stateid; 142 nfs4_stateid stateid; /* Current stateid: may be delegation */
143 nfs4_stateid open_stateid; /* OPEN stateid */
140 144
141 unsigned int n_rdonly; 145 unsigned int n_rdonly; /* Number of read-only references */
142 unsigned int n_wronly; 146 unsigned int n_wronly; /* Number of write-only references */
143 unsigned int n_rdwr; 147 unsigned int n_rdwr; /* Number of read/write references */
144 int state; /* State on the server (R,W, or RW) */ 148 int state; /* State on the server (R,W, or RW) */
145 atomic_t count; 149 atomic_t count;
146}; 150};