Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp503506pxv; Wed, 14 Jul 2021 08:51:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxevQ/1jW8mku3p710/2FJiEwfLh+MNoa7wv1Al97yHPgvz4V2m4FqSi6sYkxcT0Hh1Yt5s X-Received: by 2002:a05:6402:31bb:: with SMTP id dj27mr7971362edb.375.1626277860036; Wed, 14 Jul 2021 08:51:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626277860; cv=none; d=google.com; s=arc-20160816; b=bWcr/0CkSTUuCv18525tsPWh7swQ5ZikjwY6ikAJaQZ12zs7F7tCLx+KfYLME2X+bV IKPhYD5El4cthNewAo3wUXVNTUPGmB1dPiidmXOSDCadsX6wJqrdYp6M47imN8j+xt9v LRn1JY3AgAk8kZd0FtoXi2+0ttGwTJ87cwwVXsmXJrQV5a9TbDsBK1nr3bW2guyc/17w qsqjwLUCQQOLU7tBkUxAMvMSiezrQ9DYC1B39WzsXAW+Eh5bm9gl5/j1Keei/wpUf2rk q3BIikKRYubYbv6IiypNp8QnyrfNj4GEk+cZxaEp3EpuNH3ghzLxKRtt/bNbP5WY5psc KdEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:to:from:subject; bh=49va+/zvoac5dxIRmpVqN/VTJ1tw0i8icccgAoURYVk=; b=gIcoMkN3eNslNJt/mvW+HJ9u+FGGZJtO7M3cgIYkgtRl3+FJpPtZb7yXqT4M5u6xpS AOUwxVDuHXAYZDtqd+XCzc0WwQszSiHVGCHb0n4p6VRRj5FtnIiHPEnri3Bice85bbAf R9hqTQ2Vwq35fo/787aHQnZQAgRKUOxugpe6VzB2cY3uwhWG3HYspFbiCMnj2r3dqu5R tnIc4grylqnCuLcw5Ox/YiWvTuXcYjmjzCdCXbXH4R+88W6rX6x/hgV2U+9/qHm+ojqO DkZbMzdUtpU+6Qub9Fvlw5lO5ys1AWCQv+1Dw54A4ru18+uHkYs5BVbtTvIr2GVK7UK9 W3Nw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p26si3289942edx.381.2021.07.14.08.50.36; Wed, 14 Jul 2021 08:51:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239674AbhGNPxQ (ORCPT + 99 others); Wed, 14 Jul 2021 11:53:16 -0400 Received: from mail.kernel.org ([198.145.29.99]:41136 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239625AbhGNPxQ (ORCPT ); Wed, 14 Jul 2021 11:53:16 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 546F9613BE for ; Wed, 14 Jul 2021 15:50:24 +0000 (UTC) Subject: [PATCH RFC 2/4] NFS: Unset RPC_TASK_NO_RETRANS_TIMEOUT for session/clientid destruction From: Chuck Lever To: linux-nfs@vger.kernel.org Date: Wed, 14 Jul 2021 11:50:23 -0400 Message-ID: <162627782362.1294.9395366920293772038.stgit@manet.1015granger.net> In-Reply-To: <162627611661.1294.9189768423517916152.stgit@manet.1015granger.net> References: <162627611661.1294.9189768423517916152.stgit@manet.1015granger.net> User-Agent: StGit/1.1 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org In some rare failure modes, the server is actually reading the transport, but then just dropping the requests on the floor. TCP_USER_TIMEOUT cannot detect that case. Prevent such a stuck server from pinning client resources indefinitely by ensuring that session and client ID clean-up can time out even if the connection is still operational. Signed-off-by: Chuck Lever --- fs/nfs/nfs4client.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/nfs/nfs4client.c b/fs/nfs/nfs4client.c index 28431acd1230..c5032f784ac0 100644 --- a/fs/nfs/nfs4client.c +++ b/fs/nfs/nfs4client.c @@ -281,6 +281,7 @@ static void nfs4_destroy_callback(struct nfs_client *clp) static void nfs4_shutdown_client(struct nfs_client *clp) { + clp->cl_rpcclient->cl_noretranstimeo = 0; if (__test_and_clear_bit(NFS_CS_RENEWD, &clp->cl_res_state)) nfs4_kill_renewd(clp); clp->cl_mvops->shutdown_client(clp);