Lines Matching refs:bvec

200 static int bio_integrity_copy_user(struct bio *bio, struct bio_vec *bvec,  in bio_integrity_copy_user()  argument
215 iov_iter_bvec(&iter, direction, bvec, nr_vecs, len); in bio_integrity_copy_user()
238 bio_integrity_unpin_bvec(bvec, nr_vecs, false); in bio_integrity_copy_user()
240 memcpy(&bip->bip_vec[1], bvec, nr_vecs * sizeof(*bvec)); in bio_integrity_copy_user()
260 static int bio_integrity_init_user(struct bio *bio, struct bio_vec *bvec, in bio_integrity_init_user() argument
269 memcpy(bip->bip_vec, bvec, nr_vecs * sizeof(*bvec)); in bio_integrity_init_user()
276 static unsigned int bvec_from_pages(struct bio_vec *bvec, struct page **pages, in bvec_from_pages() argument
298 bvec_set_page(&bvec[nr_bvecs], pages[i], size, offset); in bvec_from_pages()
312 struct bio_vec stack_vec[UIO_FASTIOV], *bvec = stack_vec; in bio_integrity_map_user() local
334 bvec = kcalloc(nr_vecs, sizeof(*bvec), GFP_KERNEL); in bio_integrity_map_user()
335 if (!bvec) in bio_integrity_map_user()
345 nr_bvecs = bvec_from_pages(bvec, pages, nr_vecs, bytes, offset); in bio_integrity_map_user()
352 ret = bio_integrity_copy_user(bio, bvec, nr_bvecs, bytes, in bio_integrity_map_user()
355 ret = bio_integrity_init_user(bio, bvec, nr_bvecs, bytes, seed); in bio_integrity_map_user()
358 if (bvec != stack_vec) in bio_integrity_map_user()
359 kfree(bvec); in bio_integrity_map_user()
364 bio_integrity_unpin_bvec(bvec, nr_bvecs, false); in bio_integrity_map_user()
366 if (bvec != stack_vec) in bio_integrity_map_user()
367 kfree(bvec); in bio_integrity_map_user()