diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2023-11-27 05:11:18 +0100 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-11-29 04:58:22 +0100 |
commit | 1b1bd0fd41577400434d5948edc2679092c57b08 (patch) | |
tree | cdbfd603830c20311f5c8ff5d69272f3d0e11f4a /fs | |
parent | bcachefs: trace_move_extent_start_fail() now includes errcode (diff) | |
download | linux-1b1bd0fd41577400434d5948edc2679092c57b08.tar.xz linux-1b1bd0fd41577400434d5948edc2679092c57b08.zip |
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 <kent.overstreet@linux.dev>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/bcachefs/move.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/bcachefs/move.c b/fs/bcachefs/move.c index 0a04adff1144..67ac68f9dd3f 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; |