bcachefs: Fix move_extent_fail counter
authorKent Overstreet <kent.overstreet@linux.dev>
Fri, 26 May 2023 22:12:55 +0000 (18:12 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:10:02 +0000 (17:10 -0400)
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 <kent.overstreet@linux.dev>
fs/bcachefs/data_update.c

index c709538ce9c2e432e6606eecd52d541067d763c0..ae7e60d6e583671ec938ccd7aba8868b2641f0dd 100644 (file)
@@ -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;