bcachefs: BCH_COUNTER_bucket_discard_fast

Add a separate counter for fastpath bucket discards, which don't require
a journal flush.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
Kent Overstreet
2025-01-30 03:33:16 -05:00
parent bbd804f2ad
commit 5ee760f667
2 changed files with 5 additions and 1 deletions
+4 -1
View File
@@ -1897,7 +1897,10 @@ commit:
if (ret)
goto out;
count_event(c, bucket_discard);
if (!fastpath)
count_event(c, bucket_discard);
else
count_event(c, bucket_discard_fast);
out:
fsck_err:
if (discard_locked)
+1
View File
@@ -13,6 +13,7 @@ enum counters_flags {
x(io_move, 2, TYPE_SECTORS) \
x(bucket_invalidate, 3, TYPE_COUNTER) \
x(bucket_discard, 4, TYPE_COUNTER) \
x(bucket_discard_fast, 79, TYPE_COUNTER) \
x(bucket_alloc, 5, TYPE_COUNTER) \
x(bucket_alloc_fail, 6, TYPE_COUNTER) \
x(btree_cache_scan, 7, TYPE_COUNTER) \