Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3732682pxj; Tue, 11 May 2021 10:41:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz23EWgBvIjPhb/Y9xvXtc/Ysj4tFy0xpvJl79x/a2ddRPwDrEYqbgMmF1GSyHmDHplUqrL X-Received: by 2002:a17:906:c297:: with SMTP id r23mr32962324ejz.144.1620754879667; Tue, 11 May 2021 10:41:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620754879; cv=none; d=google.com; s=arc-20160816; b=mXIy4SWGCY7Rkqs23Gbz7/eruT7YdcbfBvhFKuvz20J9D+pM+LMyWZUg9GYSeYjfRN eEodse6JQgVGKdvIrBSt5r1nTOIKAjtBE0yzTaFPi8Xv7Zf8VcXu6412y9pvt+qpzmH0 7dLnoVp1cW4P2n2TD4dvqNY8S7iGbiIUcUI3Bl+ASERp3P7Ua3hIkxTnN8UWtRdLJw9P B2P4sKmOU1X6FyIyoEOYlPOKKRz+S7KqY7onH/A9FC5EnuOOV2k7CKWAAf630O1mDynV NpoYqZBE4IKmJnJfTmv0d/TSzs0RUM/pwmJCbd3moeqZYMyjUeQ8OCPD+CWyS2tVdMXL qvUQ== 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=r+Ds+ndcSustXrpHJWSsrRfZEqkEYrNgVHGt8Ew3ncE=; b=oyxFKR/lfLCrl9xCdoz1jpEySmH7HGNrKjR4VXaOnNhAZn9krqBltX+mmbWfT2WyQe nvo6KQ0N4BLtIv/Q38nBWKDr0suFeWPS21UkDRtJpE/uG17Pd7uIDHKSh8of850wBjpE kNYOMeqwAqhU/rDTZezBqaXy7wbbV5QQPj3Cu5tls3/GQFtZmJoCvaYM0ZX0Xd4aqU9L CuvhFevOeuhEkDjPqy3w52PVtt3PgkdiQJcDlNhS6/XUPq2GOaeagqQpHV8Upa0JDZEt 1BvFO7uazaA/bFp3QlBqVnmsdNdXYo6r1TyP6l3mSUA5iYhPWwnPUBZXNenmicUdKTl5 kamQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@fieldses.org header.s=default header.b=KRohDGEV; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id jg13si16403526ejc.192.2021.05.11.10.40.56; Tue, 11 May 2021 10:41:19 -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; dkim=pass header.i=@fieldses.org header.s=default header.b=KRohDGEV; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231437AbhEKRjr (ORCPT + 99 others); Tue, 11 May 2021 13:39:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35552 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231407AbhEKRjr (ORCPT ); Tue, 11 May 2021 13:39:47 -0400 Received: from fieldses.org (fieldses.org [IPv6:2600:3c00:e000:2f7::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6C354C061574 for ; Tue, 11 May 2021 10:38:40 -0700 (PDT) Received: by fieldses.org (Postfix, from userid 2815) id C75974F7D; Tue, 11 May 2021 13:38:39 -0400 (EDT) DKIM-Filter: OpenDKIM Filter v2.11.0 fieldses.org C75974F7D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fieldses.org; s=default; t=1620754719; bh=r+Ds+ndcSustXrpHJWSsrRfZEqkEYrNgVHGt8Ew3ncE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=KRohDGEVWHaWJqNCurwCSs+YJkc9kP3OWbmBi7RsCAlg6kEWgRx8KQFqKDDyeXhuS BIz2r9JtnysB2siXtdiEc2FK7e+KeQ9ieZARhkiFpZGZczRgYER30Xh2V0yNxMV0kH xxzFxHBjqLNV8F8Ay2a1ZBwiJgjFe2rL7yQBkGU8= Date: Tue, 11 May 2021 13:38:39 -0400 From: Bruce Fields To: Chuck Lever III Cc: Linux NFS Mailing List , David Wysochanski Subject: Re: [PATCH RFC 21/21] NFSD: Add tracepoints to observe clientID activity Message-ID: <20210511173839.GB5416@fieldses.org> References: <162066179690.94415.203187037032448300.stgit@klimt.1015granger.net> <162066202717.94415.8666073108309704792.stgit@klimt.1015granger.net> <7922E4B6-BB7F-4D9E-B85D-D1A97835AF3F@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7922E4B6-BB7F-4D9E-B85D-D1A97835AF3F@oracle.com> User-Agent: Mutt/1.5.21 (2010-09-15) Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org On Tue, May 11, 2021 at 03:59:00PM +0000, Chuck Lever III wrote: > As Dave reported yesterday, this patch is unfinished and is probably > junk. But any thoughts on how the tracepoints should be organized > in this code would help. > > So I was thinking we probably want a tracepoint to fire for each > case that is handled in this code (and in nfsd4_exchangeid). > However, this comment in nfsd4_setclientid: > > /* Cases below refer to rfc 3530 section 14.2.33: */ > > Is confusing. > > - RFC 3530 is superceded by RFC 7530, and the section numbers have changed. > > - The cases in this section in both RFCs aren't numbered, they are > bullet points. Honestly I think those particular comments should just go. The code doesn't even follow those bullet points very closely any more. --b. diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index f47f72bc871f..2aa5d15b08ed 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c @@ -3954,11 +3954,9 @@ nfsd4_setclientid(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, new = create_client(clname, rqstp, &clverifier); if (new == NULL) return nfserr_jukebox; - /* Cases below refer to rfc 3530 section 14.2.33: */ spin_lock(&nn->client_lock); conf = find_confirmed_client_by_name(&clname, nn); if (conf && client_has_state(conf)) { - /* case 0: */ status = nfserr_clid_inuse; if (clp_used_exchangeid(conf)) goto out; @@ -3970,7 +3968,6 @@ nfsd4_setclientid(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, unconf = find_unconfirmed_client_by_name(&clname, nn); if (unconf) unhash_client_locked(unconf); - /* We need to handle only case 1: probable callback update */ if (conf && same_verf(&conf->cl_verifier, &clverifier)) { copy_clid(new, conf); gen_confirm(new, nn);