Commit 6f44a994 authored by Kent Overstreet's avatar Kent Overstreet Committed by Kent Overstreet

bcachefs: Add a persistent counter for bucket discards

Like the previous patch for bucket invalidates, add another counter for
a core allocator path.
Signed-off-by: default avatarKent Overstreet <kent.overstreet@gmail.com>
parent c9bd6732
......@@ -1052,6 +1052,7 @@ static void bch2_do_discards_work(struct work_struct *work)
if (ret)
break;
this_cpu_inc(c->counters[BCH_COUNTER_bucket_discard]);
discarded++;
}
bch2_trans_iter_exit(&trans, &iter);
......
......@@ -1330,7 +1330,8 @@ struct bch_sb_field_disk_groups {
x(io_read, 0) \
x(io_write, 1) \
x(io_move, 2) \
x(bucket_invalidate, 3)
x(bucket_invalidate, 3) \
x(bucket_discard, 4)
enum bch_persistent_counters {
#define x(t, n, ...) BCH_COUNTER_##t,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment