Skip to content

Commit bf61156

Browse files
author
Kent Overstreet
committed
bcachefs: improve "no device to read from" message
Signed-off-by: Kent Overstreet <[email protected]>
1 parent b161ca8 commit bf61156

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

fs/bcachefs/io_read.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -869,9 +869,15 @@ int __bch2_read_extent(struct btree_trans *trans, struct bch_read_bio *orig,
869869
goto hole;
870870

871871
if (pick_ret < 0) {
872+
struct printbuf buf = PRINTBUF;
873+
bch2_bkey_val_to_text(&buf, c, k);
874+
872875
bch_err_inum_offset_ratelimited(c,
873876
read_pos.inode, read_pos.offset << 9,
874-
"no device to read from");
877+
"no device to read from: %s\n %s",
878+
bch2_err_str(pick_ret),
879+
buf.buf);
880+
printbuf_exit(&buf);
875881
goto err;
876882
}
877883

0 commit comments

Comments
 (0)