]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: trace: Allow trace_qgroup_update_counters() to record old rfer/excl value
authorQu Wenruo <wqu@suse.com>
Mon, 30 Apr 2018 07:04:44 +0000 (15:04 +0800)
committerDavid Sterba <dsterba@suse.com>
Mon, 28 May 2018 16:07:29 +0000 (18:07 +0200)
commit5ce2fbaf13249e2e10a826556b11076f1bbfe259
treede1cb229fcd355b66a7b42642197174f5e4d7e38
parente7989162e970433fc5d5e47e71f8795403f9cba4
btrfs: trace: Allow trace_qgroup_update_counters() to record old rfer/excl value

Origin trace_qgroup_update_counters() only records qgroup id and its
reference count change.

It's good enough to debug qgroup accounting change, but when rescan race
is involved, it's pretty hard to distinguish which modification belongs
to which rescan.

So add old_rfer and old_excl trace output to help distinguishing
different rescan instance.
(Different rescan instance should reset its qgroup->rfer to 0)

For trace event parameter, it just changes from u64 qgroup_id to struct
btrfs_qgroup *qgroup, so number of parameters is not changed at all.

Signed-off-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/qgroup.c
include/trace/events/btrfs.h