Skip to content

Commit 8b1f46b

Browse files
author
Kent Overstreet
committed
bcachefs: Dropped superblock write is no longer a fatal error
Just emit a warning if errors=continue or fix_safe. Signed-off-by: Kent Overstreet <[email protected]>
1 parent 8cfdc6c commit 8b1f46b

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

fs/bcachefs/super-io.c

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1084,9 +1084,16 @@ int bch2_write_super(struct bch_fs *c)
10841084
": Superblock write was silently dropped! (seq %llu expected %llu)",
10851085
le64_to_cpu(ca->sb_read_scratch->seq),
10861086
ca->disk_sb.seq);
1087-
bch2_fs_fatal_error(c, "%s", buf.buf);
1087+
1088+
if (c->opts.errors != BCH_ON_ERROR_continue &&
1089+
c->opts.errors != BCH_ON_ERROR_fix_safe) {
1090+
ret = -BCH_ERR_erofs_sb_err;
1091+
bch2_fs_fatal_error(c, "%s", buf.buf);
1092+
} else {
1093+
bch_err(c, "%s", buf.buf);
1094+
}
1095+
10881096
printbuf_exit(&buf);
1089-
ret = -BCH_ERR_erofs_sb_err;
10901097
}
10911098

10921099
if (le64_to_cpu(ca->sb_read_scratch->seq) > ca->disk_sb.seq) {

0 commit comments

Comments
 (0)