Home
last modified time | relevance | path

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

1234

/openbmc/linux/include/linux/
H A Dbvec.h98 #define __bvec_iter_bvec(bvec, iter) (&(bvec)[(iter).bi_idx]) argument
125 #define bvec_iter_len(bvec, iter) \ argument
129 #define bvec_iter_page(bvec, iter) \ argument
213 bv->bv_page = bvec->bv_page + (bvec->bv_offset >> PAGE_SHIFT); in bvec_advance()
217 bvec->bv_len - iter_all->done); in bvec_advance()
220 if (iter_all->done == bvec->bv_len) { in bvec_advance()
235 return kmap_local_page(bvec->bv_page) + bvec->bv_offset; in bvec_kmap_local()
246 memcpy_from_page(to, bvec->bv_page, bvec->bv_offset, bvec->bv_len); in memcpy_from_bvec()
257 memcpy_to_page(bvec->bv_page, bvec->bv_offset, from, bvec->bv_len); in memcpy_to_bvec()
268 memzero_page(bvec->bv_page, bvec->bv_offset, bvec->bv_len); in memzero_bvec()
[all …]
/openbmc/linux/fs/erofs/
H A Dzdata.c232 struct z_erofs_bvec *bvec, in z_erofs_bvec_enqueue() argument
252 iter->bvset->bvec[iter->cur++] = *bvec; in z_erofs_bvec_enqueue()
264 *bvec = iter->bvset->bvec[iter->cur++]; in z_erofs_bvec_dequeue()
731 NULL, bvec->page)) { in z_erofs_try_inplace_io()
1103 struct z_erofs_bvec bvec; member
1115 bvec->offset + bvec->end == be->pcl->length)) { in z_erofs_do_decompressed_bvec()
1126 item->bvec = *bvec; in z_erofs_do_decompressed_bvec()
1142 cur = bvi->bvec.offset < 0 ? -bvi->bvec.offset : 0; in z_erofs_fill_other_copies()
1144 bvi->bvec.end); in z_erofs_fill_other_copies()
1181 struct z_erofs_bvec bvec; in z_erofs_parse_out_bvecs() local
[all …]
/openbmc/linux/lib/
H A Diov_iter.c135 const struct bio_vec *bvec = i->bvec; \
140 i->nr_segs -= bvec - i->bvec; \
141 i->bvec = bvec; \
613 for (bvec = i->bvec, end = bvec + i->nr_segs; bvec < end; bvec++) { in iov_iter_bvec_advance()
619 i->nr_segs -= bvec - i->bvec; in iov_iter_bvec_advance()
620 i->bvec = bvec; in iov_iter_bvec_advance()
680 const struct bio_vec *bvec = i->bvec; in iov_iter_revert() local
685 i->bvec = bvec; in iov_iter_revert()
748 .bvec = bvec, in iov_iter_bvec()
1321 return new->bvec = kmemdup(new->bvec, in dup_iter()
[all …]
H A Dkunit_iov_iter.c218 struct bio_vec *bvec, unsigned int bvmax, in iov_kunit_load_bvec() argument
239 bvec[i].bv_len += pr->to; in iov_kunit_load_bvec()
241 bvec_set_page(&bvec[i], page, pr->to - pr->from, pr->from); in iov_kunit_load_bvec()
251 iov_iter_bvec(iter, dir, bvec, i, size); in iov_kunit_load_bvec()
261 struct bio_vec bvec[8]; in iov_kunit_copy_to_bvec() local
277 iov_kunit_load_bvec(test, &iter, READ, bvec, ARRAY_SIZE(bvec), in iov_kunit_copy_to_bvec()
315 struct bio_vec bvec[8]; in iov_kunit_copy_from_bvec() local
331 iov_kunit_load_bvec(test, &iter, WRITE, bvec, ARRAY_SIZE(bvec), in iov_kunit_copy_from_bvec()
610 struct bio_vec bvec[8]; in iov_kunit_extract_pages_bvec() local
619 iov_kunit_load_bvec(test, &iter, READ, bvec, ARRAY_SIZE(bvec), in iov_kunit_extract_pages_bvec()
/openbmc/linux/block/
H A Dblk-map.c50 struct bio_vec *bvec; in bio_copy_from_iter() local
57 bvec->bv_offset, in bio_copy_from_iter()
58 bvec->bv_len, in bio_copy_from_iter()
64 if (ret < bvec->bv_len) in bio_copy_from_iter()
81 struct bio_vec *bvec; in bio_copy_to_iter() local
88 bvec->bv_offset, in bio_copy_to_iter()
89 bvec->bv_len, in bio_copy_to_iter()
95 if (ret < bvec->bv_len) in bio_copy_to_iter()
452 struct bio_vec *bvec; in bio_copy_kern_endio_read() local
456 memcpy_from_bvec(p, bvec); in bio_copy_kern_endio_read()
[all …]
H A Dbounce.c105 struct bio_vec *bvec, orig_vec; in bounce_end_io() local
112 bio_for_each_segment_all(bvec, bio, iter_all) { in bounce_end_io()
114 if (bvec->bv_page != orig_vec.bv_page) { in bounce_end_io()
115 dec_zone_page_state(bvec->bv_page, NR_BOUNCE); in bounce_end_io()
116 mempool_free(bvec->bv_page, &page_pool); in bounce_end_io()
H A Dblk-merge.c466 unsigned nbytes = bvec->bv_len; in blk_bvec_map_sg()
470 unsigned offset = bvec->bv_offset + total; in blk_bvec_map_sg()
472 bvec->bv_page, offset), nbytes); in blk_bvec_map_sg()
473 struct page *page = bvec->bv_page; in blk_bvec_map_sg()
511 int nbytes = bvec->bv_len; in __blk_segment_map_sg_merge()
519 if (!biovec_phys_mergeable(q, bvprv, bvec)) in __blk_segment_map_sg_merge()
531 struct bio_vec bvec, bvprv = { NULL }; in __blk_bios_map_sg() local
537 bio_for_each_bvec(bvec, bio, iter) { in __blk_bios_map_sg()
547 if (bvec.bv_offset + bvec.bv_len <= PAGE_SIZE) in __blk_bios_map_sg()
548 nsegs += __blk_bvec_map_sg(bvec, sglist, sg); in __blk_bios_map_sg()
[all …]
/openbmc/linux/mm/
H A Dpage_io.c238 struct bio_vec bvec[SWAP_CLUSTER_MAX]; member
260 struct page *page = sio->bvec[0].bv_page; in sio_write_complete()
277 page = sio->bvec[p].bv_page; in sio_write_complete()
283 count_swpout_vm_event(page_folio(sio->bvec[p].bv_page)); in sio_write_complete()
287 end_page_writeback(sio->bvec[p].bv_page); in sio_write_complete()
318 bvec_set_page(&sio->bvec[sio->pages], page, thp_size(page), 0); in swap_writepage_fs()
321 if (sio->pages == ARRAY_SIZE(sio->bvec) || !wbc->swap_plug) { in swap_writepage_fs()
408 struct folio *folio = page_folio(sio->bvec[p].bv_page); in sio_read_complete()
416 struct folio *folio = page_folio(sio->bvec[p].bv_page); in sio_read_complete()
449 bvec_set_page(&sio->bvec[sio->pages], page, thp_size(page), 0); in swap_readpage_fs()
[all …]
/openbmc/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()
142 bvec_set_page(&req->f.bvec[bv_cnt], sg_page(sg), sg->length, in nvmet_file_execute_io()
144 len += req->f.bvec[bv_cnt].bv_len; in nvmet_file_execute_io()
145 total_len += req->f.bvec[bv_cnt].bv_len; in nvmet_file_execute_io()
231 req->f.bvec = kmalloc_array(nr_bvec, sizeof(struct bio_vec), in nvmet_file_execute_rw()
234 req->f.bvec = req->inline_bvec; in nvmet_file_execute_rw()
236 if (unlikely(!req->f.bvec)) { in nvmet_file_execute_rw()
[all …]
/openbmc/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()
286 struct bio_vec *bvec = bvec_init_iter_all(&iter_all); in squashfs_read_data() local
301 data = bvec_virt(bvec); in squashfs_read_data()
303 if (offset < bvec->bv_len - 1) { in squashfs_read_data()
310 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()
/openbmc/linux/arch/m68k/emu/
H A Dnfblock.c63 struct bio_vec bvec; in nfhd_submit_bio() local
70 bio_for_each_segment(bvec, bio, iter) { in nfhd_submit_bio()
71 len = bvec.bv_len; in nfhd_submit_bio()
74 page_to_phys(bvec.bv_page) + bvec.bv_offset); in nfhd_submit_bio()
/openbmc/linux/drivers/block/
H A Dn64cart.c89 struct bio_vec bvec; in n64cart_submit_bio() local
94 bio_for_each_segment(bvec, bio, iter) { in n64cart_submit_bio()
95 if (!n64cart_do_bvec(dev, &bvec, pos)) { in n64cart_submit_bio()
99 pos += bvec.bv_len; in n64cart_submit_bio()
H A Dloop.c87 struct bio_vec *bvec; member
244 iov_iter_bvec(&i, ITER_SOURCE, bvec, 1, bvec->bv_len); in lo_write_bvec()
264 struct bio_vec bvec; in lo_write_simple() local
287 iov_iter_bvec(&i, ITER_DEST, &bvec, 1, bvec.bv_len); in lo_read_simple()
378 kfree(cmd->bvec); in lo_rw_aio_do_completion()
379 cmd->bvec = NULL; in lo_rw_aio_do_completion()
413 if (!bvec) in lo_rw_aio()
415 cmd->bvec = bvec; in lo_rw_aio()
424 *bvec = tmp; in lo_rw_aio()
425 bvec++; in lo_rw_aio()
[all …]
H A Dbrd.c247 struct bio_vec bvec; in brd_submit_bio() local
250 bio_for_each_segment(bvec, bio, iter) { in brd_submit_bio()
251 unsigned int len = bvec.bv_len; in brd_submit_bio()
255 WARN_ON_ONCE((bvec.bv_offset & (SECTOR_SIZE - 1)) || in brd_submit_bio()
258 err = brd_do_bvec(brd, bvec.bv_page, len, bvec.bv_offset, in brd_submit_bio()
/openbmc/linux/io_uring/
H A Drsrc.c142 unpin_user_page(imu->bvec[i].bv_page); in io_buffer_unmap()
833 if (!PageCompound(imu->bvec[j].bv_page)) in headpage_already_acct()
835 if (compound_head(imu->bvec[j].bv_page) == hpage) in headpage_already_acct()
984 bvec_set_page(&imu->bvec[0], pages[0], size, off); in io_sqe_buffer_register()
1101 const struct bio_vec *bvec = imu->bvec; in io_import_fixed() local
1103 if (offset < bvec->bv_len) { in io_import_fixed()
1109 iter->bvec = bvec; in io_import_fixed()
1110 iter->nr_segs = bvec->bv_len; in io_import_fixed()
1117 offset -= bvec->bv_len; in io_import_fixed()
1120 iter->bvec = bvec + seg_skip; in io_import_fixed()
[all …]
/openbmc/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
146 * The following helpers iterate over multi-page bvec. The passed 'struct
/openbmc/linux/drivers/target/
H A Dtarget_core_file.c318 struct bio_vec *bvec; in fd_do_rw() local
323 bvec = kcalloc(sgl_nents, sizeof(struct bio_vec), GFP_KERNEL); in fd_do_rw()
324 if (!bvec) { in fd_do_rw()
334 iov_iter_bvec(&iter, is_write, bvec, sgl_nents, len); in fd_do_rw()
380 kfree(bvec); in fd_do_rw()
437 struct bio_vec *bvec; in fd_execute_write_same() local
460 bvec = kcalloc(nolb, sizeof(struct bio_vec), GFP_KERNEL); in fd_execute_write_same()
461 if (!bvec) in fd_execute_write_same()
465 bvec_set_page(&bvec[i], sg_page(&cmd->t_data_sg[0]), in fd_execute_write_same()
471 iov_iter_bvec(&iter, ITER_SOURCE, bvec, nolb, len); in fd_execute_write_same()
[all …]
/openbmc/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()
/openbmc/linux/drivers/vhost/
H A Dvringh.c1110 struct bio_vec *bvec; member
1156 struct bio_vec *bvec = ivec->iov.bvec; in iotlb_translate() local
1158 bvec_set_page(&bvec[ret], pfn_to_page(pfn), io_len, in iotlb_translate()
1183 struct bio_vec bvec[IOTLB_IOV_STRIDE]; in copy_from_iotlb() member
1207 iov_iter_bvec(&iter, ITER_SOURCE, ivec.iov.bvec, ret, in copy_from_iotlb()
1229 struct bio_vec bvec[IOTLB_IOV_STRIDE]; in copy_to_iotlb() member
1253 iov_iter_bvec(&iter, ITER_DEST, ivec.iov.bvec, ret, in copy_to_iotlb()
1275 struct bio_vec bvec[1]; in getu16_iotlb() member
1295 void *from = kaddr + ivec.iov.bvec[0].bv_offset; in getu16_iotlb()
1312 struct bio_vec bvec; in putu16_iotlb() member
[all …]
/openbmc/linux/fs/gfs2/
H A Dlops.c170 struct bio_vec *bvec, in gfs2_end_log_write_bh() argument
174 struct page *page = bvec->bv_page; in gfs2_end_log_write_bh()
178 size = bvec->bv_len; in gfs2_end_log_write_bh()
179 while (bh_offset(bh) < bvec->bv_offset) in gfs2_end_log_write_bh()
205 struct bio_vec *bvec; in gfs2_end_log_write() local
219 bio_for_each_segment_all(bvec, bio, iter_all) { in gfs2_end_log_write()
220 page = bvec->bv_page; in gfs2_end_log_write()
222 gfs2_end_log_write_bh(sdp, bvec, bio->bi_status); in gfs2_end_log_write()
398 struct bio_vec *bvec; in gfs2_end_log_read() local
401 bio_for_each_segment_all(bvec, bio, iter_all) { in gfs2_end_log_read()
[all …]

1234