]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
btrfs: tracepoints: add in_fsync field to transaction commit event
authorFilipe Manana <fdmanana@suse.com>
Fri, 17 Apr 2026 17:12:16 +0000 (18:12 +0100)
committerDavid Sterba <dsterba@suse.com>
Mon, 8 Jun 2026 13:53:33 +0000 (15:53 +0200)
Include the in_fsync value from the transaction handle so that we can know
if a transaction commit was triggered by a fsync call.

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 4cec2f8838f59cdbbe947f06c19cd803739218b2..4e077abd670440ac03859459a7971127fd296564 100644 (file)
@@ -189,13 +189,16 @@ TRACE_EVENT(btrfs_transaction_commit,
 
        TP_STRUCT__entry_btrfs(
                __field(        u64,  generation                )
+               __field(        bool, in_fsync                  )
        ),
 
        TP_fast_assign_btrfs(trans->fs_info,
                __entry->generation     = trans->transid;
+               __entry->in_fsync       = trans->in_fsync;
        ),
 
-       TP_printk_btrfs("gen=%llu", __entry->generation)
+       TP_printk_btrfs("gen=%llu in_fsync=%d", __entry->generation,
+                       __entry->in_fsync)
 );
 
 DECLARE_EVENT_CLASS(btrfs__inode,