summaryrefslogtreecommitdiff
path: root/fs/bcachefs/alloc_background.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2025-01-30 03:33:16 -0500
committerKent Overstreet <kent.overstreet@linux.dev>2025-03-14 21:02:11 -0400
commit5ee760f667e09b95a19beea265077eb2f69cd12b (patch)
tree4140412f17261cbd59ccba8e0b60fbf44127f455 /fs/bcachefs/alloc_background.c
parentbbd804f2ad3034ac1053b9188e6bb3d705570e25 (diff)
downloadlinux-next-5ee760f667e09b95a19beea265077eb2f69cd12b.tar.gz
linux-next-5ee760f667e09b95a19beea265077eb2f69cd12b.zip
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>
Diffstat (limited to 'fs/bcachefs/alloc_background.c')
-rw-r--r--fs/bcachefs/alloc_background.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/bcachefs/alloc_background.c b/fs/bcachefs/alloc_background.c
index 3ea809990ef1..43c29b0d2d20 100644
--- a/fs/bcachefs/alloc_background.c
+++ b/fs/bcachefs/alloc_background.c
@@ -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)