summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2024-09-06 18:32:49 -0400
committerKent Overstreet <kent.overstreet@linux.dev>2024-09-21 11:39:48 -0400
commitbf611567b791f3dabf4197ce70021e3bf2ce69a5 (patch)
treef74d2ce8ae3cd32afa106f52324f84caad1eeab7 /fs
parentb161ca80968b55e551b82955e65264e8fc5f8660 (diff)
bcachefs: improve "no device to read from" message
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs')
-rw-r--r--fs/bcachefs/io_read.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/fs/bcachefs/io_read.c b/fs/bcachefs/io_read.c
index ce27ba1f0b54..10242671b269 100644
--- a/fs/bcachefs/io_read.c
+++ b/fs/bcachefs/io_read.c
@@ -869,9 +869,15 @@ retry_pick:
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;
}