Lines Matching refs:bv
21 static inline void bio_get_first_bvec(struct bio *bio, struct bio_vec *bv)
23 *bv = mp_bvec_iter_bvec(bio->bi_io_vec, bio->bi_iter);
26 static inline void bio_get_last_bvec(struct bio *bio, struct bio_vec *bv)
31 bio_get_first_bvec(bio, bv);
32 if (bv->bv_len == bio->bi_iter.bi_size)
42 *bv = bio->bi_io_vec[idx];
49 bv->bv_len = iter.bi_bvec_done;
214 * @bv: [in] bvec to examine
216 * by the number of segments from @bv that may be appended to that
219 * by the number of bytes from @bv that may be appended to that
227 * %true is returned if and only if appending the entire @bv to a bio with
232 const struct bio_vec *bv, unsigned *nsegs, unsigned *bytes,
236 unsigned len = min(bv->bv_len, max_len);
241 seg_size = get_max_segment_size(lim, bv->bv_page,
242 bv->bv_offset + total_len);
249 if ((bv->bv_offset + total_len) & lim->virt_boundary_mask)
256 return len > 0 || bv->bv_len > max_len;
282 struct bio_vec bv, bvprv, *bvprvp = NULL;
286 bio_for_each_bvec(bv, bio, iter) {
291 if (bvprvp && bvec_gap_to_prev(lim, bvprvp, bv.bv_offset))
295 bytes + bv.bv_len <= max_bytes &&
296 bv.bv_offset + bv.bv_len <= PAGE_SIZE) {
298 bytes += bv.bv_len;
300 if (bvec_split_segs(lim, &bv, &nsegs, &bytes,
305 bvprv = bv;
417 struct bio_vec bv;
439 rq_for_each_bvec(bv, rq, iter)
440 bvec_split_segs(&rq->q->limits, &bv, &nr_phys_segs, &bytes,
497 static inline int __blk_bvec_map_sg(struct bio_vec bv,
501 sg_set_page(*sg, bv.bv_page, bv.bv_len, bv.bv_offset);