Outreachy Linux Kernel Community
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: pavankumaryalagada@gmail.com
Cc: outreachy@lists.linux.dev, julianbraha@gmail.com
Subject: Re: [PATCH v2] nfs: Guard nfs_local_open_fh tracepoint with CONFIG_NFS_LOCALIO
Date: Sat, 7 Nov 2026 16:43:19 -0500	[thread overview]
Message-ID: <20261107164319.3c750602@fedora> (raw)
In-Reply-To: <20261025153021.41713-1-pavankumaryalagada@gmail.com>

On Sun, 25 Oct 2026 21:00:21 +0530
pavankumaryalagada@gmail.com wrote:

> From: Yalagada Pavan Kumar <pavankumaryalagada@gmail.com>
> 
> The nfs_local_open_fh tracepoint is used in fs/nfs/localio.c.
> The NFS Makefile includes localio.o in the NFS module only when
> CONFIG_NFS_LOCALIO is enabled. When this configuration is disabled,
> localio.o is not built, leaving this tracepoint unused.

What about the other tracepoints in that file? Hmm, I noticed that the
trace header already has a:

  #if IS_ENABLED(CONFIG_NFS_LOCALIO)

block. So the real fix is to move the trace event definition into that
block and not create a new one.

-- Steve


> 
> Guard the tracepoint definition with CONFIG_NFS_LOCALIO to avoid
> wasting memory when it is not used.
> 
> Fixes: 70ba381e1a43 ("nfs: add LOCALIO support")
> Signed-off-by: Yalagada Pavan Kumar <pavankumaryalagada@gmail.com>
> ---
> v2:
> - Explain why the tracepoint needs a CONFIG_NFS_LOCALIO guard.
> 
> v1: https://lore.kernel.org/outreachy/736e1fe0-f4bf-abcf-b7b-1cd874cce131@inria.fr/T/#t
> ---
>  fs/nfs/nfstrace.h | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/fs/nfs/nfstrace.h b/fs/nfs/nfstrace.h
> index b15c1732c869..bbd7735a1f67 100644
> --- a/fs/nfs/nfstrace.h
> +++ b/fs/nfs/nfstrace.h
> @@ -1898,6 +1898,7 @@ TRACE_EVENT(nfs_mount_path,
>  	TP_printk("path='%s'", __get_str(path))
>  );
>  
> +#ifdef CONFIG_NFS_LOCALIO
>  TRACE_EVENT(nfs_local_open_fh,
>  		TP_PROTO(
>  			const struct nfs_fh *fh,
> @@ -1926,6 +1927,7 @@ TRACE_EVENT(nfs_local_open_fh,
>  			__entry->error
>  		)
>  );
> +#endif /* CONFIG_NFS_LOCALIO */
>  
>  DECLARE_EVENT_CLASS(nfs_xdr_event,
>  		TP_PROTO(


      parent reply	other threads:[~2026-11-07 21:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-25 15:30 [PATCH v2] nfs: Guard nfs_local_open_fh tracepoint with CONFIG_NFS_LOCALIO pavankumaryalagada
2026-10-26  0:25 ` Julia Lawall
2026-11-07 21:43 ` Steven Rostedt [this message]

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=20261107164319.3c750602@fedora \
    --to=rostedt@goodmis.org \
    --cc=julianbraha@gmail.com \
    --cc=outreachy@lists.linux.dev \
    --cc=pavankumaryalagada@gmail.com \
    /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