Received: by 2002:a89:48b:0:b0:1f5:f2ab:c469 with SMTP id a11csp117285lqd; Tue, 23 Apr 2024 17:20:06 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVWZP0LKWYFa0ND36Avz9OugsK3Um7AKOzNwDAAcgUTk1CbRiZeLTb81zPc4SwWX85vUPW352RoDo7M5ynXuWEtgoWzxSw/yd94GNbHPg== X-Google-Smtp-Source: AGHT+IF8TRBG6RPoLS28dDKMcEYSr03plYng9JUYAXNdLka32WaMYd6BEMpAvAFAmYzSsR22fQSb X-Received: by 2002:a05:600c:470f:b0:419:a1b:d11f with SMTP id v15-20020a05600c470f00b004190a1bd11fmr515860wmo.17.1713918006768; Tue, 23 Apr 2024 17:20:06 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713918006; cv=pass; d=google.com; s=arc-20160816; b=IaHFhinCOZSrniQ3j1UfIM7wMpdNkcQTz2TOkfqKdaFjfkrh3TnoBeQyvUFkVaQZHR 8YNIyBIrMwdsNJ2hsCFen25qiuR9MhSDAalqvqtcZr8jKZUvoKLRS8D+Ob7LveCdZWJ4 wgArjJo4oLjyoW4f0dgP+0XsJqqN0TB5kgf0wRe/auOpW54UDjgw03IWHwzUF00GhNEJ Kh1xNRjYukg4Igq71IffWduKQ5gsZE9dgpKKLcrWlVtVGxqKxHdPpFIgo4ypdREyp0FU ewekULvRGrVcK7QhWmVy96hL7AoV7azhP/S93L5q97Sdhm7k8aBtIXs3oAZlHLoyjfHo DohA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:user-agent:references:in-reply-to :message-id:date:cc:to:from:subject:dkim-signature; bh=ODkzLY/SIFd57cBbMhsKSrZh4ZsKVspGbzYIltjhhhY=; fh=thufYBIxZ3G/U3ugXQXYrq6WxABTuxRMMyLlMpt5l3s=; b=ttg287/Un0oSAZ/RzqidLm2EtN3BRyaA3hlFIWMqY+gLm8jv+LeCHNNvPcNbRrrQHH hAaKQdpGmLKFtVj+oUo7IO+s1YNso1MVa0I3HJGBR+oY9wgpl/nhiz7E13LkorbfeaBF 0I2/T4LDfQpukPYbVwfFBmjHLALIBI0uKmDrHGfi+W3+ihvCh7AxnD6ib8JW9yl9uF0u g/ntZ0KxfZOu9ckY6CHv/GhIxfKa5ajGR1auxVd2SYFFJdKohcSJkrYiGWUuUdX6AMN6 lEIKJPFqco8JDADp00ve1zI43IpzJbYPWsQLESl7KxSzFV3psqDiMqmLpHcEh3IqodtV TwfA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=MAvrWj+d; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-nfs+bounces-2971-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-nfs+bounces-2971-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id y1-20020a056402358100b005722f84d542si269510edc.40.2024.04.23.17.20.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Apr 2024 17:20:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs+bounces-2971-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=MAvrWj+d; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-nfs+bounces-2971-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-nfs+bounces-2971-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 7612F1F21E5E for ; Wed, 24 Apr 2024 00:20:06 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9902D800; Wed, 24 Apr 2024 00:20:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="MAvrWj+d" X-Original-To: linux-nfs@vger.kernel.org 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 7497D7EF for ; Wed, 24 Apr 2024 00:20:03 +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=1713918003; cv=none; b=reLVL54BrrEXeTcXPgz8IE6WzKCyRU9UteyjfbARS1cSy+tJUQ90Y+rzXmVV3ho0ZwnKUj/9/TYFp0hZjQNnI1DbndEmOzPdLpLg/W/TNoleoU95lpCptFC9NeB5buIg7qkMi/8R43znW23/m5GiaINO46SuqppIPRQez5VPIEo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713918003; c=relaxed/simple; bh=KnRYrWXlVBWfQWyKXqm5lpx4+zHTJxEgtvHtVVFYoDU=; h=Subject:From:To:Cc:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=rBo8GamGMKrF5L/60ISrt6PHZgRmUgPStY8Qj9FM2XRyy8SgpPA9zXMKRq6g8RTqh44UzkPMVebRNR9BLw9XakieR3aQRFSa4CfAuqrQ/B3YTNg+LXUida54woET63ALe9+jrfluaayAUuEkYbFYhyr8F0+H2Nht7Fi+2okCPgA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=MAvrWj+d; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id B516FC116B1; Wed, 24 Apr 2024 00:20:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1713918003; bh=KnRYrWXlVBWfQWyKXqm5lpx4+zHTJxEgtvHtVVFYoDU=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=MAvrWj+d0a5bWmDeQ8fpfvfFKa8m2DehQV+4LfnhLnlFxPy52zdf/YgBF9mZri7Oc Dp8WxFwRlghkgH122Xlome7aC2rF1MmxGwZ2nG2EjlgvDnx6rHRalV0EmJz2n4JrBi RdjR+DS01pO+XAkioCDHryPk9bF76alqtFUG97wVvqzXC/yAqpeNWTp6ZXCx1z0TYk 6fZJlf5ZFUuvIn1F1sykv14RCS7GLwZ7v49oD+jd33Kvpm/6lAFMV8twX2cPt9cOgT IvpgjcEpEPhYt5/yu9uUwpyLHPP9u+kMHjnR3bk+S51mb3spIy8JKA7St/BmibXd2a 9vp+1NZbq9l1Q== Subject: [PATCH 1/2] Revert "NFSD: Reschedule CB operations when backchannel rpc_clnt is shut down" From: Chuck Lever To: linux-nfs@vger.kernel.org Cc: Dai Ngo , Chuck Lever Date: Tue, 23 Apr 2024 20:20:01 -0400 Message-ID: <171391800174.101038.3614787261244381619.stgit@klimt.1015granger.net> In-Reply-To: <171391782806.101038.14694256680827795210.stgit@klimt.1015granger.net> References: <171391782806.101038.14694256680827795210.stgit@klimt.1015granger.net> User-Agent: StGit/1.5 Precedence: bulk X-Mailing-List: linux-nfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit From: Chuck Lever The reverted commit attempted to enable NFSD to retransmit pending callback operations if an NFS client disconnects, but unintentionally introduces a hazardous behavior regression if the client becomes permanently unreachable while callback operations are still pending. A disconnect can occur due to network partition or if the NFS server needs to force the NFS client to retransmit (for example, if a GSS window under-run occurs). Reverting the commit will make NFSD behave the same as it did in v6.8 and before. Pending callback operations are permanently lost if the client connection is terminated before the client receives them. For some callback operations, this loss is not harmful. However, for CB_RECALL, the loss means a delegation might be revoked unnecessarily. For CB_OFFLOAD, pending COPY operations will never complete unless the NFS client subsequently sends an OFFLOAD_STATUS operation, which the Linux NFS client does not currently implement. These issues still need to be addressed somehow. Reported-by: Dai Ngo Link: https://bugzilla.kernel.org/show_bug.cgi?id=218735 Signed-off-by: Chuck Lever --- fs/nfsd/nfs4callback.c | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/fs/nfsd/nfs4callback.c b/fs/nfsd/nfs4callback.c index e440f72b9d4e..d153af81f406 100644 --- a/fs/nfsd/nfs4callback.c +++ b/fs/nfsd/nfs4callback.c @@ -986,14 +986,6 @@ static bool nfsd4_queue_cb(struct nfsd4_callback *cb) return queue_delayed_work(callback_wq, &cb->cb_work, 0); } -static void nfsd4_queue_cb_delayed(struct nfsd4_callback *cb, - unsigned long msecs) -{ - trace_nfsd_cb_queue(cb->cb_clp, cb); - queue_delayed_work(callback_wq, &cb->cb_work, - msecs_to_jiffies(msecs)); -} - static void nfsd41_cb_inflight_begin(struct nfs4_client *clp) { atomic_inc(&clp->cl_cb_inflight); @@ -1502,16 +1494,8 @@ nfsd4_run_cb_work(struct work_struct *work) clnt = clp->cl_cb_client; if (!clnt) { - if (test_bit(NFSD4_CLIENT_CB_KILL, &clp->cl_flags)) - nfsd41_destroy_cb(cb); - else { - /* - * XXX: Ideally, we could wait for the client to - * reconnect, but I haven't figured out how - * to do that yet. - */ - nfsd4_queue_cb_delayed(cb, 25); - } + /* Callback channel broken, or client killed; give up: */ + nfsd41_destroy_cb(cb); return; }