Skip to content

Commit 4b54b85

Browse files
jtlaytonchucklever
authored andcommitted
nfsd: eliminate special handling of NFS4ERR_SEQ_MISORDERED
On a SEQ_MISORDERED error, the current code will reattempt the call, but set the slot sequence ID to 1. I can find no mention of this remedy in the spec, and it seems potentially dangerous. It's possible that the last call was sent with seqid 1, and doing this will cause a retransmission of the reply. Drop this special handling, and always treat SEQ_MISORDERED like BADSLOT. Retry the call, but leak the slot so that it is no longer used. Signed-off-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
1 parent 999595a commit 4b54b85

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

fs/nfsd/nfs4callback.c

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1388,21 +1388,17 @@ static bool nfsd4_cb_sequence_done(struct rpc_task *task, struct nfsd4_callback
13881388
goto requeue;
13891389
rpc_delay(task, 2 * HZ);
13901390
return false;
1391+
case -NFS4ERR_SEQ_MISORDERED:
13911392
case -NFS4ERR_BADSLOT:
13921393
/*
1393-
* BADSLOT means that the client and server are out of sync
1394-
* as to the backchannel parameters. Mark the backchannel faulty
1395-
* and restart the RPC, but leak the slot so no one uses it.
1394+
* A SEQ_MISORDERED or BADSLOT error means that the client and
1395+
* server are out of sync as to the backchannel parameters. Mark
1396+
* the backchannel faulty and restart the RPC, but leak the slot
1397+
* so that it's no longer used.
13961398
*/
13971399
nfsd4_mark_cb_fault(cb->cb_clp);
13981400
cb->cb_held_slot = -1;
13991401
goto retry_nowait;
1400-
case -NFS4ERR_SEQ_MISORDERED:
1401-
if (session->se_cb_seq_nr[cb->cb_held_slot] != 1) {
1402-
session->se_cb_seq_nr[cb->cb_held_slot] = 1;
1403-
goto retry_nowait;
1404-
}
1405-
break;
14061402
default:
14071403
nfsd4_mark_cb_fault(cb->cb_clp);
14081404
}

0 commit comments

Comments
 (0)