bcachefs: -EROFS doesn't count as move_extent_start_fail
authorKent Overstreet <kent.overstreet@linux.dev>
Mon, 27 Nov 2023 04:11:18 +0000 (23:11 -0500)
committerKent Overstreet <kent.overstreet@linux.dev>
Wed, 29 Nov 2023 03:58:22 +0000 (22:58 -0500)
The automated tests check if we've hit too many slowpath/error path
events and fail the test - if we're just shutting down, that naturally
shouldn't count.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/move.c

index 0a04adff1144165a3d05295709a1bb26163d36b2..67ac68f9dd3f1c8c91d855b7bb9aed125a3b1186 100644 (file)
@@ -338,6 +338,10 @@ err:
        if (ret == -BCH_ERR_data_update_done)
                return 0;
 
+       if (bch2_err_matches(ret, EROFS) ||
+           bch2_err_matches(ret, BCH_ERR_transaction_restart))
+               return ret;
+
        this_cpu_inc(c->counters[BCH_COUNTER_move_extent_start_fail]);
        if (trace_move_extent_start_fail_enabled()) {
                struct printbuf buf = PRINTBUF;