diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2012-12-15 15:21:52 -0500 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2012-12-15 15:21:52 -0500 |
commit | 8e63b6a8adabb0551124c3b78f7f5f36912c3728 (patch) | |
tree | 47043a752823e4aba91f906f95d3c5006f759202 /fs/nfs/nfs4proc.c | |
parent | e8794440849d1d15fa11251ef1622e6160614874 (diff) |
NFSv4.1: Move the RPC timestamp out of the slot.
Shave a few bytes off the slot table size by moving the RPC timestamp
into the sequence results.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/nfs4proc.c')
-rw-r--r-- | fs/nfs/nfs4proc.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index 9003b8f6b77..afb428e63b5 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c | |||
@@ -419,7 +419,6 @@ static int nfs41_sequence_done(struct rpc_task *task, struct nfs4_sequence_res * | |||
419 | { | 419 | { |
420 | struct nfs4_session *session; | 420 | struct nfs4_session *session; |
421 | struct nfs4_slot *slot; | 421 | struct nfs4_slot *slot; |
422 | unsigned long timestamp; | ||
423 | struct nfs_client *clp; | 422 | struct nfs_client *clp; |
424 | int ret = 1; | 423 | int ret = 1; |
425 | 424 | ||
@@ -444,9 +443,8 @@ static int nfs41_sequence_done(struct rpc_task *task, struct nfs4_sequence_res * | |||
444 | case 0: | 443 | case 0: |
445 | /* Update the slot's sequence and clientid lease timer */ | 444 | /* Update the slot's sequence and clientid lease timer */ |
446 | ++slot->seq_nr; | 445 | ++slot->seq_nr; |
447 | timestamp = slot->renewal_time; | ||
448 | clp = session->clp; | 446 | clp = session->clp; |
449 | do_renew_lease(clp, timestamp); | 447 | do_renew_lease(clp, res->sr_timestamp); |
450 | /* Check sequence flags */ | 448 | /* Check sequence flags */ |
451 | if (res->sr_status_flags != 0) | 449 | if (res->sr_status_flags != 0) |
452 | nfs4_schedule_lease_recovery(clp); | 450 | nfs4_schedule_lease_recovery(clp); |
@@ -473,10 +471,11 @@ static int nfs41_sequence_done(struct rpc_task *task, struct nfs4_sequence_res * | |||
473 | * Could this slot have been previously retired? | 471 | * Could this slot have been previously retired? |
474 | * If so, then the server may be expecting seq_nr = 1! | 472 | * If so, then the server may be expecting seq_nr = 1! |
475 | */ | 473 | */ |
476 | if (slot->seq_nr == 1) | 474 | if (slot->seq_nr != 1) { |
477 | break; | 475 | slot->seq_nr = 1; |
478 | slot->seq_nr = 1; | 476 | goto retry_nowait; |
479 | goto retry_nowait; | 477 | } |
478 | break; | ||
480 | case -NFS4ERR_SEQ_FALSE_RETRY: | 479 | case -NFS4ERR_SEQ_FALSE_RETRY: |
481 | ++slot->seq_nr; | 480 | ++slot->seq_nr; |
482 | goto retry_nowait; | 481 | goto retry_nowait; |
@@ -567,6 +566,7 @@ int nfs41_setup_sequence(struct nfs4_session *session, | |||
567 | slot->slot_nr, slot->seq_nr); | 566 | slot->slot_nr, slot->seq_nr); |
568 | 567 | ||
569 | res->sr_slot = slot; | 568 | res->sr_slot = slot; |
569 | res->sr_timestamp = jiffies; | ||
570 | res->sr_status_flags = 0; | 570 | res->sr_status_flags = 0; |
571 | /* | 571 | /* |
572 | * sr_status is only set in decode_sequence, and so will remain | 572 | * sr_status is only set in decode_sequence, and so will remain |