All of lore.kernel.org
 help / color / mirror / Atom feed
* Clarification on NFS Tracepoint Build Warnings
@ 2026-10-24 16:53 Yalagada Pavan Kumar
  2026-10-24 21:42 ` Steven Rostedt
  0 siblings, 1 reply; 2+ messages in thread
From: Yalagada Pavan Kumar @ 2026-10-24 16:53 UTC (permalink / raw)
  To: julia.lawall; +Cc: Steven Rostedt, Julian Braha, outreachy

Hi Julia,

Using the attached configuration [1], i encountered few tracepoint warnings
during the kernel build. I focused on these three NFS warnings:

warning: tracepoint 'nfs_local_open_fh' is unused in module fs/nfs/nfs.o
warning: tracepoint 'nfs_atomic_open_exit' is unused in module fs/nfs/nfs.o
warning: tracepoint 'nfs_atomic_open_enter' is unused in module fs/nfs/nfs.o

I started by investigating the first warning 'nfs_local_open_fh'.

First, I searched for the tracepoint definition in fs/nfs/nfstrace.h and
it defined using TRACE_EVENT(nfs_local_open_fh, ...).

Then, i searched for where the tracepoint is called and found in
fs/nfs/localio.c
	trace_nfs_local_open_fh(fh, mode, status);

next, i checked fs/nfs/Makefile and found:
	nfs-$(CONFIG_NFS_LOCALIO) += localio.o

this localio.o included in NFS module only when CONFIG_NFS_LOCALIO is enabled.

then i also checked .config file and found that CONFIG_NFSD is disabled.
Since LOCALIO depends on both NFSD and NFS_FS, LOCALIO is disabled in my
current configuration.

so, the tracepoint is defined in nfstrace.h but localio.c is not build
because CONFIG_NFS_LOCALIO is disabled.

then i made a change:

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(

After making this change i rebuilt the kernel using:
	make -j$(nproc) UT=1

The full build compiled sucessfully. However, the build stil reported other
tracepoint warnings, including nfs_atomic_open_enter and nfs_atomic_open_exit.

The nfs_local_open_fh warning did not appear in the build output.

Could you please let me know whether my understanding is correct and whether
guarding the tracepoint definition with CONFIG_NFS_LOCALIO is the apprpriate
fix?

I would appreciate your guidance on whether i should perform any additional
checks before submitting a patch.

Thank you for your time and guidance.

[1] https://lore.kernel.org/outreachy/4423e3b-65f8-6159-4c72-d2e940747021@inria.fr/T/#u

Best regards,
Pavan

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-10-24 21:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-24 16:53 Clarification on NFS Tracepoint Build Warnings Yalagada Pavan Kumar
2026-10-24 21:42 ` Steven Rostedt

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.