Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp4618369ybe; Mon, 16 Sep 2019 15:36:41 -0700 (PDT) X-Google-Smtp-Source: APXvYqymVgRbeXhGrK1dwd2IfB7w4WGzG7BGuvU7XPdNZyU2ZHHtOfe+Sv3rr/dPMCnAivsMgcim X-Received: by 2002:a50:9e26:: with SMTP id z35mr1593781ede.265.1568673401166; Mon, 16 Sep 2019 15:36:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568673401; cv=none; d=google.com; s=arc-20160816; b=upZogP05nuyIMgQbbMgZuM6w096b9hQUZl+4yjvhEOcWrP3RlIYBgZbWJwnvB8yMj3 ytmKF1Ou0ATby7GXjcuK2hMqbfWu+RkHyh8raX+r8b0Tl3dCeW3M1daZkXXreOuFXhgk gH4+UvgvecViCPebHIi0MZ3bhn/PjBs3B5U3PPFYL4q7WtW5OfEK6sIXPmmKjcd8DPOB 0qrn3gAAAA1oKWJ1g2PjMkquviFG/TEMs35nNgBzU5N0kbq7VWr3IvFIiiWqrarRmQsy uCjt6DN/Pmm04RomC2bo8EAKGGzT1SYyx6c9Qpgllkd12ZxQT9KvFAF80CKHk4n5Ha6Z U4nA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=J/GVnqkPBoCv5U4dJF5GCvANtn9QnHDChOd9TrjN6yM=; b=pjaC/VTtvnQV02UTzw7BWTj3QZ6b3d6kNW6VVtN7P+qjLX0PYWfzKJejJXOuxjDQ6O dzVIbTEqgyokJoclKGe8fdexBTdnfQOu9i5s9m5hQkznQqjCf1NPJXC6Y7ctiSbqP2IA psPJIRr/edes9FQqY4ZnsY/44MRMDwVN9LSf1N7MRgNvPo/9fP+zUBTa8DZiaDluqAQP N4IdmLQJJLLwVFBZD5r518ZhdTx6Hmy/5t8+d74h/4aXkGMrnj7z1pzj+76eVbxPZOvl 96y49nfqfXhg22PQBsTfXMCwIa2nHJNUZ06VTG0hRaNiPKFKdUroH9hO6rSwxs3KVBH+ KwQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=hQceF6fh; spf=pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id jx9si141486ejb.218.2019.09.16.15.36.17; Mon, 16 Sep 2019 15:36:41 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=hQceF6fh; spf=pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387682AbfIPUqa (ORCPT + 99 others); Mon, 16 Sep 2019 16:46:30 -0400 Received: from mail-io1-f67.google.com ([209.85.166.67]:45443 "EHLO mail-io1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387596AbfIPUqa (ORCPT ); Mon, 16 Sep 2019 16:46:30 -0400 Received: by mail-io1-f67.google.com with SMTP id f12so2197679iog.12 for ; Mon, 16 Sep 2019 13:46:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=J/GVnqkPBoCv5U4dJF5GCvANtn9QnHDChOd9TrjN6yM=; b=hQceF6fhAx1xDuK/qwPYfUSsgcui+y/THlOsBNucaKBBVhJ5DmuoLAFqFcTXAbCNl3 hEo5NlLGpe6y+PE6IjgnyH+enwCN2JUKXXmD5WOXDCpFZCUy4Moj9Rf1/7D4fJOomeEN V77Z9LHgUVyZa4f7AHklCaeRSsgrVcwd/C/61Xe0Dj7kFnl154KEIGyKUho08Md08r/g LtIaKqTAO0r3fyza3TPFtsaFggt8EB+SuM+JyzCXAeaaxnMhF5nclTV0udArZKLfV/XX sjPDbbEMnSV5lK4153y7MM0Lo1juH2ep81GGZOhKwbacjPaAYj9mI+Lq6XMQ2PW0gAZ/ aeEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=J/GVnqkPBoCv5U4dJF5GCvANtn9QnHDChOd9TrjN6yM=; b=jvOPq2PBBOJs4stX4BDc60EojWQgEScIscMG/QZS5/NxfH8YqY7LaF3m/I6xxu1D6f A/dTMUL2HE4LwajL2dKzf4IB7ZOOsOpJVurZOWwk6qvHQiLu107fEGZXCmj8Y6F6ZIP2 sBsp2QPhX8JpKOtuvRs5nPs2Pwfb1c7Gy4pBQbb0r8rzBADthF6X+5VUcVIGLOWfGBtl DVFPoU0b5MP+x4vnFQ5/R9wjRaMY0vpWGGg9pYSMX192z6kmIFVZ9uNawa815aMB2E8a hKg/5ym9YD5VCYgnk0jj5PCbh7d1DIaEAAmELz27fEwz/VEIuEGvy1oQ1AePTsgFhC3K TFRA== X-Gm-Message-State: APjAAAWm2gTq5gN6/zS0RTs8YB2U5lDQuSKUvSLVzhJ2n1f2sIlkEp3b jmECU5TPHwwyrX5nkjLqKw== X-Received: by 2002:a5d:861a:: with SMTP id f26mr212959iol.197.1568666789617; Mon, 16 Sep 2019 13:46:29 -0700 (PDT) Received: from localhost.localdomain (c-68-40-189-247.hsd1.mi.comcast.net. [68.40.189.247]) by smtp.gmail.com with ESMTPSA id c6sm3528iom.34.2019.09.16.13.46.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Sep 2019 13:46:29 -0700 (PDT) From: Trond Myklebust X-Google-Original-From: Trond Myklebust To: Anna Schumaker Cc: Olga Kornievskaia , linux-nfs@vger.kernel.org Subject: [PATCH v2 3/9] NFSv4: Handle NFS4ERR_DELAY correctly in return-on-close Date: Mon, 16 Sep 2019 16:44:13 -0400 Message-Id: <20190916204419.21717-4-trond.myklebust@hammerspace.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190916204419.21717-3-trond.myklebust@hammerspace.com> References: <20190916204419.21717-1-trond.myklebust@hammerspace.com> <20190916204419.21717-2-trond.myklebust@hammerspace.com> <20190916204419.21717-3-trond.myklebust@hammerspace.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org If the server sends a NFS4ERR_DELAY, then allow the caller to retry. Signed-off-by: Trond Myklebust --- fs/nfs/pnfs.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c index 8769422a12f5..6436047dc999 100644 --- a/fs/nfs/pnfs.c +++ b/fs/nfs/pnfs.c @@ -1455,6 +1455,10 @@ int pnfs_roc_done(struct rpc_task *task, struct inode *inode, case 0: retval = 0; break; + case -NFS4ERR_DELAY: + /* Let the caller handle the retry */ + *ret = -NFS4ERR_NOMATCHING_LAYOUT; + return 0; case -NFS4ERR_OLD_STATEID: if (!nfs4_layoutreturn_refresh_stateid(&arg->stateid, &arg->range, inode)) -- 2.21.0