| /linux/fs/erofs/ |
| H A D | zdata.c | 26 struct z_erofs_bvec bvec[total]; \ 150 unsigned long base = (unsigned long)((struct z_erofs_bvset *)0)->bvec; in z_erofs_bvset_flip() 182 struct z_erofs_bvec *bvec, in z_erofs_bvec_enqueue() argument 203 iter->bvset->bvec[iter->cur++] = *bvec; in z_erofs_bvec_enqueue() 208 struct z_erofs_bvec *bvec, in z_erofs_bvec_dequeue() argument 215 *bvec = iter->bvset->bvec[iter->cur++]; in z_erofs_bvec_dequeue() 620 struct z_erofs_bvec *bvec = pcl->compressed_bvecs; in z_erofs_cache_release_folio() local 621 struct z_erofs_bvec *end = bvec + z_erofs_pclusterpages(pcl); in z_erofs_cache_release_folio() 631 for (; bvec < end; ++bvec) { in z_erofs_cache_release_folio() 632 if (bvec->page && page_folio(bvec->page) == folio) { in z_erofs_cache_release_folio() [all …]
|
| /linux/block/ |
| H A D | bio-integrity.c | 262 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 D | blk-map.c | 69 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->bv_offset, in bio_copy_to_iter() [all …]
|
| H A D | bio-integrity-fs.c | 11 struct bio_vec bvec; member 27 bio_integrity_init(bio, &iib->bip, &iib->bvec, 1); in fs_bio_integrity_alloc()
|
| H A D | bio-integrity-auto.c | 21 struct bio_vec bvec; member 94 bio_integrity_init(bio, &bid->bip, &bid->bvec, 1); in bio_integrity_prep()
|
| /linux/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_objs(struct bio_vec, nr_bvec); in nvmet_file_execute_rw() 233 req->f.bvec = req->inline_bvec; in nvmet_file_execute_rw() 235 if (unlikely(!req->f.bvec)) { in nvmet_file_execute_rw() [all …]
|
| /linux/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() 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 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 | 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 | 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/io_uring/ |
| H A D | rsrc.c | 155 struct folio *folio = bvec_folio(&imu->bvec[i]); in io_rsrc_cache_init() 166 return kvmalloc_flex(struct io_mapped_ubuf, bvec, nr_bvecs); in io_rsrc_cache_init() 188 struct page *page = imu->bvec[i].bv_page; in io_rsrc_data_free() 244 const int imu_cache_size = struct_size_t(struct io_mapped_ubuf, bvec, in __io_sqe_files_update() 696 * This operates on the pages array since imu->bvec isn't populated yet. in io_coalesce_buffer() 892 /* If it's huge page(s), try to coalesce them into fewer bvec entries */ in io_sqe_buffers_register() 931 bvec_set_page(&imu->bvec[i], pages[i], vec_len, off); in io_buffer_register_bvec() 1070 imu->bvec[nr_bvecs++] = bv; in io_import_fixed() 1134 iov_iter_bvec(iter, ddir, imu->bvec, imu->nr_bvecs, count); in io_import_reg_buf() 1143 const struct bio_vec *bvec; in lock_two_rings() 1056 const struct bio_vec *bvec; io_import_fixed() local 1432 const struct bio_vec *bvec = imu->bvec; iov_kern_bvec_size() local [all...] |
| /linux/drivers/block/ |
| H A D | n64cart.c | 61 * Process a single bvec of a bio. 90 struct bio_vec bvec; in n64cart_submit_bio() 95 bio_for_each_segment(bvec, bio, iter) { in n64cart_submit_bio() 96 if (!n64cart_do_bvec(dev, &bvec, pos)) { in n64cart_submit_bio() 100 pos += bvec.bv_len; in n64cart_submit_bio() 89 struct bio_vec bvec; n64cart_submit_bio() local
|
| /linux/fs/nfs/ |
| H A D | localio.c | 37 struct bio_vec *bvec; member 309 kfree(iocb->bvec); in nfs_local_iocb_free() 323 iocb->bvec = kmalloc_objs(struct bio_vec, hdr->page_array.npages, flags); in nfs_local_iocb_alloc() 324 if (iocb->bvec == NULL) { in nfs_local_iocb_alloc() 386 const struct bio_vec *bvec = i->bvec; in nfs_iov_iter_aligned_bvec() local 393 size_t len = bvec->bv_len; in nfs_iov_iter_aligned_bvec() 397 if ((unsigned long)(bvec->bv_offset + skip) & addr_mask) in nfs_iov_iter_aligned_bvec() 399 bvec++; in nfs_iov_iter_aligned_bvec() 408 nfs_local_iter_setup(struct iov_iter *iter, int rw, struct bio_vec *bvec, in nfs_local_iter_setup() argument 412 iov_iter_bvec(iter, rw, bvec, nvecs, total); in nfs_local_iter_setup() [all …]
|
| /linux/drivers/target/ |
| H A D | target_core_file.c | 318 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[i], sg_page(&cmd->t_data_sg[0]), in fd_execute_write_same() [all …]
|
| /linux/lib/tests/ |
| H A D | kunit_iov_iter.c | 231 struct bio_vec *bvec, unsigned int bvmax, in iov_kunit_load_bvec() argument 252 bvec[i].bv_len += pr->to; in iov_kunit_load_bvec() 254 bvec_set_page(&bvec[i], page, pr->to - pr->from, pr->from); in iov_kunit_load_bvec() 264 iov_iter_bvec(iter, dir, bvec, i, size); in iov_kunit_load_bvec() 274 struct bio_vec bvec[8]; in iov_kunit_copy_to_bvec() local 290 iov_kunit_load_bvec(test, &iter, READ, bvec, ARRAY_SIZE(bvec), in iov_kunit_copy_to_bvec() 328 struct bio_vec bvec[8]; in iov_kunit_copy_from_bvec() local 344 iov_kunit_load_bvec(test, &iter, WRITE, bvec, ARRAY_SIZE(bvec), in iov_kunit_copy_from_bvec() 793 struct bio_vec bvec[8]; in iov_kunit_extract_pages_bvec() local 802 iov_kunit_load_bvec(test, &iter, READ, bvec, ARRAY_SIZE(bvec), in iov_kunit_extract_pages_bvec() [all …]
|
| /linux/fs/netfs/ |
| H A D | buffered_read.c | 402 struct bio_vec *bvec; in netfs_read_gaps() local 430 bvec = kmalloc_objs(*bvec, nr_bvec); in netfs_read_gaps() 431 if (!bvec) in netfs_read_gaps() 436 kfree(bvec); in netfs_read_gaps() 442 rreq->direct_bv = bvec; in netfs_read_gaps() 445 bvec_set_folio(&bvec[i++], folio, from, 0); in netfs_read_gaps() 450 bvec_set_folio(&bvec[i++], sink, part, 0); in netfs_read_gaps() 454 bvec_set_folio(&bvec[i++], folio, flen - to, to); in netfs_read_gaps() 455 iov_iter_bvec(&rreq->buffer.iter, ITER_DEST, bvec, i, rreq->len); in netfs_read_gaps()
|
| /linux/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()
|
| /linux/drivers/vhost/ |
| H A D | vringh.c | 1034 struct bio_vec *bvec; member 1080 struct bio_vec *bvec = ivec->iov.bvec; in iotlb_translate() local 1082 bvec_set_page(&bvec[ret], pfn_to_page(pfn), io_len, in iotlb_translate() 1107 struct bio_vec bvec[IOTLB_IOV_STRIDE]; in copy_from_iotlb() member 1132 iov_iter_bvec(&iter, ITER_SOURCE, ivec.iov.bvec, ret, in copy_from_iotlb() 1154 struct bio_vec bvec[IOTLB_IOV_STRIDE]; in copy_to_iotlb() member 1179 iov_iter_bvec(&iter, ITER_DEST, ivec.iov.bvec, ret, in copy_to_iotlb() 1201 struct bio_vec bvec[1]; in getu16_iotlb() member 1220 __virtio16 *from = bvec_kmap_local(&ivec.iov.bvec[0]); in getu16_iotlb() 1237 struct bio_vec bvec; in putu16_iotlb() member [all …]
|
| /linux/arch/xtensa/platforms/iss/ |
| H A D | simdisk.c | 107 struct bio_vec bvec; in simdisk_submit_bio() local 111 bio_for_each_segment(bvec, bio, iter) { in simdisk_submit_bio() 112 char *buffer = bvec_kmap_local(&bvec); in simdisk_submit_bio() 113 unsigned len = bvec.bv_len >> SECTOR_SHIFT; in simdisk_submit_bio()
|
| /linux/include/linux/ |
| H A D | bio.h | 123 /* @bytes should be less or equal to bvec[i->bi_idx].bv_len */ 144 * complete doesn't align with a bvec boundary, then bv_len and bv_offset will 145 * be updated on the last bvec as well. 173 /* iterate over multi-page bvec */ 185 #define bio_iter_last(bvec, iter) ((iter).bi_size == (bvec).bv_len) argument 279 struct bio_vec *bvec = bio_first_bvec_all(bio) + i; in bio_first_folio() local 286 fi->folio = bvec_folio(bvec); in bio_first_folio() 287 fi->offset = bvec->bv_offset + in bio_first_folio() 288 PAGE_SIZE * folio_page_idx(fi->folio, bvec in bio_first_folio() [all...] |
| /linux/drivers/md/ |
| H A D | dm-io.c | 219 struct bio_vec bvec = bvec_iter_bvec((struct bio_vec *)dp->context_ptr, in bio_get_page() local 222 *p = bvec.bv_page; in bio_get_page() 223 *len = bvec.bv_len; in bio_get_page() 224 *offset = bvec.bv_offset; in bio_get_page() 227 dp->context_bi.bi_sector = (sector_t)bvec.bv_len; in bio_get_page()
|
| H A D | dm-flakey.c | 365 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()
|
| /linux/drivers/mtd/ |
| H A D | mtd_blkdevs.c | 50 struct bio_vec bvec; in do_blktrans_request() local 76 rq_for_each_segment(bvec, req, iter) in do_blktrans_request() 77 flush_dcache_page(bvec.bv_page); in do_blktrans_request() 83 rq_for_each_segment(bvec, req, iter) in do_blktrans_request() 84 flush_dcache_page(bvec.bv_page); in do_blktrans_request()
|