From d38e41cb57e7a89554a6da89ea1224c4f974ef04 Mon Sep 17 00:00:00 2001 From: Chris Kirby Date: Fri, 29 Aug 2025 09:52:35 -0500 Subject: [PATCH] Add the inode number to scoutfs_xattr_set traces. Signed-off-by: Chris Kirby --- kmod/src/scoutfs_trace.h | 14 ++++++++------ kmod/src/xattr.c | 2 +- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/kmod/src/scoutfs_trace.h b/kmod/src/scoutfs_trace.h index 340c1f14..8494503f 100644 --- a/kmod/src/scoutfs_trace.h +++ b/kmod/src/scoutfs_trace.h @@ -823,13 +823,14 @@ DEFINE_EVENT(scoutfs_lock_info_class, scoutfs_lock_destroy, ); TRACE_EVENT(scoutfs_xattr_set, - TP_PROTO(struct super_block *sb, size_t name_len, const void *value, - size_t size, int flags), + TP_PROTO(struct super_block *sb, __u64 ino, size_t name_len, + const void *value, size_t size, int flags), - TP_ARGS(sb, name_len, value, size, flags), + TP_ARGS(sb, ino, name_len, value, size, flags), TP_STRUCT__entry( SCSB_TRACE_FIELDS + __field(__u64, ino) __field(size_t, name_len) __field(const void *, value) __field(size_t, size) @@ -838,15 +839,16 @@ TRACE_EVENT(scoutfs_xattr_set, TP_fast_assign( SCSB_TRACE_ASSIGN(sb); + __entry->ino = ino; __entry->name_len = name_len; __entry->value = value; __entry->size = size; __entry->flags = flags; ), - TP_printk(SCSBF" name_len %zu value %p size %zu flags 0x%x", - SCSB_TRACE_ARGS, __entry->name_len, __entry->value, - __entry->size, __entry->flags) + TP_printk(SCSBF" ino %llu name_len %zu value %p size %zu flags 0x%x", + SCSB_TRACE_ARGS, __entry->ino, __entry->name_len, + __entry->value, __entry->size, __entry->flags) ); TRACE_EVENT(scoutfs_advance_dirty_super, diff --git a/kmod/src/xattr.c b/kmod/src/xattr.c index 09db9927..7805b364 100644 --- a/kmod/src/xattr.c +++ b/kmod/src/xattr.c @@ -742,7 +742,7 @@ int scoutfs_xattr_set_locked(struct inode *inode, const char *name, size_t name_ int ret; int err; - trace_scoutfs_xattr_set(sb, name_len, value, size, flags); + trace_scoutfs_xattr_set(sb, ino, name_len, value, size, flags); if (WARN_ON_ONCE(tgs->totl && tgs->indx) || WARN_ON_ONCE((tgs->totl | tgs->indx) && !tag_lock))