]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commitdiff
NFSv4.1: Handle NFS4ERR_BADSESSION/NFS4ERR_DEADSESSION replies to OP_SEQUENCE
authorTrond Myklebust <trond.myklebust@primarydata.com>
Mon, 5 Dec 2016 00:26:40 +0000 (19:26 -0500)
committerTrond Myklebust <trond.myklebust@primarydata.com>
Mon, 5 Dec 2016 00:26:40 +0000 (19:26 -0500)
In the case where SEQUENCE receives a NFS4ERR_BADSESSION or
NFS4ERR_DEADSESSION error, we just want to report the session as needing
recovery, and then we want to retry the operation.

Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
fs/nfs/nfs4proc.c

index f992281c9b29c2e02401d8af6228b6a2d6a9641d..4fd0e2b7b08e1d1c52916bfa791c95e774ca1253 100644 (file)
@@ -816,6 +816,10 @@ static int nfs41_sequence_process(struct rpc_task *task,
        case -NFS4ERR_SEQ_FALSE_RETRY:
                ++slot->seq_nr;
                goto retry_nowait;
+       case -NFS4ERR_DEADSESSION:
+       case -NFS4ERR_BADSESSION:
+               nfs4_schedule_session_recovery(session, res->sr_status);
+               goto retry_nowait;
        default:
                /* Just update the slot sequence no. */
                slot->seq_done = 1;