From c26463ce9940d150dfeaac0a1a0747db9b1ca600 Mon Sep 17 00:00:00 2001 From: Kent Overstreet Date: Fri, 26 May 2023 18:12:55 -0400 Subject: [PATCH] bcachefs: Fix move_extent_fail counter fail counters need to be events, not numbers of sectors - or the calculations the tests use for determining if we've had too many slowpath events don't work. Signed-off-by: Kent Overstreet --- fs/bcachefs/data_update.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/bcachefs/data_update.c b/fs/bcachefs/data_update.c index c709538ce9c2e..ae7e60d6e5836 100644 --- a/fs/bcachefs/data_update.c +++ b/fs/bcachefs/data_update.c @@ -374,7 +374,7 @@ nowork: &m->ctxt->stats->sectors_raced); } - this_cpu_add(c->counters[BCH_COUNTER_move_extent_fail], new->k.size); + this_cpu_inc(c->counters[BCH_COUNTER_move_extent_fail]); bch2_btree_iter_advance(&iter); goto next; -- 2.30.2