]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
bcachefs: Read error message now indicates if it was for an internal move
authorKent Overstreet <kent.overstreet@linux.dev>
Sat, 8 Mar 2025 16:24:22 +0000 (11:24 -0500)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 16 Mar 2025 17:47:55 +0000 (13:47 -0400)
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/io_read.c

index 17bc413c27ba82e326fdf6c0eeede6ed2bc46ae0..a7865f34ea3545c86a14670e0cd00724746f11f5 100644 (file)
@@ -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,