Commit fec5e6f9 authored by Kent Overstreet's avatar Kent Overstreet
Browse files

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: b43f7249 ("bcachefs: Log fsck errors in the journal")
Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent 74f3931a
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -633,7 +633,9 @@ int __bch2_fsck_err(struct bch_fs *c,
	 * 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);