]> www.infradead.org Git - users/hch/dma-mapping.git/commitdiff
bcachefs: improve "no device to read from" message
authorKent Overstreet <kent.overstreet@linux.dev>
Fri, 6 Sep 2024 22:32:49 +0000 (18:32 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Sat, 21 Sep 2024 15:39:48 +0000 (11:39 -0400)
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/io_read.c

index ce27ba1f0b54653cc73b9a7de2d221c4c85174eb..10242671b269ebdf288cd3f9aebb00e42cd0fed8 100644 (file)
@@ -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;
        }