[PATCH 2/3] fuse_trace: make the root nodeid dynamic

Darrick J. Wong
2025-09-16T00:35:48Z

Enhance the iomap config tracepoint to report the node id of the root
directory.

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
---
fs/fuse/fuse_trace.h | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/fs/fuse/fuse_trace.h b/fs/fuse/fuse_trace.h
index 1befea65d4b15c..9c2eb497730b06 100644
--- a/fs/fuse/fuse_trace.h
+++ b/fs/fuse/fuse_trace.h
@@ -988,6 +988,7 @@ TRACE_EVENT(fuse_iomap_config,

TP_STRUCT__entry(
__field(dev_t, connection)
+ __field(uint64_t, root_nodeid)

__field(uint32_t, flags)
__field(uint32_t, blocksize)
@@ -1002,6 +1003,7 @@ TRACE_EVENT(fuse_iomap_config,

TP_fast_assign(
__entry->connection = fm->fc->dev;
+ __entry->root_nodeid = fm->fc->root_nodeid;
__entry->flags = outarg->flags;
__entry->blocksize = outarg->s_blocksize;
__entry->max_links = outarg->s_max_links;
@@ -1012,8 +1014,8 @@ TRACE_EVENT(fuse_iomap_config,
__entry->uuid_len = outarg->s_uuid_len;
),

- TP_printk("connection %u flags (%s) blocksize 0x%x max_links %u time_gran %u time_min %lld time_max %lld maxbytes 0x%llx uuid_len %u",
- __entry->connection,
+ TP_printk("connection %u root_ino 0x%llx flags (%s) blocksize 0x%x max_links %u time_gran %u time_min %lld time_max %lld maxbytes 0x%llx uuid_len %u",
+ __entry->connection, __entry->root_nodeid,
__print_flags(__entry->flags, "|", FUSE_IOMAP_CONFIG_STRINGS),
__entry->blocksize, __entry->max_links, __entry->time_gran,
__entry->time_min, __entry->time_max, __entry->maxbytes,