aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/nfs4proc.c
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2012-11-16 12:12:38 -0500
committerTrond Myklebust <Trond.Myklebust@netapp.com>2012-11-21 09:29:53 -0500
commit933602e368c4452260c9bff4fbb3baba35cf987a (patch)
tree44839731364e55c7d6b4c8ae6f4906386046c8c6 /fs/nfs/nfs4proc.c
parent9216106a847a53e6d0fe6d11dfd9175f2ca7fccf (diff)
NFSv4.1: Shrink struct nfs4_sequence_res by moving sr_renewal_time
Store the renewal time inside the session slot instead. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/nfs4proc.c')
-rw-r--r--fs/nfs/nfs4proc.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index 5e5cc5a5065f..14b39742b6e4 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -486,6 +486,7 @@ static void nfs41_sequence_free_slot(struct nfs4_sequence_res *res)
486 486
487static int nfs41_sequence_done(struct rpc_task *task, struct nfs4_sequence_res *res) 487static int nfs41_sequence_done(struct rpc_task *task, struct nfs4_sequence_res *res)
488{ 488{
489 struct nfs4_slot *slot;
489 unsigned long timestamp; 490 unsigned long timestamp;
490 struct nfs_client *clp; 491 struct nfs_client *clp;
491 492
@@ -502,12 +503,14 @@ static int nfs41_sequence_done(struct rpc_task *task, struct nfs4_sequence_res *
502 if (!RPC_WAS_SENT(task)) 503 if (!RPC_WAS_SENT(task))
503 goto out; 504 goto out;
504 505
506 slot = res->sr_slot;
507
505 /* Check the SEQUENCE operation status */ 508 /* Check the SEQUENCE operation status */
506 switch (res->sr_status) { 509 switch (res->sr_status) {
507 case 0: 510 case 0:
508 /* Update the slot's sequence and clientid lease timer */ 511 /* Update the slot's sequence and clientid lease timer */
509 ++res->sr_slot->seq_nr; 512 ++slot->seq_nr;
510 timestamp = res->sr_renewal_time; 513 timestamp = slot->renewal_time;
511 clp = res->sr_session->clp; 514 clp = res->sr_session->clp;
512 do_renew_lease(clp, timestamp); 515 do_renew_lease(clp, timestamp);
513 /* Check sequence flags */ 516 /* Check sequence flags */
@@ -521,12 +524,12 @@ static int nfs41_sequence_done(struct rpc_task *task, struct nfs4_sequence_res *
521 */ 524 */
522 dprintk("%s: slot=%td seq=%d: Operation in progress\n", 525 dprintk("%s: slot=%td seq=%d: Operation in progress\n",
523 __func__, 526 __func__,
524 res->sr_slot - res->sr_session->fc_slot_table.slots, 527 slot - res->sr_session->fc_slot_table.slots,
525 res->sr_slot->seq_nr); 528 slot->seq_nr);
526 goto out_retry; 529 goto out_retry;
527 default: 530 default:
528 /* Just update the slot sequence no. */ 531 /* Just update the slot sequence no. */
529 ++res->sr_slot->seq_nr; 532 ++slot->seq_nr;
530 } 533 }
531out: 534out:
532 /* The session may be reset by one of the error handlers. */ 535 /* The session may be reset by one of the error handlers. */
@@ -637,6 +640,7 @@ int nfs41_setup_sequence(struct nfs4_session *session,
637 640
638 rpc_task_set_priority(task, RPC_PRIORITY_NORMAL); 641 rpc_task_set_priority(task, RPC_PRIORITY_NORMAL);
639 slot = tbl->slots + slotid; 642 slot = tbl->slots + slotid;
643 slot->renewal_time = jiffies;
640 args->sa_session = session; 644 args->sa_session = session;
641 args->sa_slotid = slotid; 645 args->sa_slotid = slotid;
642 646
@@ -644,7 +648,6 @@ int nfs41_setup_sequence(struct nfs4_session *session,
644 648
645 res->sr_session = session; 649 res->sr_session = session;
646 res->sr_slot = slot; 650 res->sr_slot = slot;
647 res->sr_renewal_time = jiffies;
648 res->sr_status_flags = 0; 651 res->sr_status_flags = 0;
649 /* 652 /*
650 * sr_status is only set in decode_sequence, and so will remain 653 * sr_status is only set in decode_sequence, and so will remain