Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 346579
b: refs/heads/master
c: 933602e
h: refs/heads/master
i:
  346577: 0e90a8b
  346575: 6b039eb
v: v3
  • Loading branch information
Trond Myklebust authored and Trond Myklebust committed Nov 21, 2012
1 parent 3a07d06 commit 864d3cd
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9216106a847a53e6d0fe6d11dfd9175f2ca7fccf
refs/heads/master: 933602e368c4452260c9bff4fbb3baba35cf987a
15 changes: 9 additions & 6 deletions trunk/fs/nfs/nfs4proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -486,6 +486,7 @@ static void nfs41_sequence_free_slot(struct nfs4_sequence_res *res)

static int nfs41_sequence_done(struct rpc_task *task, struct nfs4_sequence_res *res)
{
struct nfs4_slot *slot;
unsigned long timestamp;
struct nfs_client *clp;

Expand All @@ -502,12 +503,14 @@ static int nfs41_sequence_done(struct rpc_task *task, struct nfs4_sequence_res *
if (!RPC_WAS_SENT(task))
goto out;

slot = res->sr_slot;

/* Check the SEQUENCE operation status */
switch (res->sr_status) {
case 0:
/* Update the slot's sequence and clientid lease timer */
++res->sr_slot->seq_nr;
timestamp = res->sr_renewal_time;
++slot->seq_nr;
timestamp = slot->renewal_time;
clp = res->sr_session->clp;
do_renew_lease(clp, timestamp);
/* Check sequence flags */
Expand All @@ -521,12 +524,12 @@ static int nfs41_sequence_done(struct rpc_task *task, struct nfs4_sequence_res *
*/
dprintk("%s: slot=%td seq=%d: Operation in progress\n",
__func__,
res->sr_slot - res->sr_session->fc_slot_table.slots,
res->sr_slot->seq_nr);
slot - res->sr_session->fc_slot_table.slots,
slot->seq_nr);
goto out_retry;
default:
/* Just update the slot sequence no. */
++res->sr_slot->seq_nr;
++slot->seq_nr;
}
out:
/* The session may be reset by one of the error handlers. */
Expand Down Expand Up @@ -637,14 +640,14 @@ int nfs41_setup_sequence(struct nfs4_session *session,

rpc_task_set_priority(task, RPC_PRIORITY_NORMAL);
slot = tbl->slots + slotid;
slot->renewal_time = jiffies;
args->sa_session = session;
args->sa_slotid = slotid;

dprintk("<-- %s slotid=%d seqid=%d\n", __func__, slotid, slot->seq_nr);

res->sr_session = session;
res->sr_slot = slot;
res->sr_renewal_time = jiffies;
res->sr_status_flags = 0;
/*
* sr_status is only set in decode_sequence, and so will remain
Expand Down
2 changes: 1 addition & 1 deletion trunk/include/linux/nfs_xdr.h
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ struct nfs4_channel_attrs {

/* nfs41 sessions slot seqid */
struct nfs4_slot {
unsigned long renewal_time;
u32 seq_nr;
};

Expand All @@ -200,7 +201,6 @@ struct nfs4_sequence_res {
struct nfs4_session *sr_session;
struct nfs4_slot *sr_slot; /* slot used to send request */
int sr_status; /* sequence operation status */
unsigned long sr_renewal_time;
u32 sr_status_flags;
};

Expand Down

0 comments on commit 864d3cd

Please sign in to comment.