| /linux/include/linux/ |
| A D | bvec.h | 59 #define __bvec_iter_bvec(bvec, iter) (&(bvec)[(iter).bi_idx]) argument 86 #define bvec_iter_len(bvec, iter) \ argument 90 #define bvec_iter_page(bvec, iter) \ argument 94 #define bvec_iter_bvec(bvec, iter) \ argument 174 bv->bv_page = bvec->bv_page + (bvec->bv_offset >> PAGE_SHIFT); in bvec_advance() 178 bvec->bv_len - iter_all->done); in bvec_advance() 196 return kmap_local_page(bvec->bv_page) + bvec->bv_offset; in bvec_kmap_local() 207 memcpy_from_page(to, bvec->bv_page, bvec->bv_offset, bvec->bv_len); in memcpy_from_bvec() 218 memcpy_to_page(bvec->bv_page, bvec->bv_offset, from, bvec->bv_len); in memcpy_to_bvec() 229 memzero_page(bvec->bv_page, bvec->bv_offset, bvec->bv_len); in memzero_bvec() [all …]
|
| /linux/drivers/block/zram/ |
| A D | zram_drv.c | 626 if (!bio_add_page(bio, bvec->bv_page, bvec->bv_len, bvec->bv_offset)) { in read_from_bdev_async() 697 struct bio_vec bvec; in writeback_store() local 701 bvec.bv_offset = 0; in writeback_store() 755 bio_add_page(&bio, bvec.bv_page, bvec.bv_len, in writeback_store() 756 bvec.bv_offset); in writeback_store() 821 struct bio_vec bvec; member 845 work.bvec = *bvec; in read_from_bdev_sync() 1274 bvec.bv_offset = 0; in __zram_bvec_read() 1342 memcpy(dst + bvec->bv_offset, src + offset, bvec->bv_len); in zram_bvec_read() 1478 vec = *bvec; in zram_bvec_write() [all …]
|
| /linux/block/ |
| A D | blk-map.c | 48 struct bio_vec *bvec; in bio_copy_from_iter() local 55 bvec->bv_offset, in bio_copy_from_iter() 56 bvec->bv_len, in bio_copy_from_iter() 62 if (ret < bvec->bv_len) in bio_copy_from_iter() 79 struct bio_vec *bvec; in bio_copy_to_iter() local 86 bvec->bv_offset, in bio_copy_to_iter() 87 bvec->bv_len, in bio_copy_to_iter() 93 if (ret < bvec->bv_len) in bio_copy_to_iter() 399 struct bio_vec *bvec; in bio_copy_kern_endio_read() local 403 memcpy_from_bvec(p, bvec); in bio_copy_kern_endio_read() [all …]
|
| A D | bio.c | 889 struct bio_vec *bvec; in bio_add_hw_page() local 917 bvec->bv_page = page; in bio_add_hw_page() 918 bvec->bv_len = len; in bio_add_hw_page() 919 bvec->bv_offset = offset; in bio_add_hw_page() 1039 struct bio_vec *bvec; in __bio_release_pages() local 1044 put_page(bvec->bv_page); in __bio_release_pages() 1317 struct bio_vec *bvec; in bio_free_pages() local 1321 __free_page(bvec->bv_page); in bio_free_pages() 1356 struct bio_vec *bvec; in bio_set_pages_dirty() local 1404 struct bio_vec *bvec; in bio_check_pages_dirty() local [all …]
|
| A D | blk-merge.c | 445 struct bio_vec *bvec, struct scatterlist *sglist, in blk_bvec_map_sg() argument 448 unsigned nbytes = bvec->bv_len; in blk_bvec_map_sg() 452 unsigned offset = bvec->bv_offset + total; in blk_bvec_map_sg() 455 struct page *page = bvec->bv_page; in blk_bvec_map_sg() 493 int nbytes = bvec->bv_len; in __blk_segment_map_sg_merge() 501 if (!biovec_phys_mergeable(q, bvprv, bvec)) in __blk_segment_map_sg_merge() 513 struct bio_vec bvec, bvprv = { NULL }; in __blk_bios_map_sg() local 519 bio_for_each_bvec(bvec, bio, iter) { in __blk_bios_map_sg() 529 if (bvec.bv_offset + bvec.bv_len <= PAGE_SIZE) in __blk_bios_map_sg() 530 nsegs += __blk_bvec_map_sg(bvec, sglist, sg); in __blk_bios_map_sg() [all …]
|
| A 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()
|
| /linux/fs/squashfs/ |
| A D | block.c | 39 struct bio_vec *bvec = bvec_init_iter_all(&iter_all); in copy_bio_to_actor() local 47 int bytes_to_copy = min_t(int, bvec->bv_len - offset, in copy_bio_to_actor() 52 memcpy(actor_addr + actor_offset, bvec_virt(bvec) + offset, in copy_bio_to_actor() 65 if (offset >= bvec->bv_len) { in copy_bio_to_actor() 164 struct bio_vec *bvec = bvec_init_iter_all(&iter_all); in squashfs_read_data() local 179 data = bvec_virt(bvec); in squashfs_read_data() 181 if (offset < bvec->bv_len - 1) { in squashfs_read_data() 188 data = bvec_virt(bvec); in squashfs_read_data()
|
| A D | zlib_wrapper.c | 57 struct bio_vec *bvec = bvec_init_iter_all(&iter_all); in zlib_uncompress() local 78 avail = min(length, ((int)bvec->bv_len) - offset); in zlib_uncompress() 79 data = bvec_virt(bvec); in zlib_uncompress()
|
| 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()
|
| 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()
|
| A D | zstd_wrapper.c | 72 struct bio_vec *bvec = bvec_init_iter_all(&iter_all); in zstd_uncompress() local 96 avail = min(length, ((int)bvec->bv_len) - offset); in zstd_uncompress() 97 data = bvec_virt(bvec); in zstd_uncompress()
|
| A D | xz_wrapper.c | 124 struct bio_vec *bvec = bvec_init_iter_all(&iter_all); in squashfs_xz_uncompress() local 148 avail = min(length, ((int)bvec->bv_len) - offset); in squashfs_xz_uncompress() 149 data = bvec_virt(bvec); in squashfs_xz_uncompress()
|
| /linux/drivers/nvme/target/ |
| A D | io-cmd-file.c | 120 iov_iter_bvec(&iter, rw, req->f.bvec, nr_segs, count); in nvmet_file_submit_bvec() 134 if (req->f.bvec != req->inline_bvec) { in nvmet_file_io_done() 136 kfree(req->f.bvec); in nvmet_file_io_done() 138 mempool_free(req->f.bvec, req->ns->bvec_pool); in nvmet_file_io_done() 168 nvmet_file_init_bvec(&req->f.bvec[bv_cnt], sg); in nvmet_file_execute_io() 169 len += req->f.bvec[bv_cnt].bv_len; in nvmet_file_execute_io() 170 total_len += req->f.bvec[bv_cnt].bv_len; in nvmet_file_execute_io() 256 req->f.bvec = kmalloc_array(nr_bvec, sizeof(struct bio_vec), in nvmet_file_execute_rw() 259 req->f.bvec = req->inline_bvec; in nvmet_file_execute_rw() 261 if (unlikely(!req->f.bvec)) { in nvmet_file_execute_rw() [all …]
|
| /linux/drivers/target/ |
| A D | target_core_file.c | 317 struct bio_vec *bvec; in fd_do_rw() local 323 if (!bvec) { in fd_do_rw() 329 bvec[i].bv_page = sg_page(sg); in fd_do_rw() 330 bvec[i].bv_len = sg->length; in fd_do_rw() 331 bvec[i].bv_offset = sg->offset; in fd_do_rw() 380 kfree(bvec); in fd_do_rw() 437 struct bio_vec *bvec; in fd_execute_write_same() local 462 if (!bvec) in fd_execute_write_same() 467 bvec[i].bv_len = cmd->t_data_sg[0].length; in fd_execute_write_same() 473 iov_iter_bvec(&iter, READ, bvec, nolb, len); in fd_execute_write_same() [all …]
|
| /linux/arch/m68k/emu/ |
| A D | nfblock.c | 64 struct bio_vec bvec; in nfhd_submit_bio() local 71 bio_for_each_segment(bvec, bio, iter) { in nfhd_submit_bio() 72 len = bvec.bv_len; in nfhd_submit_bio() 75 page_to_phys(bvec.bv_page) + bvec.bv_offset); in nfhd_submit_bio()
|
| /linux/drivers/block/ |
| 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()
|
| A D | loop.c | 240 iov_iter_bvec(&i, WRITE, bvec, 1, bvec->bv_len); in lo_write_bvec() 260 struct bio_vec bvec; in lo_write_simple() local 277 struct bio_vec bvec; in lo_read_simple() local 283 iov_iter_bvec(&i, READ, &bvec, 1, bvec.bv_len); in lo_read_simple() 379 kfree(cmd->bvec); in lo_rw_aio_do_completion() 380 cmd->bvec = NULL; in lo_rw_aio_do_completion() 414 if (!bvec) in lo_rw_aio() 416 cmd->bvec = bvec; in lo_rw_aio() 425 *bvec = tmp; in lo_rw_aio() 426 bvec++; in lo_rw_aio() [all …]
|
| A D | brd.c | 289 struct bio_vec bvec; in brd_submit_bio() local 292 bio_for_each_segment(bvec, bio, iter) { in brd_submit_bio() 293 unsigned int len = bvec.bv_len; in brd_submit_bio() 297 WARN_ON_ONCE((bvec.bv_offset & (SECTOR_SIZE - 1)) || in brd_submit_bio() 300 err = brd_do_bvec(brd, bvec.bv_page, len, bvec.bv_offset, in brd_submit_bio()
|
| /linux/Documentation/block/ |
| 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 145 * The following helpers iterate over multi-page bvec. The passed 'struct
|
| /linux/lib/ |
| A D | iov_iter.c | 124 const struct bio_vec *bvec = i->bvec; \ 128 bvec, (K)) \ 129 i->nr_segs -= bvec - i->bvec; \ 130 i->bvec = bvec; \ 1039 i->bvec += bi.bi_idx; in iov_iter_bvec_advance() 1130 const struct bio_vec *bvec = i->bvec; in iov_iter_revert() local 1135 i->bvec = bvec; in iov_iter_revert() 1196 .bvec = bvec, in iov_iter_bvec() 1506 len = i->bvec->bv_len - skip; in first_bvec_segment() 1509 skip += i->bvec->bv_offset; in first_bvec_segment() [all …]
|
| /linux/fs/btrfs/ |
| A D | compression.c | 209 struct bio_vec *bvec; in dec_and_test_compressed_bio() local 217 bio_for_each_segment_all(bvec, bio, iter_all) in dec_and_test_compressed_bio() 218 bi_size += bvec->bv_len; in dec_and_test_compressed_bio() 252 struct bio_vec *bvec; in finish_compressed_bio_read() local 264 bvec->bv_offset; in finish_compressed_bio_read() 267 bvec->bv_page, bvec_start, in finish_compressed_bio_read() 268 bvec->bv_len); in finish_compressed_bio_read() 1443 struct bio_vec bvec; in btrfs_decompress_buf2page() local 1454 bvec_offset = page_offset(bvec.bv_page) + bvec.bv_offset - cb->start; in btrfs_decompress_buf2page() 1470 memcpy_to_page(bvec.bv_page, bvec.bv_offset, in btrfs_decompress_buf2page() [all …]
|
| A D | file-item.c | 328 struct bio_vec bvec; in search_file_offset_in_bio() local 332 bio_for_each_segment(bvec, bio, iter) { in search_file_offset_in_bio() 333 struct page *page = bvec.bv_page; in search_file_offset_in_bio() 337 if (cur + bvec.bv_len <= disk_bytenr) { in search_file_offset_in_bio() 338 cur += bvec.bv_len; in search_file_offset_in_bio() 341 ASSERT(in_range(disk_bytenr, cur, bvec.bv_len)); in search_file_offset_in_bio() 631 struct bio_vec bvec; in btrfs_csum_one_bio() local 661 bio_for_each_segment(bvec, bio, iter) { in btrfs_csum_one_bio() 663 offset = page_offset(bvec.bv_page) + bvec.bv_offset; in btrfs_csum_one_bio() 682 bvec.bv_len + fs_info->sectorsize in btrfs_csum_one_bio() [all …]
|
| /linux/net/sunrpc/ |
| A D | svcsock.c | 236 for_each_bvec(bv, bvec, bi, bi) in svc_flush_bvec() 256 struct bio_vec *bvec = rqstp->rq_bvec; in svc_tcp_read_msg() local 267 bvec[i].bv_page = rqstp->rq_pages[i]; in svc_tcp_read_msg() 268 bvec[i].bv_len = PAGE_SIZE; in svc_tcp_read_msg() 269 bvec[i].bv_offset = 0; in svc_tcp_read_msg() 281 svc_flush_bvec(bvec, len, seek); in svc_tcp_read_msg() 1117 struct bio_vec *bvec; in svc_tcp_sendmsg() local 1119 bvec = xdr->bvec + (xdr->page_base >> PAGE_SHIFT); in svc_tcp_sendmsg() 1124 ret = kernel_sendpage(sock, bvec->bv_page, in svc_tcp_sendmsg() 1125 bvec->bv_offset + offset, in svc_tcp_sendmsg() [all …]
|
| /linux/arch/xtensa/platforms/iss/ |
| A D | simdisk.c | 106 struct bio_vec bvec; in simdisk_submit_bio() local 110 bio_for_each_segment(bvec, bio, iter) { in simdisk_submit_bio() 111 char *buffer = kmap_atomic(bvec.bv_page) + bvec.bv_offset; in simdisk_submit_bio() 112 unsigned len = bvec.bv_len >> SECTOR_SHIFT; in simdisk_submit_bio()
|
| /linux/drivers/nvdimm/ |
| A D | blk.c | 171 struct bio_vec bvec; in nd_blk_submit_bio() local 183 bio_for_each_segment(bvec, bio, iter) { in nd_blk_submit_bio() 184 unsigned int len = bvec.bv_len; in nd_blk_submit_bio() 187 err = nsblk_do_bvec(nsblk, bip, bvec.bv_page, len, in nd_blk_submit_bio() 188 bvec.bv_offset, rw, iter.bi_sector); in nd_blk_submit_bio()
|