summaryrefslogtreecommitdiff
path: root/fs/bcachefs/io_read.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2025-03-08 19:24:22 +0300
committerKent Overstreet <kent.overstreet@linux.dev>2025-03-16 20:47:55 +0300
commitf4b84bac20d6999db9e7db2254e63471c6c3fd9c (patch)
treea25a96b5edd4d46dd6e8ea9687f1504ed2e00329 /fs/bcachefs/io_read.c
parente75993b0bf8baa48b2e96d693852191f63b615fd (diff)
downloadlinux-f4b84bac20d6999db9e7db2254e63471c6c3fd9c.tar.xz
bcachefs: Read error message now indicates if it was for an internal move
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/io_read.c')
-rw-r--r--fs/bcachefs/io_read.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/fs/bcachefs/io_read.c b/fs/bcachefs/io_read.c
index 17bc413c27ba..a7865f34ea35 100644
--- a/fs/bcachefs/io_read.c
+++ b/fs/bcachefs/io_read.c
@@ -335,10 +335,17 @@ nopromote:
static int bch2_read_err_msg_trans(struct btree_trans *trans, struct printbuf *out,
struct bch_read_bio *rbio, struct bpos read_pos)
{
- return lockrestart_do(trans,
+ int ret = lockrestart_do(trans,
bch2_inum_offset_err_msg_trans(trans, out,
(subvol_inum) { rbio->subvol, read_pos.inode },
read_pos.offset << 9));
+ if (ret)
+ return ret;
+
+ if (rbio->flags & BCH_READ_data_update)
+ prt_str(out, "(internal move) ");
+
+ return 0;
}
static void bch2_read_err_msg(struct bch_fs *c, struct printbuf *out,