Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1143465imm; Wed, 1 Aug 2018 10:54:51 -0700 (PDT) X-Google-Smtp-Source: AAOMgpd66dgxnAX2lQmbGK2I7fp8Y/YHaKbyhAuxo+1UlGY4Pr2OGFhUdPGHXZRipBYB0Ilez1Yb X-Received: by 2002:a62:8d7:: with SMTP id 84-v6mr27913586pfi.172.1533146091903; Wed, 01 Aug 2018 10:54:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533146091; cv=none; d=google.com; s=arc-20160816; b=dRtlmRMj+8j2nA1F87nywZ8wXC8tottIh8MLd2C9c6wfo9hVkAy80hh4VeX+jVDod9 XvhosCFLysyG+nnrQVgXimWzjcQMr1EdPhlBWOZaIbBBZpx2ei8KgHpDCfBcpE/eKFtF 0a2GCXuaGggQdbTf8C6aTYrQM2bQs4q5VO7LWwMuC0UWc/JTBzy6EdAVCzHyEuUy1Uft /8gnpEiwfDklrsulVRyWK/3XRLInN4xTBbKOubkuagZ6QuvPEgrVn9Sh0X6O1GjDs/6e n69WIGdRK2j0u5Pu23rIkDNP6R64PTcnNxlrBxVQzs6YQzGZF9uOnDALbggU2btnJdyr ZtTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=hJdjypzXtXxo9fIzxFSOvGQIpgP9NeNNnIEZUCpm2E0=; b=sUHk6XOisGVjOnuOcCptL2WW0BRxAn3Sy+/ihD71jlxlSucCwL+5/hrVOFRLOcEPtt VkGkrqim3aIikKNS43NdM/b0fVOqw/roDhCJ4ecwhFQpLpvd6lG3PAtaMEuQUcBum41g o5/A2cQbvlHGhUGURCZriBPWHg7u8Pxp5Rk5jrxwDeWjSUaMgHkm9jp3Gois0GVJ/jg/ XHslq+wBa53sDoobBro1x/Fve+jVbPThxxrpZJPlY3vYrWplfBaeI683C5uHGH8nHXJa zE99gqIz9/yNU6Ja4NioXo16btlBs6JB4hQ08vmEb0lTViR5raIivu/MY0ZSHd2mQd16 R52A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 184-v6si17706150pfe.249.2018.08.01.10.54.37; Wed, 01 Aug 2018 10:54:51 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2404649AbeHATjr (ORCPT + 99 others); Wed, 1 Aug 2018 15:39:47 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:50224 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2406010AbeHATIl (ORCPT ); Wed, 1 Aug 2018 15:08:41 -0400 Received: from localhost (D57E6652.static.ziggozakelijk.nl [213.126.102.82]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 4815B13AC; Wed, 1 Aug 2018 17:15:06 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Trond Myklebust , Sasha Levin Subject: [PATCH 4.14 026/246] NFSv4.1: Fix the client behaviour on NFS4ERR_SEQ_FALSE_RETRY Date: Wed, 1 Aug 2018 18:48:56 +0200 Message-Id: <20180801165012.954727937@linuxfoundation.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180801165011.700991984@linuxfoundation.org> References: <20180801165011.700991984@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Trond Myklebust [ 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 Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- fs/nfs/nfs4proc.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c @@ -745,6 +745,13 @@ static int nfs41_sequence_process(struct 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 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;