]> 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)
commit3c0b8479eafb86f520f4d11e6ce65d71bb1f06bc
treede1cb229fcd355b66a7b42642197174f5e4d7e38
parent6ece2d5ac601ba2bfb4425f36ad024de2df8dee1
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