Received: by 2002:a05:6a10:3150:0:0:0:0 with SMTP id m16csp2135810pxc; Wed, 30 Mar 2022 20:27:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz5BjthZoHTMSX43h2s71IpUKON1Cr4210oUxJNAjEdaj5ua2hcSEGPBpf5Q8B6CPJ79Baf X-Received: by 2002:a17:903:2305:b0:154:4aa2:e800 with SMTP id d5-20020a170903230500b001544aa2e800mr2864576plh.167.1648697259877; Wed, 30 Mar 2022 20:27:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648697259; cv=none; d=google.com; s=arc-20160816; b=r7ZcWV1Q1IrdKfVYJOHj5kY9KJ44ZFywoozRDiUniYTtmeKAnETb3g79FicpY20Mxy Wc+bnVYa37w1Ly5s8gTjAX5JuPkeJSCuH0GkT4s56EztxzYU+rpZNZNxNLjX/G6d/2ud Ew5waWkgcBulFFgz6zLlwD1oNPy8LfC71wMhkxzmAClv/4uHvmIblZLuZoGB5DY9TfeA a0B6GYrSZCqxcYcsRCzEwdxtjdXmAo7wfS3bzjQ5R6ITnZhHQyHodTObUPPfoQXAMt9+ RrX4r+nUDh5X5euMS4kW+bj1+KaQYVFh61dL4a6vHd5fjfREH9uWaodbkPhQs5K6kXf7 zjnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature:dkim-filter; bh=l9GumFcfnlmaNWcSMrOGkOAd+cs63zZNeRtR5T9YlIM=; b=QsTkYREjBE4yDTBqfPLqAJKJfXtRqFrhjqppqJQx8oSpiuvY8yja0Ks0Gd/sVLICPE vpETgZUvBPeiA8apveI0hUFMwnAHDseBcF4RJGxC2VWJ+Qms+v6MODwsS0NZMOwQa0eZ i+QbWcRwRZBB752HxZ1SilJvDlO8JhH6kYils6dn1ax4VJb2LS4LL2zJJmkDfzhs22tA m1OIaE18ubGQd3W2qZJSAO9dGI6M/Zk6/1UjnmbPOnNwcyKOlRxEC5ZouCE5ETRhoNuU 18gG8OSHy3sgkCqP6bugF0oUJyZ3meGAmrfvZfU+ATONRQxHTNb3wkYzwr0YIiHVgJlU iPFw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@fieldses.org header.s=default header.b=Rm0+h9oe; spf=softfail (google.com: domain of transitioning linux-nfs-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id g20-20020a170902869400b00153b2d164aasi21998505plo.178.2022.03.30.20.27.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Mar 2022 20:27:39 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-nfs-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@fieldses.org header.s=default header.b=Rm0+h9oe; spf=softfail (google.com: domain of transitioning linux-nfs-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 6758C167DB; Wed, 30 Mar 2022 19:54:18 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230273AbiC3Bu0 (ORCPT + 99 others); Tue, 29 Mar 2022 21:50:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55124 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233672AbiC3Bu0 (ORCPT ); Tue, 29 Mar 2022 21:50:26 -0400 Received: from fieldses.org (fieldses.org [IPv6:2600:3c00:e000:2f7::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DAAE11260E; Tue, 29 Mar 2022 18:48:39 -0700 (PDT) Received: by fieldses.org (Postfix, from userid 2815) id 1CD497113; Tue, 29 Mar 2022 21:48:39 -0400 (EDT) DKIM-Filter: OpenDKIM Filter v2.11.0 fieldses.org 1CD497113 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fieldses.org; s=default; t=1648604919; bh=l9GumFcfnlmaNWcSMrOGkOAd+cs63zZNeRtR5T9YlIM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Rm0+h9oeeFazJ7wvJdOtHbtwwZEQ9UC4IQIG+Cg6yeBW7yzYOVcqp43VZXjTddG3E IYiqhlecLNkREkkc8+Mgp8J3GUgzQqmPtaP4x8XYeG2DMgVQ3ZARRrcie/JqE9XY/J 8lo1xcAwaolg8n9jDAdHC7ZGb8JP1/RokJ7CUDRo= Date: Tue, 29 Mar 2022 21:48:39 -0400 From: "J. Bruce Fields" To: dai.ngo@oracle.com Cc: chuck.lever@oracle.com, jlayton@redhat.com, viro@zeniv.linux.org.uk, linux-nfs@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: Re: [PATCH RFC v18 02/11] NFSD: Add courtesy client state, macro and spinlock to support courteous server Message-ID: <20220330014839.GH32217@fieldses.org> References: <1648182891-32599-1-git-send-email-dai.ngo@oracle.com> <1648182891-32599-3-git-send-email-dai.ngo@oracle.com> <20220329154750.GE29634@fieldses.org> <612ef738-20f6-55f0-1677-cc035ba2fd0d@oracle.com> <20220329163011.GG29634@fieldses.org> <5cddab8d-dd92-6863-78fd-a4608a722927@oracle.com> <20220329183916.GC32217@fieldses.org> <593317f2-b4d6-eac1-7886-48a7271871e8@oracle.com> <20220330001239.GG32217@fieldses.org> <24d6dcff-33fd-99c1-c920-9bf56f672a6e@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <24d6dcff-33fd-99c1-c920-9bf56f672a6e@oracle.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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, Mar 29, 2022 at 06:17:29PM -0700, dai.ngo@oracle.com wrote: > > On 3/29/22 5:12 PM, J. Bruce Fields wrote: > >On Tue, Mar 29, 2022 at 02:45:28PM -0700, dai.ngo@oracle.com wrote: > >>This does not prevent the courtesy client from doing trunking in all > >>cases. It is only prevent the courtesy client from doing trunking without > >>first reconnect to the server. > >> > >>I think this behavior is the same as if the server does not support courtesy > >>client; the server can expire the courtesy anytime it wants. If the > >>courtesy client reconnected successfully then by the time nfsd4_create_session/ > >>find_confirmed_client is called the client already becomes active > >>so the server will process the request normally. > >I'm not sure what you mean here. All a client has to do to reconnect is > >succesfully renew its lease. > > For 4.1 the client renews its lease via the SEQUENCE, either stand-alone > or in a compound. Once the SEQUENCE completes successfully then the > subsequent CREATE_SESSION is processed normally. However, if the client > did not send the SEQUENCE first then server returns BAD_SESSION for the > CREATE_SESSION request. > > > That doesn't necessarily require calling > >CREATE_SESSION again. > > > >>Also to handle cases when the courtesy client reconnects after it was in > >>EXPIRED state, we want to force the client to recover its state starting > >>with EXCHANGE_ID so we have to return BAD_SESSION on CREATE_SESSION request. > >The client should not have to send EXCHANGE_ID. > > For 4.1 the expired courtesy client must send EXCHANGE_ID to reconnect > to start new session. I don't see how the *expired* courtesy client can > access the export again without sending the EXCHANGE_ID. Attached is the > pcap that shows how the courtesy client recovers once it's in > CLIENT_EXPIRED state. Oh, sorry, sure, we're talking about an actual expired client. That's fine. --b.