From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6E3A14F8B0; Tue, 23 Jan 2024 01:50:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705974647; cv=none; b=cbPECu2JiGZrM+aGwQ9rlZDLhFqqIh0p/QuCMY0Vq/DbdqjUNNrzZ6OxZaTASF9jh4NjS4F6cLQ+V5M9CVzst7rSuoLB1FkZxGyb2TObEHgtACgNM77shPNe2w+y53YP9R/xzVtjPeGGrOIdQmp2Ailva4tzdW9X7ExdwhdAtFg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705974647; c=relaxed/simple; bh=/g1RH9JnP1dxFgNxs8nXVe4OI1Yyx0RCI6fgxn1Ej7M=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=u4oDZGWAJahXD/9ciBjyQa9B/vArMuRY/PqcV2EBEICJXBpjbKNLKVYfKvQhmIpdqfujOj2dJbC/cN+3dk2VzmTuDUtEPwMyGn+d1NJXyX2D4LRhZvgedy8uEXtQosOLziHgxhE4fm4DKHB18BqqQBHtBBEOUHfEBp9afvwv5zY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Qy2GPLBl; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="Qy2GPLBl" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 35525C433C7; Tue, 23 Jan 2024 01:50:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1705974647; bh=/g1RH9JnP1dxFgNxs8nXVe4OI1Yyx0RCI6fgxn1Ej7M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Qy2GPLBlnSpvyNXnchfwIsP/Xdgfl1RMxwlnxcKJfB4yMvddY95QJt80fYSm/5ibG nxalHsH3gW/QKesXhzFMZX3Zs1Ibxvb1Da+b0xXy/OxLBARybQnoWdgB6z0ri4K1kK vsg5h5wfoRDyw7JtPDXYGWaRF0t93FqxdtjSGHyY= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Trond Myklebust , Anna Schumaker , Sasha Levin Subject: [PATCH 6.6 078/583] NFSv4.1/pnfs: Ensure we handle the error NFS4ERR_RETURNCONFLICT Date: Mon, 22 Jan 2024 15:52:09 -0800 Message-ID: <20240122235814.546721499@linuxfoundation.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240122235812.238724226@linuxfoundation.org> References: <20240122235812.238724226@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.6-stable review patch. If anyone has any objections, please let me know. ------------------ From: Trond Myklebust [ Upstream commit 037e56a22ff37f9a9c2330b66cff55d3d1ff9b90 ] Once the client has processed the CB_LAYOUTRECALL, but has not yet successfully returned the layout, the server is supposed to switch to returning NFS4ERR_RETURNCONFLICT. This patch ensures that we handle that return value correctly. Fixes: 183d9e7b112a ("pnfs: rework LAYOUTGET retry handling") Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker Signed-off-by: Sasha Levin --- fs/nfs/nfs4proc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index 0ff913b4e9e0..e8b52e36906c 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c @@ -170,6 +170,7 @@ static int nfs4_map_errors(int err) case -NFS4ERR_RESOURCE: case -NFS4ERR_LAYOUTTRYLATER: case -NFS4ERR_RECALLCONFLICT: + case -NFS4ERR_RETURNCONFLICT: return -EREMOTEIO; case -NFS4ERR_WRONGSEC: case -NFS4ERR_WRONG_CRED: @@ -558,6 +559,7 @@ static int nfs4_do_handle_exception(struct nfs_server *server, case -NFS4ERR_GRACE: case -NFS4ERR_LAYOUTTRYLATER: case -NFS4ERR_RECALLCONFLICT: + case -NFS4ERR_RETURNCONFLICT: exception->delay = 1; return 0; @@ -9662,6 +9664,7 @@ nfs4_layoutget_handle_exception(struct rpc_task *task, status = -EBUSY; break; case -NFS4ERR_RECALLCONFLICT: + case -NFS4ERR_RETURNCONFLICT: status = -ERECALLCONFLICT; break; case -NFS4ERR_DELEG_REVOKED: -- 2.43.0