Lines Matching refs:bv
18 static inline void bio_get_first_bvec(struct bio *bio, struct bio_vec *bv) in bio_get_first_bvec() argument
20 *bv = mp_bvec_iter_bvec(bio->bi_io_vec, bio->bi_iter); in bio_get_first_bvec()
23 static inline void bio_get_last_bvec(struct bio *bio, struct bio_vec *bv) in bio_get_last_bvec() argument
28 bio_get_first_bvec(bio, bv); in bio_get_last_bvec()
29 if (bv->bv_len == bio->bi_iter.bi_size) in bio_get_last_bvec()
39 *bv = bio->bi_io_vec[idx]; in bio_get_last_bvec()
46 bv->bv_len = iter.bi_bvec_done; in bio_get_last_bvec()
231 const struct bio_vec *bv, unsigned *nsegs, in bvec_split_segs() argument
236 unsigned len = min(bv->bv_len, max_len); in bvec_split_segs()
241 seg_size = get_max_segment_size(q, bv->bv_page, in bvec_split_segs()
242 bv->bv_offset + total_len); in bvec_split_segs()
249 if ((bv->bv_offset + total_len) & queue_virt_boundary(q)) in bvec_split_segs()
256 return len > 0 || bv->bv_len > max_len; in bvec_split_segs()
283 struct bio_vec bv, bvprv, *bvprvp = NULL; in blk_bio_segment_split() local
289 bio_for_each_bvec(bv, bio, iter) { in blk_bio_segment_split()
294 if (bvprvp && bvec_gap_to_prev(q, bvprvp, bv.bv_offset)) in blk_bio_segment_split()
298 sectors + (bv.bv_len >> 9) <= max_sectors && in blk_bio_segment_split()
299 bv.bv_offset + bv.bv_len <= PAGE_SIZE) { in blk_bio_segment_split()
301 sectors += bv.bv_len >> 9; in blk_bio_segment_split()
302 } else if (bvec_split_segs(q, &bv, &nsegs, §ors, max_segs, in blk_bio_segment_split()
307 bvprv = bv; in blk_bio_segment_split()
399 struct bio_vec bv; in blk_recalc_rq_segments() local
421 rq_for_each_bvec(bv, rq, iter) in blk_recalc_rq_segments()
422 bvec_split_segs(rq->q, &bv, &nr_phys_segs, &nr_sectors, in blk_recalc_rq_segments()
479 static inline int __blk_bvec_map_sg(struct bio_vec bv, in __blk_bvec_map_sg() argument
483 sg_set_page(*sg, bv.bv_page, bv.bv_len, bv.bv_offset); in __blk_bvec_map_sg()