Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp1805038iof; Tue, 7 Jun 2022 11:37:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzub+TK6SuDLbBKA2VDghrsrHVYf68NKowE+9eYi1jvvaqEyd/KhkC8vFV1ra08g8ZRrHDV X-Received: by 2002:a17:90b:4b0a:b0:1e8:6ff0:7ec1 with SMTP id lx10-20020a17090b4b0a00b001e86ff07ec1mr16072908pjb.212.1654627036010; Tue, 07 Jun 2022 11:37:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654627036; cv=none; d=google.com; s=arc-20160816; b=kSO3QR+OdOUge732INUqWtEnOdTOsgUhb5bvWhgbs6z0WWUMIKDQcJ0X1/h5QKsMLq pTY7vOLUd8vHtT+D9555/nzW+Yqf5L/sleN94XS5M8ZsWb8cQZB5ANiGSO7OgVXJylGr d08kaXZogQOccOae2dSQ4k3cBsVsKIoqXHEr/KKwvtbHFWMiQqoQSomEwLakDVQylyzM LerZrX76J8v409ScqrYjPt3Jr8W0i05hBNB2dwKSo/zmRTU+/PARAWg0+Dy19Gwbwwjm JaemrekVT3y3Hs2LIvk6gr/A5yk5rRJRHh+96XrVyRa5YeHRFAPubOubWoXc8H6MPehh lH4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=n6Y93fPleTFQFrVAe0AlWrz8yqbC7RdrObBoVHNzB9I=; b=AX/MzjjIeN2AI28SRobThjHV6OgvijRMbsdQjx1o5r8ftUBCbOm+4sbWQuOtb9Sp/O PjB3UkMcWeulSDDWP7M6FxLPpAkA2Ltd3iovfo0aSYStORrGQRYY+KBj2+xqb1tdAl48 siDFmZ4nOjPaBZ4G59FxK/8gka7+eYaxKkg9vbPZibPuPaMPGpbP4RYWBQJJ8q+sNdwB RwsJkWxu3VNQgIxUShmyAwTqkBsfjxGaAHqLcRqKbvCs0rnndawM1LD6R7d2LBQMOT9O 6LgyHImxiH15O+CKAyY2DPOd+zWLfZaJ6+wSNQwIq3V24MP8MAJfrSNj4wvH6NyjgfXU Hh6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=uKj9padE; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t21-20020a634615000000b003fa1e2e80a9si23562651pga.659.2022.06.07.11.36.59; Tue, 07 Jun 2022 11:37:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=uKj9padE; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345697AbiFGRTF (ORCPT + 99 others); Tue, 7 Jun 2022 13:19:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37836 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345659AbiFGRS6 (ORCPT ); Tue, 7 Jun 2022 13:18:58 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 68C7F104CBD for ; Tue, 7 Jun 2022 10:18:55 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id A6CD5B822B4 for ; Tue, 7 Jun 2022 17:18:53 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6659EC36B0E for ; Tue, 7 Jun 2022 17:18:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1654622332; bh=F07bJEoT+m1KhPzKCPn4NYUlUGs7DKn+SxtiFkxAgN0=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=uKj9padEnWphqjrlo13wBH3DlJVSqlUvSfBBseq537+z2r4/t2AudIfRTPX09BL2x 7405UaHrZwzaVTPqLxVoPfNvoUNBELAOMAT0gF1qH7S33nJ3tPEID0YpoN44ldPT5F JVpPxQjSwrdWZosCpPY5qkPs4bdCMR5bXHvoqohCk8YtqrmSFZTRsMI0v6Knd4HFYh 6gB4Xr/8UoWU67Vl9lAKZR2rt+vaJ4ege3RIdUEkvWq9bbIGb5wAsOV4J947Zjaewx PWlJR/INDaYgbN/m63D+p3HCUo0WKq76AKvmcPhu+jyeMfKAF2MW946MUb5X3Ga/iG QVmzMFpamum4A== Received: by mail-wm1-f47.google.com with SMTP id z17so4834740wmi.1 for ; Tue, 07 Jun 2022 10:18:52 -0700 (PDT) X-Gm-Message-State: AOAM532Z1UT41nLlE8+h2t7ZJxqU5LLOCuQB6WEXc33ViNK01lnWdgmb 3DPCMm7qvDCtkrWcT4T3w/v4lalogTFNobiy9F8= X-Received: by 2002:a05:600c:4f51:b0:397:86a9:b827 with SMTP id m17-20020a05600c4f5100b0039786a9b827mr56525329wmq.114.1654622330875; Tue, 07 Jun 2022 10:18:50 -0700 (PDT) MIME-Version: 1.0 References: <20220601173449.155273-1-smayhew@redhat.com> In-Reply-To: From: Anna Schumaker Date: Tue, 7 Jun 2022 13:18:34 -0400 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] sunrpc: set cl_max_connect when cloning an rpc_clnt To: Scott Mayhew Cc: Trond Myklebust , Olga Kornievskaia , Linux NFS Mailing List Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-8.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org On Tue, Jun 7, 2022 at 8:53 AM Scott Mayhew wrote: > > On Mon, 06 Jun 2022, Anna Schumaker wrote: > > > Hi Scott, > > > > On Wed, Jun 1, 2022 at 1:34 PM Scott Mayhew wrote: > > > > > > If the initial attempt at trunking detection using the krb5i auth flavor > > > fails with -EACCES, -NFS4ERR_CLID_INUSE, or -NFS4ERR_WRONGSEC, then the > > > NFS client tries again using auth_sys, cloning the rpc_clnt in the > > > process. If this second attempt at trunking detection succeeds, then > > > the resulting nfs_client->cl_rpcclient winds up having cl_max_connect=0 > > > and subsequent attempts to add additional transport connections to the > > > rpc_clnt will fail with a message similar to the following being logged: > > > > > > [502044.312640] SUNRPC: reached max allowed number (0) did not add > > > transport to server: 192.168.122.3 > > > > Good catch! I was wondering if you could give me a "Fixes:" tag so it > > can be backported to stable? > > Fixes: dc48e0abee24 ("SUNRPC enforce creation of no more than max_connect xprts") Thanks! Applied for a -rc pull request > > > > > Thanks, > > Anna > > > > > > > > Signed-off-by: Scott Mayhew > > > --- > > > net/sunrpc/clnt.c | 1 + > > > 1 file changed, 1 insertion(+) > > > > > > diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c > > > index e2c6eca0271b..b6781ada3aa8 100644 > > > --- a/net/sunrpc/clnt.c > > > +++ b/net/sunrpc/clnt.c > > > @@ -651,6 +651,7 @@ static struct rpc_clnt *__rpc_clone_client(struct rpc_create_args *args, > > > new->cl_discrtry = clnt->cl_discrtry; > > > new->cl_chatty = clnt->cl_chatty; > > > new->cl_principal = clnt->cl_principal; > > > + new->cl_max_connect = clnt->cl_max_connect; > > > return new; > > > > > > out_err: > > > -- > > > 2.35.3 > > > > > >