diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2024-06-28 20:40:24 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2024-06-28 20:47:04 -0400 |
commit | 1539bdf516601cf05ab11cbc6ddbfc31d37d74f7 (patch) | |
tree | 0002f2fcf3211b36eb6766568b420a97ee612a1a /fs | |
parent | 44ec5990357b9ebb8e5e88bb4f98a2746b938fab (diff) |
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 <kent.overstreet@linux.dev>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/bcachefs/io_read.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/bcachefs/io_read.c b/fs/bcachefs/io_read.c index 2a5c4371f6f8..ebf39ef72fb2 100644 --- a/fs/bcachefs/io_read.c +++ b/fs/bcachefs/io_read.c @@ -1003,6 +1003,9 @@ get_bio: rbio->promote = promote; INIT_WORK(&rbio->work, NULL); + if (flags & BCH_READ_NODECODE) + orig->pick = pick; + rbio->bio.bi_opf = orig->bio.bi_opf; rbio->bio.bi_iter.bi_sector = pick.ptr.offset; rbio->bio.bi_end_io = bch2_read_endio; |