From: Filipe Manana Date: Thu, 14 May 2026 16:35:40 +0000 (+0100) Subject: btrfs: tracepoints: show inode type in btrfs_sync_file_enter() event X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d8576024fa1bee0e72e44ca8b5a6c95372717a99;p=thirdparty%2Flinux.git btrfs: tracepoints: show inode type in btrfs_sync_file_enter() event Print the type of the inode (directory, regular file, symlink, etc) to facilitate debugging. Reviewed-by: Johannes Thumshirn Signed-off-by: Filipe Manana Signed-off-by: David Sterba --- diff --git a/include/trace/events/btrfs.h b/include/trace/events/btrfs.h index 0e96633b8b4b5..726ca4ddb4d86 100644 --- a/include/trace/events/btrfs.h +++ b/include/trace/events/btrfs.h @@ -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,