aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/nfs4_fs.h
diff options
context:
space:
mode:
authorAndy Adamson <andros@netapp.com>2009-04-01 09:22:15 -0400
committerBenny Halevy <bhalevy@panasas.com>2009-06-17 13:46:39 -0400
commitfbcd4abcb3841f85578985c09c6df85aa41b0ae8 (patch)
treefd1744248ab503dad083e0fb54c938315adef92f /fs/nfs/nfs4_fs.h
parent510b81756f18922a4c5b555e8145f4fed5beb569 (diff)
nfs41: setup_sequence method
Allocate a slot in the session slot table and set the sequence op arguments. Called at the rpc prepare stage. Add a status to nfs41_sequence_res, initialize it to one so that we catch rpc level failures which do not go through decode_sequence which sets the new status field. Note that upon an rpc level failure, we don't know if the server processed the sequence operation or not. Proceed as if the server did process the sequence operation. Signed-off-by: Rahul Iyer <iyer@netapp.com> [nfs41: sequence args use slotid] [nfs41: find slot return slotid] Signed-off-by: Andy Adamson <andros@netapp.com> Signed-off-by: Benny Halevy <bhalevy@panasas.com> [nfs41: remove SEQ4_STATUS_USE_TK_STATUS] As per 11-14-08 review [move extern declaration from nfs41: sequence setup/done support] [removed sa_session definition, changed sa_cache_this into a u8 to reduce footprint] Signed-off-by: Andy Adamson <andros@netapp.com> Signed-off-by: Benny Halevy <bhalevy@panasas.com> [nfs41: rpc_sleep_on slot_tbl_waitq must be called under slot_tbl_lock] Otherwise there's a race (we've hit) with nfs4_free_slot where nfs41_setup_sequence sees a full slot table, unlocks slot_tbl_lock, nfs4_free_slots happen concurrently and call rpc_wake_up_next where there's nobody to wake up yet, context goes back to nfs41_setup_sequence which goes to sleep when the slot table is actually empty now and there's no-one to wake it up anymore. Signed-off-by: Benny Halevy <bhalevy@panasas.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/nfs4_fs.h')
-rw-r--r--fs/nfs/nfs4_fs.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/fs/nfs/nfs4_fs.h b/fs/nfs/nfs4_fs.h
index acac6f8c3d39..eccf4e93e7d7 100644
--- a/fs/nfs/nfs4_fs.h
+++ b/fs/nfs/nfs4_fs.h
@@ -203,8 +203,18 @@ extern int nfs4_proc_fs_locations(struct inode *dir, const struct qstr *name,
203extern struct nfs4_state_recovery_ops nfs4_reboot_recovery_ops; 203extern struct nfs4_state_recovery_ops nfs4_reboot_recovery_ops;
204extern struct nfs4_state_recovery_ops nfs4_nograce_recovery_ops; 204extern struct nfs4_state_recovery_ops nfs4_nograce_recovery_ops;
205#if defined(CONFIG_NFS_V4_1) 205#if defined(CONFIG_NFS_V4_1)
206extern int nfs4_setup_sequence(struct nfs_client *clp,
207 struct nfs4_sequence_args *args, struct nfs4_sequence_res *res,
208 int cache_reply, struct rpc_task *task);
206extern void nfs4_destroy_session(struct nfs4_session *session); 209extern void nfs4_destroy_session(struct nfs4_session *session);
207extern struct nfs4_session *nfs4_alloc_session(struct nfs_client *clp); 210extern struct nfs4_session *nfs4_alloc_session(struct nfs_client *clp);
211#else /* CONFIG_NFS_v4_1 */
212static inline int nfs4_setup_sequence(struct nfs_client *clp,
213 struct nfs4_sequence_args *args, struct nfs4_sequence_res *res,
214 int cache_reply, struct rpc_task *task)
215{
216 return 0;
217}
208#endif /* CONFIG_NFS_V4_1 */ 218#endif /* CONFIG_NFS_V4_1 */
209 219
210extern const u32 nfs4_fattr_bitmap[2]; 220extern const u32 nfs4_fattr_bitmap[2];