aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/nfs4state.c
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2012-11-20 14:45:48 -0500
committerTrond Myklebust <Trond.Myklebust@netapp.com>2012-12-05 18:30:42 -0500
commit97e548a93de213b149eea025a97d88e28143b445 (patch)
tree7536bccb32193adf105bc1ede6462d6482589f4e /fs/nfs/nfs4state.c
parent1b285ff16ab52fb401aed7ce70abed4bb65b30b5 (diff)
NFSv4.1: Support dynamic resizing of the session slot table
Allow the server to control the size of the session slot table by adjusting the value of sr_target_max_slots in the reply to the SEQUENCE operation. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/nfs4state.c')
-rw-r--r--fs/nfs/nfs4state.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c
index 842cb8c2f65d..1b7fa73c9436 100644
--- a/fs/nfs/nfs4state.c
+++ b/fs/nfs/nfs4state.c
@@ -254,15 +254,14 @@ static void nfs4_end_drain_session(struct nfs_client *clp)
254{ 254{
255 struct nfs4_session *ses = clp->cl_session; 255 struct nfs4_session *ses = clp->cl_session;
256 struct nfs4_slot_table *tbl; 256 struct nfs4_slot_table *tbl;
257 int max_slots; 257 unsigned int i;
258 258
259 if (ses == NULL) 259 if (ses == NULL)
260 return; 260 return;
261 tbl = &ses->fc_slot_table; 261 tbl = &ses->fc_slot_table;
262 if (test_and_clear_bit(NFS4_SESSION_DRAINING, &ses->session_state)) { 262 if (test_and_clear_bit(NFS4_SESSION_DRAINING, &ses->session_state)) {
263 spin_lock(&tbl->slot_tbl_lock); 263 spin_lock(&tbl->slot_tbl_lock);
264 max_slots = tbl->max_slots; 264 for (i = 0; i <= tbl->max_slotid; i++) {
265 while (max_slots--) {
266 if (rpc_wake_up_first(&tbl->slot_tbl_waitq, 265 if (rpc_wake_up_first(&tbl->slot_tbl_waitq,
267 nfs4_set_task_privileged, 266 nfs4_set_task_privileged,
268 NULL) == NULL) 267 NULL) == NULL)
@@ -2043,6 +2042,7 @@ static int nfs4_recall_slot(struct nfs_client *clp)
2043 old = fc_tbl->slots; 2042 old = fc_tbl->slots;
2044 fc_tbl->slots = new; 2043 fc_tbl->slots = new;
2045 fc_tbl->max_slots = fc_tbl->target_highest_slotid + 1; 2044 fc_tbl->max_slots = fc_tbl->target_highest_slotid + 1;
2045 fc_tbl->max_slotid = fc_tbl->target_highest_slotid;
2046 clp->cl_session->fc_attrs.max_reqs = fc_tbl->max_slots; 2046 clp->cl_session->fc_attrs.max_reqs = fc_tbl->max_slots;
2047 spin_unlock(&fc_tbl->slot_tbl_lock); 2047 spin_unlock(&fc_tbl->slot_tbl_lock);
2048 2048