diff options
Diffstat (limited to 'fs/nfs/nfs4_fs.h')
-rw-r--r-- | fs/nfs/nfs4_fs.h | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/fs/nfs/nfs4_fs.h b/fs/nfs/nfs4_fs.h index c97a0ad8430e..44b56c915f72 100644 --- a/fs/nfs/nfs4_fs.h +++ b/fs/nfs/nfs4_fs.h | |||
@@ -70,19 +70,25 @@ static inline void nfs_confirm_seqid(struct nfs_seqid_counter *seqid, int status | |||
70 | seqid->flags |= NFS_SEQID_CONFIRMED; | 70 | seqid->flags |= NFS_SEQID_CONFIRMED; |
71 | } | 71 | } |
72 | 72 | ||
73 | struct nfs_unique_id { | ||
74 | struct rb_node rb_node; | ||
75 | __u64 id; | ||
76 | }; | ||
77 | |||
73 | /* | 78 | /* |
74 | * NFS4 state_owners and lock_owners are simply labels for ordered | 79 | * NFS4 state_owners and lock_owners are simply labels for ordered |
75 | * sequences of RPC calls. Their sole purpose is to provide once-only | 80 | * sequences of RPC calls. Their sole purpose is to provide once-only |
76 | * semantics by allowing the server to identify replayed requests. | 81 | * semantics by allowing the server to identify replayed requests. |
77 | */ | 82 | */ |
78 | struct nfs4_state_owner { | 83 | struct nfs4_state_owner { |
79 | spinlock_t so_lock; | 84 | struct nfs_unique_id so_owner_id; |
80 | struct list_head so_list; /* per-clientid list of state_owners */ | ||
81 | struct nfs_client *so_client; | 85 | struct nfs_client *so_client; |
82 | u32 so_id; /* 32-bit identifier, unique */ | 86 | struct rb_node so_client_node; |
83 | atomic_t so_count; | ||
84 | 87 | ||
85 | struct rpc_cred *so_cred; /* Associated cred */ | 88 | struct rpc_cred *so_cred; /* Associated cred */ |
89 | |||
90 | spinlock_t so_lock; | ||
91 | atomic_t so_count; | ||
86 | struct list_head so_states; | 92 | struct list_head so_states; |
87 | struct list_head so_delegations; | 93 | struct list_head so_delegations; |
88 | struct nfs_seqid_counter so_seqid; | 94 | struct nfs_seqid_counter so_seqid; |
@@ -108,7 +114,7 @@ struct nfs4_lock_state { | |||
108 | #define NFS_LOCK_INITIALIZED 1 | 114 | #define NFS_LOCK_INITIALIZED 1 |
109 | int ls_flags; | 115 | int ls_flags; |
110 | struct nfs_seqid_counter ls_seqid; | 116 | struct nfs_seqid_counter ls_seqid; |
111 | u32 ls_id; | 117 | struct nfs_unique_id ls_id; |
112 | nfs4_stateid ls_stateid; | 118 | nfs4_stateid ls_stateid; |
113 | atomic_t ls_count; | 119 | atomic_t ls_count; |
114 | }; | 120 | }; |
@@ -189,7 +195,6 @@ extern void nfs4_renew_state(struct work_struct *); | |||
189 | 195 | ||
190 | /* nfs4state.c */ | 196 | /* nfs4state.c */ |
191 | struct rpc_cred *nfs4_get_renew_cred(struct nfs_client *clp); | 197 | struct rpc_cred *nfs4_get_renew_cred(struct nfs_client *clp); |
192 | extern u32 nfs4_alloc_lockowner_id(struct nfs_client *); | ||
193 | 198 | ||
194 | extern struct nfs4_state_owner * nfs4_get_state_owner(struct nfs_server *, struct rpc_cred *); | 199 | extern struct nfs4_state_owner * nfs4_get_state_owner(struct nfs_server *, struct rpc_cred *); |
195 | extern void nfs4_put_state_owner(struct nfs4_state_owner *); | 200 | extern void nfs4_put_state_owner(struct nfs4_state_owner *); |