diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2025-03-25 13:24:57 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2025-03-25 16:37:24 -0400 |
commit | 8af5c93e488481d58f85364278e6037ce354eccc (patch) | |
tree | 9022a68ea55211b2cc3bc4aea99b12ff343b7a78 /libbcachefs/btree_io.c | |
parent | 6657ce2de3cdb25b14fb0183b90366e3e577fb9a (diff) |
Update bcachefs sources to 1392e502d48b bcachefs: Add an "ignore unknown" option to bch2_parse_mount_opts()
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'libbcachefs/btree_io.c')
-rw-r--r-- | libbcachefs/btree_io.c | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/libbcachefs/btree_io.c b/libbcachefs/btree_io.c index 6abc9f17..2ba33ffc 100644 --- a/libbcachefs/btree_io.c +++ b/libbcachefs/btree_io.c @@ -2117,8 +2117,14 @@ out: return; err: set_btree_node_noevict(b); - bch2_fs_fatal_err_on(!bch2_err_matches(ret, EROFS), c, - "writing btree node: %s", bch2_err_str(ret)); + + if (!bch2_err_matches(ret, EROFS)) { + struct printbuf buf = PRINTBUF; + prt_printf(&buf, "writing btree node: %s\n ", bch2_err_str(ret)); + bch2_btree_pos_to_text(&buf, c, b); + bch2_fs_fatal_error(c, "%s", buf.buf); + printbuf_exit(&buf); + } goto out; } @@ -2135,10 +2141,14 @@ static void btree_node_write_endio(struct bio *bio) bch2_account_io_completion(ca, BCH_MEMBER_ERROR_write, wbio->submit_time, !bio->bi_status); - if (ca && bio->bi_status) - bch_err_dev_ratelimited(ca, - "btree write error: %s", - bch2_blk_status_to_str(bio->bi_status)); + if (ca && bio->bi_status) { + struct printbuf buf = PRINTBUF; + prt_printf(&buf, "btree write error: %s\n ", + bch2_blk_status_to_str(bio->bi_status)); + bch2_btree_pos_to_text(&buf, c, b); + bch_err_dev_ratelimited(ca, "%s", buf.buf); + printbuf_exit(&buf); + } if (bio->bi_status) { unsigned long flags; |