From: Filipe Manana Date: Fri, 17 Apr 2026 17:12:16 +0000 (+0100) Subject: btrfs: tracepoints: add in_fsync field to transaction commit event X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=889ad3845a8c029e93a46251f78d61b277cf5e61;p=thirdparty%2Fkernel%2Flinux.git btrfs: tracepoints: add in_fsync field to transaction commit event 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 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 4cec2f8838f59..4e077abd67044 100644 --- a/include/trace/events/btrfs.h +++ b/include/trace/events/btrfs.h @@ -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,