From: Kent Overstreet Date: Fri, 6 Sep 2024 22:32:49 +0000 (-0400) Subject: bcachefs: improve "no device to read from" message X-Git-Tag: v6.12-rc1~101^2~22 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bf611567b791f3dabf4197ce70021e3bf2ce69a5;p=thirdparty%2Fkernel%2Flinux.git bcachefs: improve "no device to read from" message Signed-off-by: Kent Overstreet --- diff --git a/fs/bcachefs/io_read.c b/fs/bcachefs/io_read.c index ce27ba1f0b546..10242671b269e 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; }