Lines Matching refs:nr_vecs

31 		struct bio_vec *bvecs, unsigned int nr_vecs)  in bio_integrity_init()  argument
34 bip->bip_max_vcnt = nr_vecs; in bio_integrity_init()
35 if (nr_vecs) in bio_integrity_init()
54 unsigned int nr_vecs) in bio_integrity_alloc() argument
61 bia = kmalloc(struct_size(bia, bvecs, nr_vecs), gfp_mask); in bio_integrity_alloc()
64 bio_integrity_init(bio, &bia->bip, bia->bvecs, nr_vecs); in bio_integrity_alloc()
69 static void bio_integrity_unpin_bvec(struct bio_vec *bv, int nr_vecs) in bio_integrity_unpin_bvec() argument
73 for (i = 0; i < nr_vecs; i++) in bio_integrity_unpin_bvec()
160 int nr_vecs, unsigned int len) in bio_integrity_copy_user() argument
173 iov_iter_bvec(&iter, ITER_SOURCE, bvec, nr_vecs, len); in bio_integrity_copy_user()
187 bip = bio_integrity_alloc(bio, GFP_KERNEL, nr_vecs + 1); in bio_integrity_copy_user()
196 bio_integrity_unpin_bvec(bvec, nr_vecs); in bio_integrity_copy_user()
198 memcpy(&bip->bip_vec[1], bvec, nr_vecs * sizeof(*bvec)); in bio_integrity_copy_user()
208 bip->bip_vcnt = nr_vecs; in bio_integrity_copy_user()
218 int nr_vecs, unsigned int len) in bio_integrity_init_user() argument
222 bip = bio_integrity_alloc(bio, GFP_KERNEL, nr_vecs); in bio_integrity_init_user()
226 memcpy(bip->bip_vec, bvec, nr_vecs * sizeof(*bvec)); in bio_integrity_init_user()
228 bip->bip_vcnt = nr_vecs; in bio_integrity_init_user()
233 int nr_vecs, ssize_t bytes, ssize_t offset) in bvec_from_pages() argument
238 for (i = 0; i < nr_vecs; i = j) { in bvec_from_pages()
243 for (j = i + 1; j < nr_vecs; j++) { in bvec_from_pages()
270 int ret, nr_vecs; in bio_integrity_map_user() local
278 nr_vecs = iov_iter_npages(iter, BIO_MAX_VECS + 1); in bio_integrity_map_user()
279 if (nr_vecs > BIO_MAX_VECS) in bio_integrity_map_user()
281 if (nr_vecs > UIO_FASTIOV) { in bio_integrity_map_user()
282 bvec = kcalloc(nr_vecs, sizeof(*bvec), GFP_KERNEL); in bio_integrity_map_user()
289 ret = iov_iter_extract_pages(iter, &pages, bytes, nr_vecs, 0, &offset); in bio_integrity_map_user()
293 nr_bvecs = bvec_from_pages(bvec, pages, nr_vecs, bytes, offset); in bio_integrity_map_user()