summaryrefslogtreecommitdiff
path: root/libbcachefs/super-io.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2024-12-08 22:31:09 -0500
committerKent Overstreet <kent.overstreet@linux.dev>2024-12-29 14:57:48 -0500
commit1055935ffe151de39c45e33ea13d3370e46c8fbd (patch)
treedaf0f052febd666eb5b0be3675226d14b4dde8e3 /libbcachefs/super-io.c
parent634c812a1ed05de8e3d1dc146eed95b942e1e38d (diff)
Update bcachefs sources to 864591728963 bcachefs: Dropped superblock write is no longer a fatal error
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'libbcachefs/super-io.c')
-rw-r--r--libbcachefs/super-io.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/libbcachefs/super-io.c b/libbcachefs/super-io.c
index dbc09e30..8037ccba 100644
--- a/libbcachefs/super-io.c
+++ b/libbcachefs/super-io.c
@@ -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) {