/linux-6.6.21/include/linux/ |
D | bvec.h | 98 #define __bvec_iter_bvec(bvec, iter) (&(bvec)[(iter).bi_idx]) argument 101 #define mp_bvec_iter_page(bvec, iter) \ argument 102 (__bvec_iter_bvec((bvec), (iter))->bv_page) 104 #define mp_bvec_iter_len(bvec, iter) \ argument 106 __bvec_iter_bvec((bvec), (iter))->bv_len - (iter).bi_bvec_done) 108 #define mp_bvec_iter_offset(bvec, iter) \ argument 109 (__bvec_iter_bvec((bvec), (iter))->bv_offset + (iter).bi_bvec_done) 111 #define mp_bvec_iter_page_idx(bvec, iter) \ argument 112 (mp_bvec_iter_offset((bvec), (iter)) / PAGE_SIZE) 114 #define mp_bvec_iter_bvec(bvec, iter) \ argument [all …]
|
/linux-6.6.21/fs/erofs/ |
D | zdata.c | 31 struct z_erofs_bvec bvec[total]; \ 200 unsigned long base = (unsigned long)((struct z_erofs_bvset *)0)->bvec; in z_erofs_bvset_flip() 232 struct z_erofs_bvec *bvec, in z_erofs_bvec_enqueue() argument 252 iter->bvset->bvec[iter->cur++] = *bvec; in z_erofs_bvec_enqueue() 257 struct z_erofs_bvec *bvec, in z_erofs_bvec_dequeue() argument 264 *bvec = iter->bvset->bvec[iter->cur++]; in z_erofs_bvec_dequeue() 725 struct z_erofs_bvec *bvec) in z_erofs_try_inplace_io() argument 731 NULL, bvec->page)) { in z_erofs_try_inplace_io() 732 pcl->compressed_bvecs[fe->icur] = *bvec; in z_erofs_try_inplace_io() 741 struct z_erofs_bvec *bvec, bool exclusive) in z_erofs_attach_page() argument [all …]
|
/linux-6.6.21/lib/ |
D | iov_iter.c | 135 const struct bio_vec *bvec = i->bvec; \ 139 bvec, (K)) \ 140 i->nr_segs -= bvec - i->bvec; \ 141 i->bvec = bvec; \ 605 const struct bio_vec *bvec, *end; in iov_iter_bvec_advance() local 613 for (bvec = i->bvec, end = bvec + i->nr_segs; bvec < end; bvec++) { in iov_iter_bvec_advance() 614 if (likely(size < bvec->bv_len)) in iov_iter_bvec_advance() 616 size -= bvec->bv_len; 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() [all …]
|
D | kunit_iov_iter.c | 218 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()
|
/linux-6.6.21/block/ |
D | blk-map.c | 50 struct bio_vec *bvec; in bio_copy_from_iter() local 53 bio_for_each_segment_all(bvec, bio, iter_all) { in bio_copy_from_iter() 56 ret = copy_page_from_iter(bvec->bv_page, in bio_copy_from_iter() 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 84 bio_for_each_segment_all(bvec, bio, iter_all) { in bio_copy_to_iter() 87 ret = copy_page_to_iter(bvec->bv_page, in bio_copy_to_iter() 88 bvec->bv_offset, in bio_copy_to_iter() [all …]
|
D | bounce.c | 105 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()
|
D | blk-merge.c | 463 struct bio_vec *bvec, struct scatterlist *sglist, in blk_bvec_map_sg() argument 466 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() 507 __blk_segment_map_sg_merge(struct request_queue *q, struct bio_vec *bvec, in __blk_segment_map_sg_merge() argument 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() [all …]
|
/linux-6.6.21/mm/ |
D | page_io.c | 238 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() 395 iov_iter_bvec(&from, ITER_SOURCE, sio->bvec, sio->pages, sio->len); in swap_write_unplug() 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() [all …]
|
/linux-6.6.21/drivers/nvme/target/ |
D | io-cmd-file.c | 94 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 …]
|
/linux-6.6.21/fs/squashfs/ |
D | block.c | 39 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()
|
D | lzo_wrapper.c | 70 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()
|
D | zlib_wrapper.c | 57 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()
|
D | lz4_wrapper.c | 96 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()
|
D | zstd_wrapper.c | 72 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()
|
D | xz_wrapper.c | 124 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-6.6.21/arch/m68k/emu/ |
D | nfblock.c | 63 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()
|
/linux-6.6.21/drivers/block/ |
D | n64cart.c | 89 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()
|
D | loop.c | 87 struct bio_vec *bvec; member 239 static int lo_write_bvec(struct file *file, struct bio_vec *bvec, loff_t *ppos) in lo_write_bvec() argument 244 iov_iter_bvec(&i, ITER_SOURCE, bvec, 1, bvec->bv_len); in lo_write_bvec() 250 if (likely(bw == bvec->bv_len)) in lo_write_bvec() 255 (unsigned long long)*ppos, bvec->bv_len); in lo_write_bvec() 264 struct bio_vec bvec; in lo_write_simple() local 268 rq_for_each_segment(bvec, rq, iter) { in lo_write_simple() 269 ret = lo_write_bvec(lo->lo_backing_file, &bvec, &pos); in lo_write_simple() 281 struct bio_vec bvec; in lo_read_simple() local 286 rq_for_each_segment(bvec, rq, iter) { in lo_read_simple() [all …]
|
D | brd.c | 247 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()
|
/linux-6.6.21/Documentation/block/ |
D | biovecs.rst | 20 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
|
/linux-6.6.21/io_uring/ |
D | rsrc.c | 143 unpin_user_page(imu->bvec[i].bv_page); in io_buffer_unmap() 994 if (!PageCompound(imu->bvec[j].bv_page)) in headpage_already_acct() 996 if (compound_head(imu->bvec[j].bv_page) == hpage) in headpage_already_acct() 1125 imu = kvmalloc(struct_size(imu, bvec, nr_pages), GFP_KERNEL); in io_sqe_buffer_register() 1145 bvec_set_page(&imu->bvec[0], pages[0], size, off); in io_sqe_buffer_register() 1152 bvec_set_page(&imu->bvec[i], pages[i], vec_len, off); in io_sqe_buffer_register() 1243 iov_iter_bvec(iter, ddir, imu->bvec, imu->nr_bvecs, offset + len); in io_import_fixed() 1262 const struct bio_vec *bvec = imu->bvec; in io_import_fixed() local 1264 if (offset < bvec->bv_len) { in io_import_fixed() 1270 iter->bvec = bvec; in io_import_fixed() [all …]
|
/linux-6.6.21/drivers/target/ |
D | target_core_file.c | 318 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() 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() 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() [all …]
|
/linux-6.6.21/net/rds/ |
D | tcp_send.c | 76 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-6.6.21/drivers/vhost/ |
D | vringh.c | 1110 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 1294 void *kaddr = kmap_local_page(ivec.iov.bvec[0].bv_page); in getu16_iotlb() 1295 void *from = kaddr + ivec.iov.bvec[0].bv_offset; in getu16_iotlb() [all …]
|
/linux-6.6.21/fs/gfs2/ |
D | lops.c | 170 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 …]
|