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)
commit8b317901da4ab5576d109bf1aed7eb15cbe31d5f
treede1cb229fcd355b66a7b42642197174f5e4d7e38
parent3a2f8c07e1d60739eb6b90ffba41bd1d0de33fc2
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