| /linux-6.15/include/linux/ |
| H A D | bvec.h | 98 #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 219 bv->bv_page = bvec->bv_page + (bvec->bv_offset >> PAGE_SHIFT); in bvec_advance() 223 bvec->bv_len - iter_all->done); in bvec_advance() 241 return kmap_local_page(bvec->bv_page) + bvec->bv_offset; in bvec_kmap_local() 252 memcpy_from_page(to, bvec->bv_page, bvec->bv_offset, bvec->bv_len); in memcpy_from_bvec() 263 memcpy_to_page(bvec->bv_page, bvec->bv_offset, from, bvec->bv_len); in memcpy_to_bvec() 274 memzero_page(bvec->bv_page, bvec->bv_offset, bvec->bv_len); in memzero_bvec() 286 return page_address(bvec->bv_page) + bvec->bv_offset; in bvec_virt() [all …]
|
| H A D | bio.h | 170 #define bio_iter_last(bvec, iter) ((iter).bi_size == (bvec).bv_len) argument 285 struct bio_vec *bvec = bio_first_bvec_all(bio) + i; in bio_first_folio() local 292 fi->folio = page_folio(bvec->bv_page); in bio_first_folio() 293 fi->offset = bvec->bv_offset + in bio_first_folio() 294 PAGE_SIZE * (bvec->bv_page - &fi->folio->page); in bio_first_folio() 295 fi->_seg_count = bvec->bv_len; in bio_first_folio()
|
| /linux-6.15/block/ |
| H A D | bio-integrity.c | 173 iov_iter_bvec(&iter, direction, bvec, nr_vecs, len); 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() 226 memcpy(bip->bip_vec, bvec, nr_vecs * sizeof(*bvec)); in bio_integrity_init_user() 287 bvec = kcalloc(nr_vecs, sizeof(*bvec), GFP_KERNEL); in bio_integrity_map_user() 288 if (!bvec) in bio_integrity_map_user() 311 if (bvec != stack_vec) in bio_integrity_map_user() 312 kfree(bvec); in bio_integrity_map_user() 317 bio_integrity_unpin_bvec(bvec, nr_bvecs); in bio_integrity_map_user() 319 if (bvec != stack_vec) in bio_integrity_map_user() [all …]
|
| H A D | blk-map.c | 50 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() 392 struct bio_vec *bvec; in bio_copy_kern_endio_read() local 396 memcpy_from_bvec(p, bvec); in bio_copy_kern_endio_read() [all …]
|
| H A D | bounce.c | 103 struct bio_vec *bvec, orig_vec; in bounce_end_io() local 110 bio_for_each_segment_all(bvec, bio, iter_all) { in bounce_end_io() 112 if (bvec->bv_page != orig_vec.bv_page) { in bounce_end_io() 113 dec_zone_page_state(bvec->bv_page, NR_BOUNCE); in bounce_end_io() 114 mempool_free(bvec->bv_page, &page_pool); in bounce_end_io()
|
| /linux-6.15/fs/erofs/ |
| H A D | zdata.c | 202 iter->bvset->bvec[iter->cur++] = *bvec; in z_erofs_bvec_enqueue() 214 *bvec = iter->bvset->bvec[iter->cur++]; in z_erofs_bvec_dequeue() 606 for (; bvec < end; ++bvec) { in z_erofs_cache_release_folio() 607 if (bvec->page && page_folio(bvec->page) == folio) { in z_erofs_cache_release_folio() 608 bvec->page = NULL; in z_erofs_cache_release_folio() 1116 bvec->offset + bvec->end == be->pcl->length)) { in z_erofs_do_decompressed_bvec() 1129 item->bvec = *bvec; in z_erofs_do_decompressed_bvec() 1144 cur = bvi->bvec.offset < 0 ? -bvi->bvec.offset : 0; in z_erofs_fill_other_copies() 1457 bvec->bv_offset = 0; in z_erofs_fill_bio_vec() 1484 bvec->bv_len = round_up(zbv.end, bs) - bvec->bv_offset; in z_erofs_fill_bio_vec() [all …]
|
| /linux-6.15/lib/ |
| H A D | iov_iter.c | 503 for (bvec = i->bvec, end = bvec + i->nr_segs; bvec < end; bvec++) { in iov_iter_bvec_advance() 509 i->nr_segs -= bvec - i->bvec; in iov_iter_bvec_advance() 510 i->bvec = bvec; in iov_iter_bvec_advance() 631 const struct bio_vec *bvec = i->bvec; in iov_iter_revert() local 636 i->bvec = bvec; in iov_iter_revert() 703 .bvec = bvec, in iov_iter_bvec() 818 const struct bio_vec *bvec = i->bvec; in iov_iter_aligned_bvec() local 832 bvec++; in iov_iter_aligned_bvec() 909 const struct bio_vec *bvec = i->bvec; in iov_iter_alignment_bvec() local 920 bvec++; in iov_iter_alignment_bvec() [all …]
|
| /linux-6.15/io_uring/ |
| H A D | rsrc.c | 934 struct bio_vec bv, *bvec; in io_buffer_register_bvec() local 975 bvec = imu->bvec; in io_buffer_register_bvec() 977 *bvec++ = bv; in io_buffer_register_bvec() 1044 const struct bio_vec *bvec = iter->bvec; in io_import_kbuf() local 1047 len -= bvec->bv_len; in io_import_kbuf() 1048 bvec++; in io_import_kbuf() 1050 iter->nr_segs = 1 + bvec - iter->bvec; in io_import_kbuf() 1089 bvec = imu->bvec; in io_import_fixed() 1094 offset -= bvec->bv_len; in io_import_fixed() 1096 bvec += seg_skip; in io_import_fixed() [all …]
|
| /linux-6.15/drivers/nvme/target/ |
| H A 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.15/fs/squashfs/ |
| H A 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()
|
| H A 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()
|
| H A 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()
|
| H A 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()
|
| H A 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()
|
| H A 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.15/mm/ |
| H A D | page_io.c | 326 struct bio_vec bvec[SWAP_CLUSTER_MAX]; member 348 struct page *page = sio->bvec[0].bv_page; in sio_write_complete() 363 page = sio->bvec[p].bv_page; in sio_write_complete() 370 end_page_writeback(sio->bvec[p].bv_page); in sio_write_complete() 402 bvec_set_folio(&sio->bvec[sio->pages], folio, folio_size(folio), 0); in swap_writepage_fs() 405 if (sio->pages == ARRAY_SIZE(sio->bvec) || !wbc->swap_plug) { in swap_writepage_fs() 482 iov_iter_bvec(&from, ITER_SOURCE, sio->bvec, sio->pages, sio->len); in swap_write_unplug() 495 struct folio *folio = page_folio(sio->bvec[p].bv_page); in sio_read_complete() 505 struct folio *folio = page_folio(sio->bvec[p].bv_page); in sio_read_complete() 570 if (sio->pages == ARRAY_SIZE(sio->bvec) || !plug) { in swap_read_folio_fs() [all …]
|
| /linux-6.15/drivers/block/ |
| H A 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()
|
| H A D | brd.c | 248 struct bio_vec bvec; in brd_submit_bio() local 257 bio_for_each_segment(bvec, bio, iter) { in brd_submit_bio() 258 unsigned int len = bvec.bv_len; in brd_submit_bio() 262 WARN_ON_ONCE((bvec.bv_offset & (SECTOR_SIZE - 1)) || in brd_submit_bio() 265 err = brd_do_bvec(brd, bvec.bv_page, len, bvec.bv_offset, in brd_submit_bio()
|
| /linux-6.15/arch/m68k/emu/ |
| H A 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 bvec_phys(&bvec)); in nfhd_submit_bio()
|
| /linux-6.15/Documentation/block/ |
| H A 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.15/drivers/target/ |
| H A 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() 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 = kcalloc(nolb, sizeof(struct bio_vec), GFP_KERNEL); in fd_execute_write_same() 459 if (!bvec) in fd_execute_write_same() 463 bvec_set_page(&bvec[i], sg_page(&cmd->t_data_sg[0]), in fd_execute_write_same() 469 iov_iter_bvec(&iter, ITER_SOURCE, bvec, nolb, len); in fd_execute_write_same() [all …]
|
| /linux-6.15/fs/netfs/ |
| H A D | buffered_read.c | 406 struct bio_vec *bvec; in netfs_read_gaps() local 434 bvec = kmalloc_array(nr_bvec, sizeof(*bvec), GFP_KERNEL); in netfs_read_gaps() 435 if (!bvec) in netfs_read_gaps() 440 kfree(bvec); in netfs_read_gaps() 446 rreq->direct_bv = bvec; in netfs_read_gaps() 449 bvec_set_folio(&bvec[i++], folio, from, 0); in netfs_read_gaps() 454 bvec_set_folio(&bvec[i++], sink, part, 0); in netfs_read_gaps() 458 bvec_set_folio(&bvec[i++], folio, flen - to, to); in netfs_read_gaps() 459 iov_iter_bvec(&rreq->buffer.iter, ITER_DEST, bvec, i, rreq->len); in netfs_read_gaps()
|
| /linux-6.15/fs/nfs/ |
| H A D | localio.c | 35 struct bio_vec *bvec; member 304 struct bio_vec *bvec, *p; in nfs_bvec_alloc_and_import_pagevec() local 306 bvec = kmalloc_array(npages, sizeof(*bvec), flags); in nfs_bvec_alloc_and_import_pagevec() 307 if (bvec != NULL) { in nfs_bvec_alloc_and_import_pagevec() 308 for (p = bvec; npages > 0; p++, pagevec++, npages--) { in nfs_bvec_alloc_and_import_pagevec() 314 return bvec; in nfs_bvec_alloc_and_import_pagevec() 320 kfree(iocb->bvec); in nfs_local_iocb_free() 333 iocb->bvec = nfs_bvec_alloc_and_import_pagevec(hdr->page_array.pagevec, in nfs_local_iocb_alloc() 335 if (iocb->bvec == NULL) { in nfs_local_iocb_alloc() 360 iov_iter_bvec(i, dir, iocb->bvec, hdr->page_array.npages, in nfs_local_iter_init()
|
| /linux-6.15/lib/tests/ |
| H A D | kunit_iov_iter.c | 219 struct bio_vec *bvec, unsigned int bvmax, in iov_kunit_load_bvec() argument 240 bvec[i].bv_len += pr->to; in iov_kunit_load_bvec() 242 bvec_set_page(&bvec[i], page, pr->to - pr->from, pr->from); in iov_kunit_load_bvec() 252 iov_iter_bvec(iter, dir, bvec, i, size); in iov_kunit_load_bvec() 262 struct bio_vec bvec[8]; in iov_kunit_copy_to_bvec() local 278 iov_kunit_load_bvec(test, &iter, READ, bvec, ARRAY_SIZE(bvec), in iov_kunit_copy_to_bvec() 316 struct bio_vec bvec[8]; in iov_kunit_copy_from_bvec() local 332 iov_kunit_load_bvec(test, &iter, WRITE, bvec, ARRAY_SIZE(bvec), in iov_kunit_copy_from_bvec() 784 struct bio_vec bvec[8]; in iov_kunit_extract_pages_bvec() local 793 iov_kunit_load_bvec(test, &iter, READ, bvec, ARRAY_SIZE(bvec), in iov_kunit_extract_pages_bvec()
|
| /linux-6.15/net/rds/ |
| H A 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()
|