Linux NFS development
 help / color / mirror / Atom feed
From: Jeff Layton <jlayton@kernel.org>
To: Chuck Lever <cel@kernel.org>, NeilBrown <neil@brown.name>,
	Olga Kornievskaia <okorniev@redhat.com>,
	Dai Ngo <Dai.Ngo@oracle.com>, Tom Talpey <tom@talpey.com>
Cc: Trond Myklebust <trondmy@kernel.org>,
	Anna Schumaker <anna@kernel.org>,
	 Steve Dickson <steved@redhat.com>,
	linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4 1/4] sunrpc: add per-netns per-procedure call counts to svc_stat
Date: Wed, 17 Jun 2026 07:04:06 -0400	[thread overview]
Message-ID: <d322de3e8e54e8f64b0a630a3f517fb565342abc.camel@kernel.org> (raw)
In-Reply-To: <d29b710e-2771-4e5d-8765-1de806a9aa72@app.fastmail.com>

On Tue, 2026-06-16 at 19:55 -0400, Chuck Lever wrote:
> Hey Jeff -
> 
> On Tue, Jun 16, 2026, at 8:45 AM, Jeff Layton wrote:
> > The existing per-procedure call counts live in global
> > svc_version->vs_count[] arrays which are not network-namespace-aware.
> > Add per-netns equivalents in struct svc_stat so the upcoming netlink
> > stats interface can return namespace-scoped statistics.
> > 
> > Add a vs_count pointer array to struct svc_stat, along with
> > svc_stat_alloc_counts() and svc_stat_free_counts() helpers to manage
> > per-version percpu call count arrays.
> 
> This patch appears to break the build for an NFSv3-only server
> configured with CONFIG_PROC_FS=n.
> 
> svc_stat_alloc_counts() and svc_stat_free_counts() are defined in
> net/sunrpc/stats.c, which the Makefile builds only under PROC_FS:
> 
>        sunrpc-$(CONFIG_PROC_FS) += stats.o
> 
> nfsd_net_init()/nfsd_net_exit() call both helpers unconditionally,
> and the declarations in <linux/sunrpc/stats.h> sit outside the
> #ifdef CONFIG_PROC_FS block with no !PROC_FS stubs. CONFIG_NFSD does
> not depend on PROC_FS -- only NFSD_V4 does -- so NFSD=y with
> NFSD_V2/V3 and PROC_FS=n is a valid Kconfig combination. The result
> is an undefined reference to svc_stat_alloc_counts at vmlinux link
> (NFSD=y), or a modpost failure for NFSD=m since both symbols are
> EXPORT_SYMBOL_GPL.
> 
> net/sunrpc/svc.c is always built, and might be a more natural home
> for the new functions.

Thanks. Looks pretty simple to fix. I'll plan to send a v5.
-- 
Jeff Layton <jlayton@kernel.org>

  reply	other threads:[~2026-06-17 11:04 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-16 12:45 [PATCH v4 0/4] nfsd/sunrpc: convert nfsstat server-side interfaces to use netlink Jeff Layton
2026-06-16 12:45 ` [PATCH v4 1/4] sunrpc: add per-netns per-procedure call counts to svc_stat Jeff Layton
2026-06-16 23:55   ` Chuck Lever
2026-06-17 11:04     ` Jeff Layton [this message]
2026-06-16 12:45 ` [PATCH v4 2/4] sunrpc: use per-net counts in svc_seq_show() Jeff Layton
2026-06-16 12:45 ` [PATCH v4 3/4] nfsd: implement server-stats-get netlink handler Jeff Layton
2026-06-17  0:57   ` Chuck Lever
2026-06-17 11:07     ` Jeff Layton
2026-06-17 13:18       ` Chuck Lever
2026-06-17 15:25         ` Jeff Layton
2026-06-17 17:52           ` Jeff Layton
2026-06-17 18:46             ` Chuck Lever
2026-06-16 12:45 ` [PATCH v4 4/4] sunrpc: remove unused svc_version vs_count field Jeff Layton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d322de3e8e54e8f64b0a630a3f517fb565342abc.camel@kernel.org \
    --to=jlayton@kernel.org \
    --cc=Dai.Ngo@oracle.com \
    --cc=anna@kernel.org \
    --cc=cel@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=neil@brown.name \
    --cc=okorniev@redhat.com \
    --cc=steved@redhat.com \
    --cc=tom@talpey.com \
    --cc=trondmy@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox