]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
NFSv4.1: Fix the client behaviour on NFS4ERR_SEQ_FALSE_RETRY
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Sat, 9 Jun 2018 23:10:31 +0000 (19:10 -0400)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 1 Mar 2019 13:20:29 +0000 (14:20 +0100)
BugLink: http://bugs.launchpad.net/bugs/1815234
[ Upstream commit f9312a541050007ec59eb0106273a0a10718cd83 ]

If the server returns NFS4ERR_SEQ_FALSE_RETRY or NFS4ERR_RETRY_UNCACHED_REP,
then it thinks we're trying to replay an existing request. If so, then
let's just bump the sequence ID and retry the operation.

Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
fs/nfs/nfs4proc.c

index 13c1ada250a1b3748b17df5a490578eadada2be5..6187ed35d18b82924e65611555081a6d45c04456 100644 (file)
@@ -745,6 +745,13 @@ static int nfs41_sequence_process(struct rpc_task *task,
                        slot->slot_nr,
                        slot->seq_nr);
                goto out_retry;
+       case -NFS4ERR_RETRY_UNCACHED_REP:
+       case -NFS4ERR_SEQ_FALSE_RETRY:
+               /*
+                * The server thinks we tried to replay a request.
+                * Retry the call after bumping the sequence ID.
+                */
+               goto retry_new_seq;
        case -NFS4ERR_BADSLOT:
                /*
                 * The slot id we used was probably retired. Try again
@@ -769,10 +776,6 @@ static int nfs41_sequence_process(struct rpc_task *task,
                        goto retry_nowait;
                }
                goto session_recover;
-       case -NFS4ERR_SEQ_FALSE_RETRY:
-               if (interrupted)
-                       goto retry_new_seq;
-               goto session_recover;
        default:
                /* Just update the slot sequence no. */
                slot->seq_done = 1;