]> git.ipfire.org Git - thirdparty/linux.git/commit
btrfs: tracepoints: trace transaction states during commit phase
authorFilipe Manana <fdmanana@suse.com>
Thu, 23 Apr 2026 16:05:23 +0000 (17:05 +0100)
committerDavid Sterba <dsterba@suse.com>
Mon, 8 Jun 2026 13:53:34 +0000 (15:53 +0200)
commit17819dc282f15d49fac8d7eb94d571e69c22cbdf
tree69d2d668b24db6922eb646240565f8bb90b83e50
parent99314d7cc711b4105a9546e63a210ead0d3f6178
btrfs: tracepoints: trace transaction states during commit phase

Currently the trace event is fired only when a transaction is fully
complete (its state is TRANS_STATE_COMPLETED). However during a
transaction commit we go through several states and as soon as the
state reaches TRANS_STATE_UNBLOCKED, another transaction can start.
Therefore it's useful to track every transaction state changed during
the commit of a transaction, so that we can see if a new transaction
is started before the current one is completed. Add the transaction
state to the transaction commit event and call the event everytime
we change the transaction state during commit.

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