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 16E93199230; Thu, 6 Jun 2024 14:21:51 +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=1717683711; cv=none; b=ZC+xm9gSYXN+HxqPkNxwCOfORZLnvUnToplN+ZBoK4gRoSGy3E2nbTzifo08Kd7oDpNNRoqwT342QePWZwsBlcpo9SKqr8iSFeA+o//S2pfkScu6C3htPKjQLWY8P4oaGg9bYqDtAtm2NPuFPmqXKOvs7KhLRaJgdhWjkpFMzHE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717683711; c=relaxed/simple; bh=jUDrbXe5o9YdqsNQjN7Rp0Ysaqz6sUIWX3WS1+YQd9g=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=GTs8stmjWzeyYhEznnixZhuE8g/J3XkacMwmLy+ZgE7TdWRLWG4MHbY8XETcXOKUYuwztlWJOHxrgoJPsGp3JoFD0TJoeJK2XYrnYvuJr5a+t0r8FAUuTqtIzdGNV+rxD/97z+nR1aYcvx18Ru1RjxzOOEy5bPXOvEt6C+6kBrQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=tRE1oXZJ; 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="tRE1oXZJ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id EAD39C32781; Thu, 6 Jun 2024 14:21:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1717683711; bh=jUDrbXe5o9YdqsNQjN7Rp0Ysaqz6sUIWX3WS1+YQd9g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tRE1oXZJsFDhpEGtaQwtG9bA2i8mSsF+qahzh8xQM0wPYfcwAEN891H2qGIjZevHk EDBU//mQAcK00NNEWojdKKN5YMPcHa5LqvVph5pHXS5ITsrQmPsMTW81d0SLd7Z1mK YGdKgzaPyqgUhWOCH3bt3sfj1CWGtti9isPVLsTA= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Chuck Lever , Benjamin Coddington , Dan Aloni , Trond Myklebust , Sasha Levin Subject: [PATCH 6.6 641/744] sunrpc: fix NFSACL RPC retry on soft mount Date: Thu, 6 Jun 2024 16:05:13 +0200 Message-ID: <20240606131753.033286055@linuxfoundation.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240606131732.440653204@linuxfoundation.org> References: <20240606131732.440653204@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: Dan Aloni [ Upstream commit 0dc9f430027b8bd9073fdafdfcdeb1a073ab5594 ] It used to be quite awhile ago since 1b63a75180c6 ('SUNRPC: Refactor rpc_clone_client()'), in 2012, that `cl_timeout` was copied in so that all mount parameters propagate to NFSACL clients. However since that change, if mount options as follows are given: soft,timeo=50,retrans=16,vers=3 The resultant NFSACL client receives: cl_softrtry: 1 cl_timeout: to_initval=60000, to_maxval=60000, to_increment=0, to_retries=2, to_exponential=0 These values lead to NFSACL operations not being retried under the condition of transient network outages with soft mount. Instead, getacl call fails after 60 seconds with EIO. The simple fix is to pass the existing client's `cl_timeout` as the new client timeout. Cc: Chuck Lever Cc: Benjamin Coddington Link: https://lore.kernel.org/all/20231105154857.ryakhmgaptq3hb6b@gmail.com/T/ Fixes: 1b63a75180c6 ('SUNRPC: Refactor rpc_clone_client()') Signed-off-by: Dan Aloni Reviewed-by: Benjamin Coddington Signed-off-by: Trond Myklebust Signed-off-by: Sasha Levin --- net/sunrpc/clnt.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c index f4d32cf2cd16a..d3c917c0c8d59 100644 --- a/net/sunrpc/clnt.c +++ b/net/sunrpc/clnt.c @@ -1056,6 +1056,7 @@ struct rpc_clnt *rpc_bind_new_program(struct rpc_clnt *old, .authflavor = old->cl_auth->au_flavor, .cred = old->cl_cred, .stats = old->cl_stats, + .timeout = old->cl_timeout, }; struct rpc_clnt *clnt; int err; -- 2.43.0