Received: by 2002:a05:6358:700f:b0:131:369:b2a3 with SMTP id 15csp679053rwo; Wed, 2 Aug 2023 02:18:46 -0700 (PDT) X-Google-Smtp-Source: APBJJlE5H9cdTjOPDN39Wr0K/PjZ64W4HfdSDPbC6dddiOJXnebchxaJH3maQbyfwk8WVeJ4I2Fr X-Received: by 2002:a05:6a20:441a:b0:13d:8876:4c97 with SMTP id ce26-20020a056a20441a00b0013d88764c97mr12710718pzb.16.1690967925791; Wed, 02 Aug 2023 02:18:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690967925; cv=none; d=google.com; s=arc-20160816; b=ykDQucMLJtZTpmxonk11Tw2rnt2z9bbAHR6RSfH9AuPZU1Z0X+GzSZCq1NGpikn7jP y5KSvT6Qb0d6xaaMxG7yIBg8ogfratAQMO71Nw/xYxEfdxGHMSlNRKQvoJptU/hGt9Yx 2V/D93VfjhEaPdtLj/Lm/GPYFYBp4dYYc/za9KHbz0+ofdjv1ZJ/0v9Ujw0V22rmTsZW Qfa9yBLFPw3TFWRI0sSQQBGgB+o50qDTpKy8g7EXzl6QaKh5yGGCGZJB0gxzg+x16f8m 4CQoG0yJHvQdFGTX2INKoHPF4oMo9/7/21Gw34VEnPNXrAFE5F6xVmYsCc4Bpj55fMSF ennQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=BsRdhAPoDFOlmfZATYPnuHgcjefANO1gCw0OykxlqrE=; fh=q79Es7ZYcrMZMzIdX5lm/pq9FQE5qYG8N3KztyKuq6s=; b=QnLqxRIi8kplvvaVLZ3ar8jZKEh8XjGIUEfHKmMGsGkAfBFwSTH2Q2auwO/XpuoTfC s+NIQhPuq8qwdcgbFpBbIwFEdC3IVoBlWVIbkRxBRwpOA+Njw7GcWMK/kWdVWGiYbVuJ iQ3K+UBXvw2hHV22sbe6PBZM/Ku/SrVdXHMvBnvLZAxFkA5/B1+NlSV2mryKDTaYMjOR 2mliYsFdyOA4Q4je0NeB+gI59Bjxri7fD1DTIz+lmTqwNVFaaf+iFbTOBz6VN/juv2b/ OGx4BjNX46SXCOpRMbkW9JHUvTZpbJga8LFSM1BG3n2J8dkIrWpphV7wZGwgyCqepBKY p6XA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=D3zye+1o; 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=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k185-20020a6284c2000000b00677eac1cd9dsi6620272pfd.329.2023.08.02.02.18.17; Wed, 02 Aug 2023 02:18:45 -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=@redhat.com header.s=mimecast20190719 header.b=D3zye+1o; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232746AbjHBJAD (ORCPT + 99 others); Wed, 2 Aug 2023 05:00:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56398 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232130AbjHBJAB (ORCPT ); Wed, 2 Aug 2023 05:00:01 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2B619115 for ; Wed, 2 Aug 2023 01:59:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1690966760; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=BsRdhAPoDFOlmfZATYPnuHgcjefANO1gCw0OykxlqrE=; b=D3zye+1oYz+o4pGJCWiEEae+xTmEBgJDwriypLJhbE8iG2e6CIXFx8yBa6NjBa+7b/a6Rm z7S7WqWDJw9Q/jPivmlxkm7/jR/lUzuKUfYN5kg/sFFk+YQf+P3C0s6UpvXRaM6Q/6f0zW OCnhHdT1BMr2BaTPpP80r4nsjyWvcNU= Received: from mail-qv1-f72.google.com (mail-qv1-f72.google.com [209.85.219.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-541-x5-7bkRiM1-P2LrnXGMJew-1; Wed, 02 Aug 2023 04:59:18 -0400 X-MC-Unique: x5-7bkRiM1-P2LrnXGMJew-1 Received: by mail-qv1-f72.google.com with SMTP id 6a1803df08f44-63cf6da7d40so64563546d6.2 for ; Wed, 02 Aug 2023 01:59:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690966758; x=1691571558; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=BsRdhAPoDFOlmfZATYPnuHgcjefANO1gCw0OykxlqrE=; b=VpIXhCUQPYA9GUjNCcfLEPqh5ebgdXUxOBgWM7cBBB6gkX/odVi1fMjvrBYQpHaiqI HJWfvzGMrMZTN5NTDQffUuIho8tT4Gx1lPwtd5VkA+7DzasH1NHfSP+5m/T1yYd0L422 cPgf0FCIeqaoRGTKguyKlA/O7Mm4AZHiYXaAz+WcmV+SqU/r2uVBEVTOlOXJcEd4sP6c l71ZaG0VoM38cLWdfZc+5gIm77ETBz+1d+r1xt5UBI3ZCpsuOcSex+aMlojpCi91267p tW7H2khZnEQ+BEbjCnt1G/ql7ADtBKCsjsKU9KMqsqPPff8ED1Lpou7yIDV51FWR5jor 58sw== X-Gm-Message-State: ABy/qLZJw7WudPtBsCg+Lz7wV0zNN3Yz5tzkZw/Wzw+Rnyte2gyaPVOb xYQHYS4RTTKZAtbWdg0GmKLudXR8tRe43qw+3O3j0WHgMKRr97oRJm7CEeVUFF2QHER8W/BK2vi jaTmQBp5D+TbIE7RSjzmD X-Received: by 2002:a0c:fd86:0:b0:62d:fe06:3e17 with SMTP id p6-20020a0cfd86000000b0062dfe063e17mr14505773qvr.22.1690966758213; Wed, 02 Aug 2023 01:59:18 -0700 (PDT) X-Received: by 2002:a0c:fd86:0:b0:62d:fe06:3e17 with SMTP id p6-20020a0cfd86000000b0062dfe063e17mr14505765qvr.22.1690966757961; Wed, 02 Aug 2023 01:59:17 -0700 (PDT) Received: from localhost (mob-176-247-92-44.net.vodafone.it. [176.247.92.44]) by smtp.gmail.com with ESMTPSA id g5-20020a0cdf05000000b0063d316af55csm5310271qvl.3.2023.08.02.01.59.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Aug 2023 01:59:17 -0700 (PDT) Date: Wed, 2 Aug 2023 10:58:58 +0200 From: Lorenzo Bianconi To: NeilBrown Cc: Lorenzo Bianconi , linux-nfs@vger.kernel.org, chuck.lever@oracle.com, jlayton@kernel.org Subject: Re: [PATCH v4 2/2] NFSD: add rpc_status entry in nfsd debug filesystem Message-ID: References: <169058300693.32308.16341899855806134699@noble.neil.brown.name> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="BzK2WmqwUxEnPIGD" Content-Disposition: inline In-Reply-To: <169058300693.32308.16341899855806134699@noble.neil.brown.name> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 --BzK2WmqwUxEnPIGD Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable > On Sat, 29 Jul 2023, Lorenzo Bianconi wrote: > > Introduce rpc_status entry in nfsd debug filesystem in order to dump > > pending RPC requests debugging information. > >=20 Hi Neil, thx for the review. > > Link: https://bugzilla.linux-nfs.org/show_bug.cgi?id=3D366 > > Signed-off-by: Lorenzo Bianconi > > --- > > fs/nfsd/nfs4proc.c | 4 +- > > fs/nfsd/nfsctl.c | 10 +++ > > fs/nfsd/nfsd.h | 2 + > > fs/nfsd/nfssvc.c | 122 +++++++++++++++++++++++++++++++++++++ > > include/linux/sunrpc/svc.h | 1 + > > net/sunrpc/svc.c | 2 +- > > 6 files changed, 137 insertions(+), 4 deletions(-) > >=20 > > diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c > > index f0f318e78630..b7ad3081bc36 100644 > > --- a/fs/nfsd/nfs4proc.c > > +++ b/fs/nfsd/nfs4proc.c > > @@ -2497,8 +2497,6 @@ static inline void nfsd4_increment_op_stats(u32 o= pnum) > > =20 > > static const struct nfsd4_operation nfsd4_ops[]; > > =20 > > -static const char *nfsd4_op_name(unsigned opnum); > > - > > /* > > * Enforce NFSv4.1 COMPOUND ordering rules: > > * > > @@ -3628,7 +3626,7 @@ void warn_on_nonidempotent_op(struct nfsd4_op *op) > > } > > } > > =20 > > -static const char *nfsd4_op_name(unsigned opnum) > > +const char *nfsd4_op_name(unsigned opnum) > > { > > if (opnum < ARRAY_SIZE(nfsd4_ops)) > > return nfsd4_ops[opnum].op_name; > > diff --git a/fs/nfsd/nfsctl.c b/fs/nfsd/nfsctl.c > > index 35d2e2cde1eb..f2e4f4b1e4d1 100644 > > --- a/fs/nfsd/nfsctl.c > > +++ b/fs/nfsd/nfsctl.c > > @@ -57,6 +57,8 @@ enum { > > NFSD_RecoveryDir, > > NFSD_V4EndGrace, > > #endif > > + NFSD_Rpc_Status, >=20 > I think NFSD_Rpc_Status needs to come before the CONFIG_NFSD_V4 block. > Otherwise the comment above (which I apparently approved) makes even > less sense than it does now. > (Maybe just remove the comment??) ack, right. I will fix it. >=20 > > + > > NFSD_MaxReserved > > }; > > =20 > > @@ -195,6 +197,13 @@ static inline struct net *netns(struct file *file) > > return file_inode(file)->i_sb->s_fs_info; > > } > > =20 [...] > > +#endif /* CONFIG_NFSD_V4 */ > > + > > + /* In order to detect if the RPC request is pending and > > + * RPC info are stable we check if rq_status_counter > > + * has been incremented during the handler processing. > > + */ > > + if (status_counter !=3D atomic_read(&rqstp->rq_status_counter)) > > + continue; > > + > > + seq_printf(m, > > + "0x%08x, 0x%08lx, 0x%08x, NFSv%d, %s, %016lld,", >=20 > Please drop the commas. > It might be defensible to have commas and no spaces by comparing with > /proc/fs/nfsd/supported_krb5_enctypes, but the dominant pattern is to > use only spaces to separate fields on /proc files. ack, I will fix it. Regards, Lorenzo >=20 > Thanks, > NeilBrown >=20 --BzK2WmqwUxEnPIGD Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQTquNwa3Txd3rGGn7Y6cBh0uS2trAUCZMoazQAKCRA6cBh0uS2t rPPbAP9ZVS6gaPqlts9MpZMX8vn2TeZKpDufOP+PDhMFH/PlLQD+MIs6Axu3aFeD y+PrvOVP4VhdEI/J8lXKlzeKVwcX3ww= =gKoI -----END PGP SIGNATURE----- --BzK2WmqwUxEnPIGD--