Skip to content

Commit

Permalink
bcachefs: improve "no device to read from" message
Browse files Browse the repository at this point in the history
  • Loading branch information
Kent Overstreet committed Sep 7, 2024
1 parent 3e45aac commit 92dc188
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion fs/bcachefs/io_read.c
Original file line number Diff line number Diff line change
Expand Up @@ -869,9 +869,15 @@ int __bch2_read_extent(struct btree_trans *trans, struct bch_read_bio *orig,
goto hole;

if (pick_ret < 0) {
struct printbuf buf = PRINTBUF;
bch2_bkey_val_to_text(&buf, c, k);

bch_err_inum_offset_ratelimited(c,
read_pos.inode, read_pos.offset << 9,
"no device to read from");
"no device to read from: %s\n %s",
bch2_err_str(pick_ret),
buf.buf);
printbuf_exit(&buf);
goto err;
}

Expand Down

0 comments on commit 92dc188

Please sign in to comment.