Thread (28 messages) 28 messages, 4 authors, 2025-07-23
STALE312d

[PATCH 07/14] xfs: ifdef out unused xfs_attr events

From: Steven Rostedt <rostedt@goodmis.org>
Date: 2025-06-12 21:25:02
Also in: linux-xfs, lkml
Subsystem: filesystems (vfs and infrastructure), the rest, xfs filesystem · Maintainers: Alexander Viro, Christian Brauner, Linus Torvalds, Carlos Maiolino

From: Steven Rostedt <rostedt@goodmis.org>

Trace events can take up to 5K in memory for text and meta data per event
regardless if they are used or not, so they should not be defined when not
used. The events xfs_attr_fillstate and xfs_attr_refillstate are only
called in code that is #ifdef out and exists only for future reference.

Ifdef out the events that go with that code and add a comment mentioning
the other code.

Fixes: 59782a236b622 ("xfs: remove xfs_attri_remove_iter")
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
---
 fs/xfs/xfs_trace.h | 6 ++++++
 1 file changed, 6 insertions(+)
diff --git a/fs/xfs/xfs_trace.h b/fs/xfs/xfs_trace.h
index cdc639198bb9..bd4e5a727b73 100644
--- a/fs/xfs/xfs_trace.h
+++ b/fs/xfs/xfs_trace.h
@@ -2467,8 +2467,14 @@ DEFINE_ATTR_EVENT(xfs_attr_node_get);
 DEFINE_ATTR_EVENT(xfs_attr_node_replace);
 DEFINE_ATTR_EVENT(xfs_attr_node_removename);
 
+/*
+ * When the corresponding code in xfs_attr.c is re-enabled
+ * then so can these trace events.
+ */
+#if 0
 DEFINE_ATTR_EVENT(xfs_attr_fillstate);
 DEFINE_ATTR_EVENT(xfs_attr_refillstate);
+#endif
 
 DEFINE_ATTR_EVENT(xfs_attr_rmtval_get);
 
-- 
2.47.2

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help