Skip to content

Commit

Permalink
bcachefs: Dropped superblock write is no longer a fatal error
Browse files Browse the repository at this point in the history
Just emit a warning if errors=continue or fix_safe.

Signed-off-by: Kent Overstreet <[email protected]>
  • Loading branch information
Kent Overstreet committed Dec 29, 2024
1 parent 8a6fe8b commit 8645917
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions fs/bcachefs/super-io.c
Original file line number Diff line number Diff line change
Expand Up @@ -1084,9 +1084,16 @@ int bch2_write_super(struct bch_fs *c)
": Superblock write was silently dropped! (seq %llu expected %llu)",
le64_to_cpu(ca->sb_read_scratch->seq),
ca->disk_sb.seq);
bch2_fs_fatal_error(c, "%s", buf.buf);

if (c->opts.errors != BCH_ON_ERROR_continue &&
c->opts.errors != BCH_ON_ERROR_fix_safe) {
ret = -BCH_ERR_erofs_sb_err;
bch2_fs_fatal_error(c, "%s", buf.buf);
} else {
bch_err(c, "%s", buf.buf);
}

printbuf_exit(&buf);
ret = -BCH_ERR_erofs_sb_err;
}

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

0 comments on commit 8645917

Please sign in to comment.