]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
btrfs: tracepoints: show inode type in btrfs_sync_file_enter() event
authorFilipe Manana <fdmanana@suse.com>
Thu, 14 May 2026 16:35:40 +0000 (17:35 +0100)
committerFilipe Manana <fdmanana@suse.com>
Tue, 9 Jun 2026 10:49:25 +0000 (11:49 +0100)
Print the type of the inode (directory, regular file, symlink, etc) to
facilitate debugging.

Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
include/trace/events/btrfs.h

index 0e96633b8b4b5fb2a4ed107db27818f608f794c7..726ca4ddb4d86a9e720af3468ceea4b1da3cf51b 100644 (file)
@@ -830,10 +830,11 @@ TRACE_EVENT(btrfs_sync_file_enter,
        TP_ARGS(file, datasync),
 
        TP_STRUCT__entry_btrfs(
-               __field(        u64,    ino             )
-               __field(        u64,    parent          )
-               __field(        int,    datasync        )
-               __field(        u64,    root_objectid   )
+               __field(        u64,            ino             )
+               __field(        umode_t,        mode            )
+               __field(        u64,            parent          )
+               __field(        int,            datasync        )
+               __field(        u64,            root_objectid   )
        ),
 
        TP_fast_assign(
@@ -846,13 +847,13 @@ TRACE_EVENT(btrfs_sync_file_enter,
                __entry->parent         = btrfs_ino(BTRFS_I(parent_inode));
                __entry->datasync       = datasync;
                __entry->root_objectid  = btrfs_root_id(BTRFS_I(inode)->root);
+               __entry->mode           = inode->i_mode;
        ),
 
-       TP_printk_btrfs("root=%llu(%s) ino=%llu parent=%llu datasync=%d",
-                 show_root_type(__entry->root_objectid),
-                 __entry->ino,
-                 __entry->parent,
-                 __entry->datasync)
+       TP_printk_btrfs("root=%llu(%s) ino=%llu type=%s parent=%llu datasync=%d",
+                       show_root_type(__entry->root_objectid), __entry->ino,
+                       show_inode_type(__entry->mode), __entry->parent,
+                       __entry->datasync)
 );
 
 TRACE_EVENT(btrfs_sync_file_exit,