Lines Matching full:pick

166 	bch2_data_update_read_done(&op->write, rbio->pick.crc);  in promote_start()
173 struct extent_ptr_decoded *pick, in __promote_alloc() argument
281 struct extent_ptr_decoded *pick, in promote_alloc() argument
299 ? max(pick->crc.compressed_size, pick->crc.live_size) in promote_alloc()
315 k, pos, pick, opts, sectors, rbio, failed); in promote_alloc()
441 rbio->pick.ptr, in bch2_read_retry_nodecode()
443 rbio->pick.crc.offset)) { in bch2_read_retry_nodecode()
484 bch2_mark_io_failure(&failed, &rbio->pick); in bch2_rbio_retry()
528 struct bch_dev *ca = rbio->have_ioref ? bch2_dev_have_ref(c, rbio->pick.ptr.dev) : NULL; in bch2_read_io_err()
549 u64 data_offset = rbio->data_pos.offset - rbio->pick.crc.offset; in __bch2_rbio_narrow_crcs()
556 if (crc_is_compressed(rbio->pick.crc)) in __bch2_rbio_narrow_crcs()
565 !bch2_bkey_matches_ptr(c, k, rbio->pick.ptr, data_offset)) in __bch2_rbio_narrow_crcs()
570 k.k->p.offset > data_offset + rbio->pick.crc.uncompressed_size) in __bch2_rbio_narrow_crcs()
574 rbio->pick.crc, NULL, &new_crc, in __bch2_rbio_narrow_crcs()
576 rbio->pick.crc.csum_type)) { in __bch2_rbio_narrow_crcs()
614 struct bch_extent_crc_unpacked crc = rbio->pick.crc; in bch2_read_csum_err()
621 bch2_csum_err_msg(&buf, crc.csum_type, rbio->pick.crc.csum, csum); in bch2_read_csum_err()
623 struct bch_dev *ca = rbio->have_ioref ? bch2_dev_have_ref(c, rbio->pick.ptr.dev) : NULL; in bch2_read_csum_err()
645 struct bch_dev *ca = rbio->have_ioref ? bch2_dev_have_ref(c, rbio->pick.ptr.dev) : NULL; in bch2_read_decompress_err()
665 struct bch_dev *ca = rbio->have_ioref ? bch2_dev_have_ref(c, rbio->pick.ptr.dev) : NULL; in bch2_read_decrypt_err()
684 struct bch_extent_crc_unpacked crc = rbio->pick.crc; in __bch2_read_endio()
702 if (bch2_crc_cmp(csum, rbio->pick.crc.csum) && !c->opts.no_data_io) in __bch2_read_endio()
796 struct bch_dev *ca = rbio->have_ioref ? bch2_dev_have_ref(c, rbio->pick.ptr.dev) : NULL; in bch2_read_endio()
814 (ca && dev_ptr_stale(ca, &rbio->pick.ptr))) { in bch2_read_endio()
826 crc_is_compressed(rbio->pick.crc) || in bch2_read_endio()
827 bch2_csum_type_is_encryption(rbio->pick.crc.csum_type)) in bch2_read_endio()
829 else if (rbio->pick.crc.csum_type) in bch2_read_endio()
889 struct extent_ptr_decoded pick; in __bch2_read_extent() local
908 pick_ret = bch2_bkey_pick_read_device(c, k, failed, &pick); in __bch2_read_extent()
925 if (unlikely(bch2_csum_type_is_encryption(pick.crc.csum_type)) && !c->chacha20) { in __bch2_read_extent()
936 struct bch_dev *ca = bch2_dev_get_ioref(c, pick.ptr.dev, READ); in __bch2_read_extent()
945 !pick.ptr.cached && in __bch2_read_extent()
947 unlikely(dev_ptr_stale(ca, &pick.ptr))) { in __bch2_read_extent()
948 read_from_stale_dirty_pointer(trans, ca, k, pick.ptr); in __bch2_read_extent()
949 bch2_mark_io_failure(failed, &pick); in __bch2_read_extent()
959 if (pick.crc.compressed_size > orig->bio.bi_vcnt * PAGE_SECTORS) { in __bch2_read_extent()
965 iter.bi_size = pick.crc.compressed_size << 9; in __bch2_read_extent()
974 bch2_can_narrow_extent_crcs(k, pick.crc); in __bch2_read_extent()
981 if (crc_is_compressed(pick.crc) || in __bch2_read_extent()
982 (pick.crc.csum_type != BCH_CSUM_none && in __bch2_read_extent()
983 (bvec_iter_sectors(iter) != pick.crc.uncompressed_size || in __bch2_read_extent()
984 (bch2_csum_type_is_encryption(pick.crc.csum_type) && in __bch2_read_extent()
992 promote = promote_alloc(trans, iter, k, &pick, orig->opts, flags, in __bch2_read_extent()
996 EBUG_ON(crc_is_compressed(pick.crc)); in __bch2_read_extent()
997 EBUG_ON(pick.crc.csum_type && in __bch2_read_extent()
998 (bvec_iter_sectors(iter) != pick.crc.uncompressed_size || in __bch2_read_extent()
999 bvec_iter_sectors(iter) != pick.crc.live_size || in __bch2_read_extent()
1000 pick.crc.offset || in __bch2_read_extent()
1004 pick.ptr.offset += pick.crc.offset + in __bch2_read_extent()
1007 pick.crc.compressed_size = bvec_iter_sectors(iter); in __bch2_read_extent()
1008 pick.crc.uncompressed_size = bvec_iter_sectors(iter); in __bch2_read_extent()
1009 pick.crc.offset = 0; in __bch2_read_extent()
1010 pick.crc.live_size = bvec_iter_sectors(iter); in __bch2_read_extent()
1021 pick.crc.compressed_size << 9); in __bch2_read_extent()
1023 pick.crc.compressed_size << 9; in __bch2_read_extent()
1025 unsigned sectors = pick.crc.compressed_size; in __bch2_read_extent()
1057 EBUG_ON(bio_sectors(&rbio->bio) != pick.crc.compressed_size); in __bch2_read_extent()
1075 rbio->pick = pick; in __bch2_read_extent()
1085 orig->pick = pick; in __bch2_read_extent()
1088 rbio->bio.bi_iter.bi_sector = pick.ptr.offset; in __bch2_read_extent()
1101 if (ca && pick.ptr.cached && !(flags & BCH_READ_NODECODE)) in __bch2_read_extent()
1102 bch2_bucket_io_time_reset(trans, pick.ptr.dev, in __bch2_read_extent()
1103 PTR_BUCKET_NR(ca, &pick.ptr), READ); in __bch2_read_extent()
1119 if (!rbio->pick.idx) { in __bch2_read_extent()
1177 bch2_mark_io_failure(failed, &pick); in __bch2_read_extent()