mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-02-24 00:43:23 -05:00
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:
@@ -1897,7 +1897,10 @@ static int bch2_discard_one_bucket(struct btree_trans *trans,
|
||||
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)
|
||||
|
||||
@@ -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) \
|
||||
|
||||
Reference in New Issue
Block a user