From: Kent Overstreet Date: Mon, 27 Nov 2023 04:11:18 +0000 (-0500) Subject: bcachefs: -EROFS doesn't count as move_extent_start_fail X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=1b1bd0fd41577400434d5948edc2679092c57b08;p=linux.git bcachefs: -EROFS doesn't count as move_extent_start_fail 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 --- diff --git a/fs/bcachefs/move.c b/fs/bcachefs/move.c index 0a04adff11441..67ac68f9dd3f1 100644 --- a/fs/bcachefs/move.c +++ b/fs/bcachefs/move.c @@ -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;