Home
last modified time | relevance | path

Searched refs:bvec (Results 1 – 25 of 79) sorted by relevance

1234

/linux/include/linux/
H A Dbvec.h3 * bvec iterator
35 * bvec_set_page - initialize a bvec based off a struct page
36 * @bv: bvec to initialize
37 * @page: page the bvec should point to
38 * @len: length of the bvec
50 * bvec_set_folio - initialize a bvec based off a struct folio
51 * @bv: bvec to initialize
52 * @folio: folio the bvec should point to
53 * @len: length of the bvec
66 * bvec_set_virt - initialize a bvec base
256 bvec_advance(const struct bio_vec * bvec,struct bvec_iter_all * iter_all) bvec_advance() argument
285 bvec_kmap_local(struct bio_vec * bvec) bvec_kmap_local() argument
297 memcpy_from_bvec(char * to,struct bio_vec * bvec) memcpy_from_bvec() argument
309 memcpy_to_bvec(struct bio_vec * bvec,const char * from) memcpy_to_bvec() argument
320 memzero_bvec(struct bio_vec * bvec) memzero_bvec() argument
331 bvec_virt(struct bio_vec * bvec) bvec_virt() argument
341 bvec_phys(const struct bio_vec * bvec) bvec_phys() argument
[all...]
H A Dbio.h126 /* @bytes should be less or equal to bvec[i->bi_idx].bv_len */ in bio_advance_iter_single()
149 * complete doesn't align with a bvec boundary, then bv_len and bv_offset will in bio_advance()
150 * be updated on the last bvec as well. in bio_advance()
178 /* iterate over multi-page bvec */
190 #define bio_iter_last(bvec, iter) ((iter).bi_size == (bvec).bv_len) in bio_segments()
284 struct bio_vec *bvec = bio_first_bvec_all(bio) + i; in bio_first_folio()
291 fi->folio = bvec_folio(bvec); in bio_first_folio()
292 fi->offset = bvec->bv_offset + in bio_first_folio()
293 PAGE_SIZE * folio_page_idx(fi->folio, bvec in bio_first_folio()
185 bio_iter_last(bvec,iter) global() argument
279 struct bio_vec *bvec = bio_first_bvec_all(bio) + i; bio_first_folio() local
[all...]
/linux/fs/erofs/
H A Dzdata.c26 struct z_erofs_bvec bvec[total]; \
67 /* L: inline a certain number of bvec for bootstrap */
160 unsigned long base = (unsigned long)((struct z_erofs_bvset *)0)->bvec; in z_erofs_bvset_flip()
192 struct z_erofs_bvec *bvec, in z_erofs_bvec_enqueue() argument
213 iter->bvset->bvec[iter->cur++] = *bvec; in z_erofs_bvec_enqueue()
218 struct z_erofs_bvec *bvec, in z_erofs_bvec_dequeue() argument
225 *bvec = iter->bvset->bvec[iter->cur++]; in z_erofs_bvec_dequeue()
630 struct z_erofs_bvec *bvec in z_erofs_cache_release_folio() local
695 z_erofs_attach_page(struct z_erofs_frontend * fe,struct z_erofs_bvec * bvec,bool exclusive) z_erofs_attach_page() argument
1124 struct z_erofs_bvec bvec; global() member
1129 z_erofs_do_decompressed_bvec(struct z_erofs_backend * be,struct z_erofs_bvec * bvec) z_erofs_do_decompressed_bvec() argument
1203 struct z_erofs_bvec bvec; z_erofs_parse_out_bvecs() local
1227 struct z_erofs_bvec *bvec = &pcl->compressed_bvecs[i]; z_erofs_parse_in_bvecs() local
1464 z_erofs_fill_bio_vec(struct bio_vec * bvec,struct z_erofs_frontend * f,struct z_erofs_pcluster * pcl,unsigned int nr,struct address_space * mc) z_erofs_fill_bio_vec() argument
1670 struct bio_vec bvec; z_erofs_submit_queue() local
[all...]
/linux/block/
H A Dbio-integrity.c262 static int bio_integrity_copy_user(struct bio *bio, struct bio_vec *bvec, in bio_integrity_copy_user() argument
276 iov_iter_bvec(&iter, ITER_SOURCE, bvec, nr_vecs, len); in bio_integrity_copy_user()
299 bio_integrity_unpin_bvec(bvec, nr_vecs); in bio_integrity_copy_user()
301 memcpy(&bip->bip_vec[1], bvec, nr_vecs * sizeof(*bvec)); in bio_integrity_copy_user()
319 static int bio_integrity_init_user(struct bio *bio, struct bio_vec *bvec, in bio_integrity_init_user() argument
328 memcpy(bip->bip_vec, bvec, nr_vecs * sizeof(*bvec)); in bio_integrity_init_user()
334 static unsigned int bvec_from_pages(struct bio_vec *bvec, struct page **pages, in bvec_from_pages() argument
360 bvec_set_page(&bvec[nr_bvecs], pages[i], size, offset); in bvec_from_pages()
372 struct bio_vec stack_vec[UIO_FASTIOV], *bvec = stack_vec; in bio_integrity_map_user() local
388 bvec = kzalloc_objs(*bvec, nr_vecs); in bio_integrity_map_user()
[all …]
H A Dblk-map.c69 struct bio_vec *bvec; in bio_copy_from_iter() local
72 bio_for_each_segment_all(bvec, bio, iter_all) { in bio_copy_from_iter()
75 ret = copy_page_from_iter(bvec->bv_page, in bio_copy_from_iter()
76 bvec->bv_offset, in bio_copy_from_iter()
77 bvec->bv_len, in bio_copy_from_iter()
83 if (ret < bvec->bv_len) in bio_copy_from_iter()
100 struct bio_vec *bvec; in bio_copy_to_iter() local
103 bio_for_each_segment_all(bvec, bio, iter_all) { in bio_copy_to_iter()
106 ret = copy_page_to_iter(bvec->bv_page, in bio_copy_to_iter()
107 bvec in bio_copy_to_iter()
343 struct bio_vec *bvec; bio_copy_kern_endio_read() local
[all...]
H A Dbio-integrity-fs.c11 struct bio_vec bvec; member
27 bio_integrity_init(bio, &iib->bip, &iib->bvec, 1); in fs_bio_integrity_alloc()
H A Dbio-integrity-auto.c21 struct bio_vec bvec; member
88 bio_integrity_init(bio, &bid->bip, &bid->bvec, 1); in bio_integrity_prep()
/linux/lib/
H A Diov_iter.c3 #include <linux/bvec.h>
504 const struct bio_vec *bvec, *end; in iov_iter_bvec_advance() local
512 for (bvec = i->bvec, end = bvec + i->nr_segs; bvec < end; bvec++) { in iov_iter_bvec_advance()
513 if (likely(size < bvec->bv_len)) in iov_iter_bvec_advance()
515 size -= bvec->bv_len; in iov_iter_bvec_advance()
518 i->nr_segs -= bvec in iov_iter_bvec_advance()
640 const struct bio_vec *bvec = i->bvec; iov_iter_revert() local
705 iov_iter_bvec(struct iov_iter * i,unsigned int direction,const struct bio_vec * bvec,unsigned long nr_segs,size_t count) iov_iter_bvec() argument
823 const struct bio_vec *bvec = i->bvec; iov_iter_alignment_bvec() local
[all...]
/linux/drivers/nvme/target/
H A Dio-cmd-file.c94 iov_iter_bvec(&iter, rw, req->f.bvec, nr_segs, count); in nvmet_file_submit_bvec()
108 if (req->f.bvec != req->inline_bvec) { in nvmet_file_io_done()
110 kfree(req->f.bvec); in nvmet_file_io_done()
112 mempool_free(req->f.bvec, req->ns->bvec_pool); in nvmet_file_io_done()
156 bvec_set_page(&req->f.bvec[bv_cnt], sg_page(sg), sg->length, in nvmet_file_execute_io()
158 len += req->f.bvec[bv_cnt].bv_len; in nvmet_file_execute_io()
159 total_len += req->f.bvec[bv_cnt].bv_len; in nvmet_file_execute_io()
248 req->f.bvec = kmalloc_objs(struct bio_vec, nr_bvec); in nvmet_file_execute_rw()
250 req->f.bvec = req->inline_bvec; in nvmet_file_execute_rw()
252 if (unlikely(!req->f.bvec)) { in nvmet_file_flush()
[all...]
/linux/fs/squashfs/
H A Dblock.c39 struct bio_vec *bvec = bvec_init_iter_all(&iter_all); in copy_bio_to_actor() local
50 int bytes_to_copy = min_t(int, bvec->bv_len - offset, in copy_bio_to_actor()
56 memcpy(actor_addr + actor_offset, bvec_virt(bvec) + in copy_bio_to_actor()
69 if (offset >= bvec->bv_len) { in copy_bio_to_actor()
313 struct bio_vec *bvec = bvec_init_iter_all(&iter_all); in squashfs_read_data() local
328 data = bvec_virt(bvec); in squashfs_read_data()
330 if (offset < bvec->bv_len - 1) { in squashfs_read_data()
337 data = bvec_virt(bvec); in squashfs_read_data()
H A Dlzo_wrapper.c70 struct bio_vec *bvec = bvec_init_iter_all(&iter_all); in lzo_uncompress() local
77 int avail = min(bytes, ((int)bvec->bv_len) - offset); in lzo_uncompress()
79 data = bvec_virt(bvec); in lzo_uncompress()
H A Dzlib_wrapper.c57 struct bio_vec *bvec = bvec_init_iter_all(&iter_all); in zlib_uncompress() local
83 avail = min(length, ((int)bvec->bv_len) - offset); in zlib_uncompress()
84 data = bvec_virt(bvec); in zlib_uncompress()
H A Dlz4_wrapper.c96 struct bio_vec *bvec = bvec_init_iter_all(&iter_all); in lz4_uncompress() local
102 int avail = min(bytes, ((int)bvec->bv_len) - offset); in lz4_uncompress()
104 data = bvec_virt(bvec); in lz4_uncompress()
H A Dzstd_wrapper.c72 struct bio_vec *bvec = bvec_init_iter_all(&iter_all); in zstd_uncompress() local
100 avail = min(length, ((int)bvec->bv_len) - offset); in zstd_uncompress()
101 data = bvec_virt(bvec); in zstd_uncompress()
H A Dxz_wrapper.c124 struct bio_vec *bvec = bvec_init_iter_all(&iter_all); in squashfs_xz_uncompress() local
152 avail = min(length, ((int)bvec->bv_len) - offset); in squashfs_xz_uncompress()
153 data = bvec_virt(bvec); in squashfs_xz_uncompress()
/linux/fs/nfs/
H A Dlocalio.c21 #include <linux/bvec.h>
38 struct bio_vec *bvec;
415 kfree(iocb->bvec); in nfs_local_iter_setup()
429 iocb->bvec = kmalloc_objs(struct bio_vec, hdr->page_array.npages, flags); in nfs_local_iters_setup_dio()
430 if (iocb->bvec == NULL) { in nfs_local_iters_setup_dio()
492 const struct bio_vec *bvec = i->bvec; in nfs_local_iters_init()
499 size_t len = bvec->bv_len; in nfs_local_iters_init()
503 if ((unsigned long)(bvec->bv_offset + skip) & addr_mask) in nfs_local_iters_init()
505 bvec in nfs_local_iters_init()
37 struct bio_vec *bvec; global() member
385 const struct bio_vec *bvec = i->bvec; nfs_iov_iter_aligned_bvec() local
407 nfs_local_iter_setup(struct iov_iter * iter,int rw,struct bio_vec * bvec,unsigned int nvecs,unsigned long total,size_t start,size_t len) nfs_local_iter_setup() argument
[all...]
/linux/fs/netfs/
H A Dbuffered_read.c532 struct bio_vec *bvec = NULL; in netfs_read_gaps() local
560 bvec = kmalloc_objs(*bvec, nr_bvec); in netfs_read_gaps()
561 if (!bvec) in netfs_read_gaps()
567 bvec_set_folio(&bvec[i++], folio, from, 0); in netfs_read_gaps()
577 bvec_set_folio(&bvec[i], sink, part, 0); in netfs_read_gaps()
583 bvec_set_folio(&bvec[i++], folio, flen - to, to); in netfs_read_gaps()
584 iov_iter_bvec(&rreq->buffer.iter, ITER_DEST, bvec, i, rreq->len); in netfs_read_gaps()
594 iov_iter_bvec(&iter, ITER_DEST, bvec, i, flen); in netfs_read_gaps()
610 folio_put(bvec_folio(&bvec[sink_from])); in netfs_read_gaps()
611 kfree(bvec); in netfs_read_gaps()
[all …]
/linux/Documentation/block/
H A Dbiovecs.rst20 bytes completed in the current bvec.
43 As of 5.12 bvec segments with zero bv_len are not supported.
52 exactly one bvec at a time - for example, bio_copy_data() in block/bio.c,
60 coding bvec iterators before, and having common implementation considerably
65 it somewhere else if there was an error) had to save the entire bvec array
68 * Biovecs can be shared between multiple bios - a bvec iter can represent an
76 bios with more than a single bvec! Now, we can efficiently split arbitrary
88 fine to _most_ devices, but since accessing the raw bvec array was the
90 since all drivers _must_ go through the bvec iterator - and have been
145 * The following helpers iterate over multi-page bvec. The passed 'struct
/linux/drivers/target/
H A Dtarget_core_file.c318 struct bio_vec *bvec; in fd_do_rw() local
323 bvec = kzalloc_objs(struct bio_vec, sgl_nents); in fd_do_rw()
324 if (!bvec) { in fd_do_rw()
330 bvec_set_page(&bvec[i], sg_page(sg), sg->length, sg->offset); in fd_do_rw()
334 iov_iter_bvec(&iter, is_write, bvec, sgl_nents, len); in fd_do_rw()
378 kfree(bvec); in fd_do_rw()
435 struct bio_vec *bvec; in fd_execute_write_same() local
458 bvec = kzalloc_objs(struct bio_vec, nolb); in fd_execute_write_same()
459 if (!bvec) in fd_execute_write_same()
463 bvec_set_page(&bvec[ in fd_execute_write_same()
[all...]
/linux/lib/tests/
H A Dkunit_iov_iter.c239 struct bio_vec *bvec, unsigned int bvmax, in iov_kunit_load_bvec() argument
260 bvec[i].bv_len += pr->to; in iov_kunit_load_bvec()
262 bvec_set_page(&bvec[i], page, pr->to - pr->from, pr->from); in iov_kunit_load_bvec()
272 iov_iter_bvec(iter, dir, bvec, i, size); in iov_kunit_load_bvec()
282 struct bio_vec bvec[8]; in iov_kunit_copy_to_bvec() local
298 iov_kunit_load_bvec(test, &iter, READ, bvec, ARRAY_SIZE(bvec), in iov_kunit_copy_to_bvec()
335 struct bio_vec bvec[8]; in iov_kunit_copy_from_bvec() local
351 iov_kunit_load_bvec(test, &iter, WRITE, bvec, ARRAY_SIZE(bvec), in iov_kunit_copy_from_bvec()
800 struct bio_vec bvec[8]; in iov_kunit_extract_pages_bvec() local
809 iov_kunit_load_bvec(test, &iter, READ, bvec, ARRAY_SIZE(bvec), in iov_kunit_extract_pages_bvec()
[all …]
/linux/fs/btrfs/
H A Dmisc.h59 struct bio_vec *bvec; in bio_get_size() local
63 bio_for_each_bvec_all(bvec, bio, i) in bio_get_size()
64 ret += bvec->bv_len; in bio_get_size()
/linux/net/rds/
H A Dtcp_send.c76 struct bio_vec bvec; in rds_tcp_xmit() local
120 bvec_set_page(&bvec, sg_page(&rm->data.op_sg[sg]), in rds_tcp_xmit()
123 iov_iter_bvec(&msg.msg_iter, ITER_SOURCE, &bvec, 1, in rds_tcp_xmit()
/linux/drivers/vhost/
H A Dvringh.c17 #include <linux/bvec.h>
1035 struct bio_vec *bvec;
1081 struct bio_vec *bvec = ivec->iov.bvec; in iotlb_translate()
1083 bvec_set_page(&bvec[ret], pfn_to_page(pfn), io_len, in iotlb_translate()
1108 struct bio_vec bvec[IOTLB_IOV_STRIDE]; in copy_from_iotlb()
1133 iov_iter_bvec(&iter, ITER_SOURCE, ivec.iov.bvec, ret, in copy_from_iotlb()
1155 struct bio_vec bvec[IOTLB_IOV_STRIDE]; in copy_to_iotlb()
1180 iov_iter_bvec(&iter, ITER_DEST, ivec.iov.bvec, ret, in copy_to_iotlb()
1202 struct bio_vec bvec[ in getu16_iotlb()
1034 struct bio_vec *bvec; global() member
1080 struct bio_vec *bvec = ivec->iov.bvec; iotlb_translate() local
1107 struct bio_vec bvec[IOTLB_IOV_STRIDE]; copy_from_iotlb() member
1154 struct bio_vec bvec[IOTLB_IOV_STRIDE]; copy_to_iotlb() member
1201 struct bio_vec bvec[1]; getu16_iotlb() member
1237 struct bio_vec bvec; putu16_iotlb() member
[all...]
/linux/drivers/nvdimm/
H A Dpmem.c206 struct bio_vec bvec; in pmem_submit_bio() local
224 bio_for_each_segment(bvec, bio, iter) { in pmem_submit_bio()
226 rc = pmem_do_write(pmem, bvec.bv_page, in pmem_submit_bio()
227 bvec.bv_offset, in pmem_submit_bio()
229 bvec.bv_len); in pmem_submit_bio()
231 rc = pmem_do_read(pmem, bvec.bv_page, in pmem_submit_bio()
232 bvec.bv_offset, in pmem_submit_bio()
234 bvec.bv_len); in pmem_submit_bio()
/linux/drivers/md/
H A Ddm-flakey.c365 struct bio_vec bvec; in corrupt_bio_common() local
371 __bio_for_each_segment(bvec, bio, iter, start) { in corrupt_bio_common()
373 unsigned char *segment = bvec_kmap_local(&bvec); in corrupt_bio_common()
475 struct bio_vec bvec = bvec_iter_bvec(bio->bi_io_vec, iter); in clone_bio() local
476 unsigned this_step = min(bvec.bv_len, to_copy); in clone_bio()
477 void *map = bvec_kmap_local(&bvec); in clone_bio()

1234