From: Kent Overstreet Date: Fri, 26 May 2023 22:12:55 +0000 (-0400) Subject: bcachefs: Fix move_extent_fail counter X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=c26463ce9940d150dfeaac0a1a0747db9b1ca600;p=linux.git 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 --- 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;