Received: by 2002:a05:6358:51dd:b0:131:369:b2a3 with SMTP id 29csp829440rwl; Thu, 10 Aug 2023 02:10:15 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG4/0eX+Gc55+1LfaLSrwO/NxQ6ghEx2RwQxNU2Gk/+BD27lcxJArlNZIHgTr8OYYBqdXcL X-Received: by 2002:a05:6a00:2346:b0:681:eddd:51fb with SMTP id j6-20020a056a00234600b00681eddd51fbmr2517998pfj.18.1691658615241; Thu, 10 Aug 2023 02:10:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691658615; cv=none; d=google.com; s=arc-20160816; b=Fc3RrQ/kBOdJoNinDTLBoX73KGLgNzGbA/GdLR00o5tsGccne3JydWjYp+j347ElqV xofr5a0u/8UbtWrVf65zHIx3BlFlo0s6+1GDVqAns5iyk+oMH3e6VdnOlPRgDOpCSSH4 sIdhSyp4Jj7Oo/g08bLVstdhjUk0jupiyctlnJ9J68/DarPvNo88trXAfn/oWLaqkd1B q/WimcbBdvDSOaJuRN7S0b1DiKzDc3T4Yth8gC7A261Pk8ZTSxDd7GFinvvpBkNd9AbV g9CjO/9yOsZTk0wea+CCBTzVUG0yxF+7ABk+j3/RrU6i8cW7L+PdWrC0a27kwVVbDD8L 05IQ== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=PTwfotT9KgdKqiAGnldAoHHPSvO36/pJfGIgsL9vBMQ=; fh=w1PxD+AzYA9rTV2sSsX3uNw7+F67Zm5UlgOEJowej+A=; b=s2NQ2Vri/wpAV9OT+FlOlybJn3OaWV/jttegWJtc1JkIUr5RuFMnJISY2h1LQJf+u+ deg9nmrO7VvMIXlUgYxpcIgSsHdoS2i7ivZrsM25AURoTHOdTn2ch7+fxCbnZrY2B3Gq /ChROuUqxn+uagsfUZXd5LlGc9o0sxFgS8zTUkvNF8//ln/sdnIgFAT1AEvALpiloGwn q5jH/CIeFEJOWKrSi3MkBc1bSIbn9u7xFvxTU7QWP+GBUgds239w0OQfFh6TIhM1lp+Y rV0MBRudH9KU3R8Pj1X8cBez3dNxGyIP8FihXKg2d4zxK+HSRJ3qcwuhtevBL4LYylUM X7hw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="XYyc05a/"; 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 t10-20020a65608a000000b005638183ab90si1187964pgu.611.2023.08.10.02.09.51; Thu, 10 Aug 2023 02:10: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="XYyc05a/"; 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 S230064AbjHJIjt (ORCPT + 99 others); Thu, 10 Aug 2023 04:39:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55384 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232080AbjHJIjs (ORCPT ); Thu, 10 Aug 2023 04:39:48 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 908C31BFA for ; Thu, 10 Aug 2023 01:39:47 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 2DCA565392 for ; Thu, 10 Aug 2023 08:39:47 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 195B9C433C8; Thu, 10 Aug 2023 08:39:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1691656786; bh=uYUd5l28aGHJI4Ay72COJdbaiGAo2Sp3Ttylyv3GPJU=; h=From:To:Cc:Subject:Date:From; b=XYyc05a//SXuoeXS/X5T7Lkd0SiFCxGAkAvJ9IxQaIdMej2fFnn5MJum6QkCSZMc0 wUPzopy4nRtyekQwCRsxrcCzbZbfsNxElEwGQbev59M0w+EzzsPeWajaRPaU8cHknf qePGJBU8ag2xHbXPAGXDCc3VIpWbF+/ysbTPRhnkLE4w9gQFCRvBayK3cDvBYWLUAV OoI9xHe00OeMy9/xSiF2y8tRFfCWLzAPoMf2OIETMwvVn3Zeoaim/frN9frU8yUOQA GP8jCfLP9B6f07YIwF90L5YXc/Io8rZTUGCZK+sNk4jk+S4S9Bld93UqOfDX8HOAU+ MAl19xirvCLCQ== From: Lorenzo Bianconi To: linux-nfs@vger.kernel.org Cc: lorenzo.bianconi@redhat.com, chuck.lever@oracle.com, jlayton@kernel.org, neilb@suse.de Subject: [PATCH v6 0/3] add rpc_status handler in nfsd debug filesystem Date: Thu, 10 Aug 2023 10:39:18 +0200 Message-ID: X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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,SPF_HELO_NONE,SPF_PASS 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 Introduce rpc_status entry in nfsd debug filesystem in order to dump pending RPC requests debugging information. Changes since v5: - add missing delimiters for nfs4 compound ops - add a header line for rpc_status handler - do not dump rq_prog - do not dump rq_flags in hex Changes since v4: - rely on acquire/release APIs and get rid of atomic operation - fix kdoc for nfsd_rpc_status_open - get rid of ',' as field delimiter in nfsd_rpc_status hanlder - move nfsd_rpc_status before nfsd_v4 enum entries - fix compilantion error if nfsdv4 is not enabled Changes since v3: - introduce rq_status_counter in order to detect if the RPC request is pending and RPC info are stable - rely on __svc_print_addr to dump IP info Changes since v2: - minor changes in nfsd_rpc_status_show output Changes since v1: - rework nfsd_rpc_status_show output Changes since RFCv1: - riduce time holding nfsd_mutex bumping svc_serv refcoung in nfsd_rpc_status_open() - dump rqstp->rq_stime - add missing kdoc for nfsd_rpc_status_open() Link: https://bugzilla.linux-nfs.org/show_bug.cgi?id=3D366 Lorenzo Bianconi (3): SUNRPC: add verbose parameter to __svc_print_addr() NFSD: introduce nfsd_stats_open utility routine NFSD: add rpc_status entry in nfsd debug filesystem fs/nfsd/nfs4proc.c | 4 +- fs/nfsd/nfsctl.c | 11 ++- fs/nfsd/nfsd.h | 9 +- fs/nfsd/nfssvc.c | 163 ++++++++++++++++++++++++++++++-- include/linux/sunrpc/svc.h | 1 + include/linux/sunrpc/svc_xprt.h | 12 +-- net/sunrpc/svc.c | 2 +- net/sunrpc/svc_xprt.c | 2 +- 8 files changed, 185 insertions(+), 19 deletions(-) -- 2.41.0