Lines Matching defs:bvec
206 static int bio_integrity_copy_user(struct bio *bio, struct bio_vec *bvec,
221 iov_iter_bvec(&iter, direction, bvec, nr_vecs, len);
232 * We need to preserve the original bvec and the number of vecs
244 bio_integrity_unpin_bvec(bvec, nr_vecs, false);
246 memcpy(&bip->bip_vec[1], bvec, nr_vecs * sizeof(*bvec));
265 static int bio_integrity_init_user(struct bio *bio, struct bio_vec *bvec,
274 memcpy(bip->bip_vec, bvec, nr_vecs * sizeof(*bvec));
281 static unsigned int bvec_from_pages(struct bio_vec *bvec, struct page **pages,
303 bvec_set_page(&bvec[nr_bvecs], pages[i], size, offset);
317 struct bio_vec stack_vec[UIO_FASTIOV], *bvec = stack_vec;
339 bvec = kcalloc(nr_vecs, sizeof(*bvec), GFP_KERNEL);
340 if (!bvec)
350 nr_bvecs = bvec_from_pages(bvec, pages, nr_vecs, bytes, offset);
357 ret = bio_integrity_copy_user(bio, bvec, nr_bvecs, bytes,
360 ret = bio_integrity_init_user(bio, bvec, nr_bvecs, bytes, seed);
363 if (bvec != stack_vec)
364 kfree(bvec);
369 bio_integrity_unpin_bvec(bvec, nr_bvecs, false);
371 if (bvec != stack_vec)
372 kfree(bvec);