diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2025-07-08 15:21:39 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2025-07-08 15:24:15 -0400 |
commit | fec5e6f97dae5fbd628c444148b77728eae3bb93 (patch) | |
tree | 5cc3d8ab59208f5043bb091d4211a931a4f7d27c | |
parent | 74f3931a1bfea5822e8953a15c8ebc587dc6b4bc (diff) |
bcachefs: Don't set BCH_FS_error on transaction restartbcachefs-2025-07-11
This started showing up more when we started logging the error being
corrected in the journal - but __bch2_fsck_err() could return
transaction restarts before that.
Setting BCH_FS_error incorrectly causes recovery passes to not be
cleared, among other issues.
Fixes: b43f72492768 ("bcachefs: Log fsck errors in the journal")
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
-rw-r--r-- | fs/bcachefs/error.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/bcachefs/error.c b/fs/bcachefs/error.c index ea37f5af1800..267e73d9d7e6 100644 --- a/fs/bcachefs/error.c +++ b/fs/bcachefs/error.c @@ -633,7 +633,9 @@ err: * log_fsck_err()s: that would require us to track for every error type * which recovery pass corrects it, to get the fsck exit status correct: */ - if (bch2_err_matches(ret, BCH_ERR_fsck_fix)) { + if (bch2_err_matches(ret, BCH_ERR_transaction_restart)) { + /* nothing */ + } else if (bch2_err_matches(ret, BCH_ERR_fsck_fix)) { set_bit(BCH_FS_errors_fixed, &c->flags); } else { set_bit(BCH_FS_errors_not_fixed, &c->flags); |