Lines Matching full:pick

156 	bch2_data_update_read_done(&op->write, rbio->pick.crc);  in promote_start()
163 struct extent_ptr_decoded *pick, in __promote_alloc() argument
255 struct extent_ptr_decoded *pick, in promote_alloc() argument
266 ? max(pick->crc.compressed_size, pick->crc.live_size) in promote_alloc()
282 k, pos, pick, opts, sectors, rbio); in promote_alloc()
394 rbio->pick.ptr, in bch2_read_retry_nodecode()
396 rbio->pick.crc.offset)) { in bch2_read_retry_nodecode()
437 bch2_mark_io_failure(&failed, &rbio->pick); in bch2_rbio_retry()
479 u64 data_offset = rbio->data_pos.offset - rbio->pick.crc.offset; in __bch2_rbio_narrow_crcs()
486 if (crc_is_compressed(rbio->pick.crc)) in __bch2_rbio_narrow_crcs()
495 !bch2_bkey_matches_ptr(c, k, rbio->pick.ptr, data_offset)) in __bch2_rbio_narrow_crcs()
500 k.k->p.offset > data_offset + rbio->pick.crc.uncompressed_size) in __bch2_rbio_narrow_crcs()
504 rbio->pick.crc, NULL, &new_crc, in __bch2_rbio_narrow_crcs()
506 rbio->pick.crc.csum_type)) { in __bch2_rbio_narrow_crcs()
544 struct bch_dev *ca = bch_dev_bkey_exists(c, rbio->pick.ptr.dev); in __bch2_read_endio()
548 struct bch_extent_crc_unpacked crc = rbio->pick.crc; in __bch2_read_endio()
566 if (bch2_crc_cmp(csum, rbio->pick.crc.csum) && !c->opts.no_data_io) in __bch2_read_endio()
648 bch2_csum_err_msg(&buf, crc.csum_type, rbio->pick.crc.csum, csum); in __bch2_read_endio()
678 struct bch_dev *ca = bch_dev_bkey_exists(c, rbio->pick.ptr.dev); in bch2_read_endio()
700 ptr_stale(ca, &rbio->pick.ptr)) { in bch2_read_endio()
712 crc_is_compressed(rbio->pick.crc) || in bch2_read_endio()
713 bch2_csum_type_is_encryption(rbio->pick.crc.csum_type)) in bch2_read_endio()
715 else if (rbio->pick.crc.csum_type) in bch2_read_endio()
802 struct extent_ptr_decoded pick; in __bch2_read_extent() local
822 pick_ret = bch2_bkey_pick_read_device(c, k, failed, &pick); in __bch2_read_extent()
835 ca = bch_dev_bkey_exists(c, pick.ptr.dev); in __bch2_read_extent()
844 !pick.ptr.cached && in __bch2_read_extent()
845 unlikely(ptr_stale(ca, &pick.ptr))) { in __bch2_read_extent()
846 read_from_stale_dirty_pointer(trans, k, pick.ptr); in __bch2_read_extent()
847 bch2_mark_io_failure(failed, &pick); in __bch2_read_extent()
862 if (pick.crc.compressed_size > orig->bio.bi_vcnt * PAGE_SECTORS) in __bch2_read_extent()
865 iter.bi_size = pick.crc.compressed_size << 9; in __bch2_read_extent()
874 bch2_can_narrow_extent_crcs(k, pick.crc); in __bch2_read_extent()
881 if (crc_is_compressed(pick.crc) || in __bch2_read_extent()
882 (pick.crc.csum_type != BCH_CSUM_none && in __bch2_read_extent()
883 (bvec_iter_sectors(iter) != pick.crc.uncompressed_size || in __bch2_read_extent()
884 (bch2_csum_type_is_encryption(pick.crc.csum_type) && in __bch2_read_extent()
892 promote = promote_alloc(trans, iter, k, &pick, orig->opts, flags, in __bch2_read_extent()
896 EBUG_ON(crc_is_compressed(pick.crc)); in __bch2_read_extent()
897 EBUG_ON(pick.crc.csum_type && in __bch2_read_extent()
898 (bvec_iter_sectors(iter) != pick.crc.uncompressed_size || in __bch2_read_extent()
899 bvec_iter_sectors(iter) != pick.crc.live_size || in __bch2_read_extent()
900 pick.crc.offset || in __bch2_read_extent()
904 pick.ptr.offset += pick.crc.offset + in __bch2_read_extent()
907 pick.crc.compressed_size = bvec_iter_sectors(iter); in __bch2_read_extent()
908 pick.crc.uncompressed_size = bvec_iter_sectors(iter); in __bch2_read_extent()
909 pick.crc.offset = 0; in __bch2_read_extent()
910 pick.crc.live_size = bvec_iter_sectors(iter); in __bch2_read_extent()
921 pick.crc.compressed_size << 9); in __bch2_read_extent()
923 pick.crc.compressed_size << 9; in __bch2_read_extent()
925 unsigned sectors = pick.crc.compressed_size; in __bch2_read_extent()
957 EBUG_ON(bio_sectors(&rbio->bio) != pick.crc.compressed_size); in __bch2_read_extent()
975 rbio->pick = pick; in __bch2_read_extent()
985 rbio->bio.bi_iter.bi_sector = pick.ptr.offset; in __bch2_read_extent()
998 if (pick.ptr.cached && !(flags & BCH_READ_NODECODE)) in __bch2_read_extent()
999 bch2_bucket_io_time_reset(trans, pick.ptr.dev, in __bch2_read_extent()
1000 PTR_BUCKET_NR(ca, &pick.ptr), READ); in __bch2_read_extent()
1007 if (!rbio->pick.idx) { in __bch2_read_extent()
1059 bch2_mark_io_failure(failed, &pick); in __bch2_read_extent()