Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp528353pxb; Thu, 19 Aug 2021 05:31:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzjFRupCPq6VkyWsAXet9hEY+4QLQ4NdTV7hjKl8XKgepnv4LVVxRuAasYKKTvqUD2gPiI+ X-Received: by 2002:a02:c768:: with SMTP id k8mr12524337jao.71.1629376267276; Thu, 19 Aug 2021 05:31:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629376267; cv=none; d=google.com; s=arc-20160816; b=XgLOq6962K19PSnnVmE15MReJhrO6Psyy8nULqlGw3HUz4jmZZWrc1s0CN9zRKjL5x viVe5WJdDR7rZTk4GUm9+hkarCjNQkL9/JgmxxMifQgFf54cw8/y7Wx8vDTcK3cQFyHR 1ddlIztmQxv/Y3TflZf1BFzxaA3JJGV9Yfwj7KPaj3TgTt6R4ycKEIDgJe6l7x/vTNQW QNG2BoEKTCdDb9Dz/676pLqa+JAJCLfO593jFhRMAvOcT/eosHqi6Tf1Y98nXz56TRhg vQyzdGerRo5QZ4NCD7Wvic4pyCuZjJRv11Li4quj18ZdqZ023N+ll7BM4pjpwTe9Paf9 suaQ== 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:message-id:date:to:from:subject; bh=NJ7klQuE+CgyIPSafOA6HsspphnXJ+x6Dtr7HKlmAtI=; b=0lpFZO5Tl/4V2hbqtXG7PZ3OMFfEY4WRAv3dau4if40+Zm3XN/IszfNxhi4G33PjM/ F0YsqMgn5ow/1DAnHhAtLaO64ljpUr6OHM0Epq8HoG2kYwAh+RNMYFBu1PofwTHDjEyW Dp4RnsjM3e9DFzapxEWhDoTlkCCLp6UwdAZuJYAqoPvsgXYcHaj2ymNntwanZhAdQRH5 cev0vvVFH5zwBDlctly+RKMinRX1YcVGZwoANbMBs/EuLSdiDaSoRo5RJWWlnuutAKRd yql0Ce4lckosgPygXIgwPBeaFhuMATp0hFdiC60G/C1RgLF1ASmOoaqJR/rAPwusLj7D +LQA== 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 h10si2840277ioe.21.2021.08.19.05.30.40; Thu, 19 Aug 2021 05:31:07 -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 S235449AbhHSMaC (ORCPT + 99 others); Thu, 19 Aug 2021 08:30:02 -0400 Received: from mail.kernel.org ([198.145.29.99]:47224 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231179AbhHSMaB (ORCPT ); Thu, 19 Aug 2021 08:30:01 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 8F7E561100 for ; Thu, 19 Aug 2021 12:29:25 +0000 (UTC) Subject: [PATCH v1] SUNRPC: Ensure backchannel transports are marked connected From: Chuck Lever To: linux-nfs@vger.kernel.org Date: Thu, 19 Aug 2021 08:29:24 -0400 Message-ID: <162937592206.2298.13447589794033256951.stgit@klimt.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 With NFSv4.1+ on RDMA, backchannel recovery appears not to work. xprt_setup_xxx_bc() is invoked by the client's first CREATE_SESSION operation, and it always marks the rpc_clnt's transport as connected. On a subsequent CREATE_SESSION, if rpc_create() is called and xpt_bc_xprt is populated, it might not be connected (for instance, if a backchannel fault has occurred). Ensure that code path returns a connected xprt also. Reported-by: Timo Rothenpieler Signed-off-by: Chuck Lever --- net/sunrpc/clnt.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c index 8b4de70e8ead..570480a649a3 100644 --- a/net/sunrpc/clnt.c +++ b/net/sunrpc/clnt.c @@ -535,6 +535,7 @@ struct rpc_clnt *rpc_create(struct rpc_create_args *args) xprt = args->bc_xprt->xpt_bc_xprt; if (xprt) { xprt_get(xprt); + xprt_set_connected(xprt); return rpc_create_xprt(args, xprt); } }