Skip to content

Commit fec5e6f

Browse files
author
Kent Overstreet
committed
bcachefs: Don't set BCH_FS_error on transaction restart
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: b43f724 ("bcachefs: Log fsck errors in the journal") Signed-off-by: Kent Overstreet <[email protected]>
1 parent 74f3931 commit fec5e6f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

fs/bcachefs/error.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -633,7 +633,9 @@ int __bch2_fsck_err(struct bch_fs *c,
633633
* log_fsck_err()s: that would require us to track for every error type
634634
* which recovery pass corrects it, to get the fsck exit status correct:
635635
*/
636-
if (bch2_err_matches(ret, BCH_ERR_fsck_fix)) {
636+
if (bch2_err_matches(ret, BCH_ERR_transaction_restart)) {
637+
/* nothing */
638+
} else if (bch2_err_matches(ret, BCH_ERR_fsck_fix)) {
637639
set_bit(BCH_FS_errors_fixed, &c->flags);
638640
} else {
639641
set_bit(BCH_FS_errors_not_fixed, &c->flags);

0 commit comments

Comments
 (0)