Skip to content

Commit 1539bdf

Browse files
author
Kent Overstreet
committed
bcachefs: Fix bch2_read_retry_nodecode()
BCH_READ_NODECODE mode - used by the move paths - really wants to use only the original rbio, but the retry path really wants to clone - oof. Make sure to copy the crc of the pointer we read from back to the original rbio, or we'll see spurious checksum errors later. Signed-off-by: Kent Overstreet <[email protected]>
1 parent 44ec599 commit 1539bdf

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

fs/bcachefs/io_read.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1003,6 +1003,9 @@ int __bch2_read_extent(struct btree_trans *trans, struct bch_read_bio *orig,
10031003
rbio->promote = promote;
10041004
INIT_WORK(&rbio->work, NULL);
10051005

1006+
if (flags & BCH_READ_NODECODE)
1007+
orig->pick = pick;
1008+
10061009
rbio->bio.bi_opf = orig->bio.bi_opf;
10071010
rbio->bio.bi_iter.bi_sector = pick.ptr.offset;
10081011
rbio->bio.bi_end_io = bch2_read_endio;

0 commit comments

Comments
 (0)