/kernel/linux/linux-5.10/include/linux/ |
D | bvec.h | 58 #define __bvec_iter_bvec(bvec, iter) (&(bvec)[(iter).bi_idx]) argument 61 #define mp_bvec_iter_page(bvec, iter) \ argument 62 (__bvec_iter_bvec((bvec), (iter))->bv_page) 64 #define mp_bvec_iter_len(bvec, iter) \ argument 66 __bvec_iter_bvec((bvec), (iter))->bv_len - (iter).bi_bvec_done) 68 #define mp_bvec_iter_offset(bvec, iter) \ argument 69 (__bvec_iter_bvec((bvec), (iter))->bv_offset + (iter).bi_bvec_done) 71 #define mp_bvec_iter_page_idx(bvec, iter) \ argument 72 (mp_bvec_iter_offset((bvec), (iter)) / PAGE_SIZE) 74 #define mp_bvec_iter_bvec(bvec, iter) \ argument [all …]
|
D | bio.h | 175 #define bio_iter_last(bvec, iter) ((iter).bi_size == (bvec).bv_len) argument 507 static inline char *bvec_kmap_irq(struct bio_vec *bvec, unsigned long *flags) in bvec_kmap_irq() argument 516 addr = (unsigned long) kmap_atomic(bvec->bv_page); in bvec_kmap_irq() 520 return (char *) addr + bvec->bv_offset; in bvec_kmap_irq() 532 static inline char *bvec_kmap_irq(struct bio_vec *bvec, unsigned long *flags) in bvec_kmap_irq() argument 534 return page_address(bvec->bv_page) + bvec->bv_offset; in bvec_kmap_irq()
|
/kernel/linux/linux-5.10/fs/squashfs/ |
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() 53 page_address(bvec->bv_page) + bvec->bv_offset + offset, in copy_bio_to_actor() 66 if (offset >= bvec->bv_len) { in copy_bio_to_actor() 165 struct bio_vec *bvec = bvec_init_iter_all(&iter_all); in squashfs_read_data() local 180 data = page_address(bvec->bv_page) + bvec->bv_offset; in squashfs_read_data() 182 if (offset < bvec->bv_len - 1) { in squashfs_read_data() 189 data = page_address(bvec->bv_page) + bvec->bv_offset; in squashfs_read_data()
|
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 = page_address(bvec->bv_page) + bvec->bv_offset; in zlib_uncompress()
|
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 = page_address(bvec->bv_page) + bvec->bv_offset; in lzo_uncompress()
|
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 = page_address(bvec->bv_page) + bvec->bv_offset; in zstd_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 = page_address(bvec->bv_page) + bvec->bv_offset; in lz4_uncompress()
|
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 = page_address(bvec->bv_page) + bvec->bv_offset; in squashfs_xz_uncompress()
|
/kernel/linux/linux-5.10/drivers/block/zram/ |
D | zram_drv.c | 63 static int zram_bvec_read(struct zram *zram, struct bio_vec *bvec, 95 static inline bool is_partial_io(struct bio_vec *bvec) in is_partial_io() argument 97 return bvec->bv_len != PAGE_SIZE; in is_partial_io() 100 static inline bool is_partial_io(struct bio_vec *bvec) in is_partial_io() argument 130 static void update_position(u32 *index, int *offset, struct bio_vec *bvec) in update_position() argument 132 *index += (*offset + bvec->bv_len) / PAGE_SIZE; in update_position() 133 *offset = (*offset + bvec->bv_len) % PAGE_SIZE; in update_position() 541 static int read_from_bdev_async(struct zram *zram, struct bio_vec *bvec, in read_from_bdev_async() argument 552 if (!bio_add_page(bio, bvec->bv_page, bvec->bv_len, bvec->bv_offset)) { in read_from_bdev_async() 610 struct bio_vec bvec; in writeback_store() local [all …]
|
/kernel/linux/linux-5.10/block/ |
D | blk-map.c | 48 struct bio_vec *bvec; in bio_copy_from_iter() local 51 bio_for_each_segment_all(bvec, bio, iter_all) { in bio_copy_from_iter() 54 ret = copy_page_from_iter(bvec->bv_page, in bio_copy_from_iter() 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 82 bio_for_each_segment_all(bvec, bio, iter_all) { in bio_copy_to_iter() 85 ret = copy_page_to_iter(bvec->bv_page, in bio_copy_to_iter() 86 bvec->bv_offset, in bio_copy_to_iter() [all …]
|
D | bio.c | 795 struct bio_vec *bvec; in bio_add_hw_page() local 811 bvec = &bio->bi_io_vec[bio->bi_vcnt - 1]; in bio_add_hw_page() 812 if (bvec_gap_to_prev(q, bvec, offset)) in bio_add_hw_page() 822 bvec = &bio->bi_io_vec[bio->bi_vcnt]; in bio_add_hw_page() 823 bvec->bv_page = page; in bio_add_hw_page() 824 bvec->bv_len = len; in bio_add_hw_page() 825 bvec->bv_offset = offset; in bio_add_hw_page() 951 struct bio_vec *bvec; in bio_release_pages() local 956 bio_for_each_segment_all(bvec, bio, iter_all) { in bio_release_pages() 957 if (mark_dirty && !PageCompound(bvec->bv_page)) in bio_release_pages() [all …]
|
D | blk-merge.c | 418 struct bio_vec *bvec, struct scatterlist *sglist, in blk_bvec_map_sg() argument 421 unsigned nbytes = bvec->bv_len; in blk_bvec_map_sg() 425 unsigned offset = bvec->bv_offset + total; in blk_bvec_map_sg() 426 unsigned len = min(get_max_segment_size(q, bvec->bv_page, in blk_bvec_map_sg() 428 struct page *page = bvec->bv_page; in blk_bvec_map_sg() 462 __blk_segment_map_sg_merge(struct request_queue *q, struct bio_vec *bvec, in __blk_segment_map_sg_merge() argument 466 int nbytes = bvec->bv_len; in __blk_segment_map_sg_merge() 474 if (!biovec_phys_mergeable(q, bvprv, bvec)) in __blk_segment_map_sg_merge() 486 struct bio_vec bvec, bvprv = { NULL }; in __blk_bios_map_sg() local 492 bio_for_each_bvec(bvec, bio, iter) { in __blk_bios_map_sg() [all …]
|
D | bounce.c | 165 struct bio_vec *bvec, orig_vec; in bounce_end_io() local 172 bio_for_each_segment_all(bvec, bio, iter_all) { in bounce_end_io() 174 if (bvec->bv_page != orig_vec.bv_page) { in bounce_end_io() 175 dec_zone_page_state(bvec->bv_page, NR_BOUNCE); in bounce_end_io() 176 mempool_free(bvec->bv_page, pool); in bounce_end_io()
|
/kernel/linux/linux-5.10/drivers/target/ |
D | target_core_file.c | 271 struct bio_vec *bvec; in fd_execute_rw_aio() local 279 bvec = kcalloc(sgl_nents, sizeof(struct bio_vec), GFP_KERNEL); in fd_execute_rw_aio() 280 if (!bvec) { in fd_execute_rw_aio() 286 bvec[i].bv_page = sg_page(sg); in fd_execute_rw_aio() 287 bvec[i].bv_len = sg->length; in fd_execute_rw_aio() 288 bvec[i].bv_offset = sg->offset; in fd_execute_rw_aio() 293 iov_iter_bvec(&iter, is_write, bvec, sgl_nents, len); in fd_execute_rw_aio() 310 kfree(bvec); in fd_execute_rw_aio() 324 struct bio_vec *bvec; in fd_do_rw() local 329 bvec = kcalloc(sgl_nents, sizeof(struct bio_vec), GFP_KERNEL); in fd_do_rw() [all …]
|
/kernel/linux/linux-5.10/drivers/nvme/target/ |
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 …]
|
/kernel/linux/linux-5.10/fs/9p/ |
D | vfs_addr.c | 42 struct bio_vec bvec = {.bv_page = page, .bv_len = PAGE_SIZE}; in v9fs_fid_readpage() local 54 iov_iter_bvec(&to, READ, &bvec, 1, PAGE_SIZE); in v9fs_fid_readpage() 154 struct bio_vec bvec; in v9fs_vfs_writepage_locked() local 162 bvec.bv_page = page; in v9fs_vfs_writepage_locked() 163 bvec.bv_offset = 0; in v9fs_vfs_writepage_locked() 164 bvec.bv_len = len; in v9fs_vfs_writepage_locked() 165 iov_iter_bvec(&from, WRITE, &bvec, 1, len); in v9fs_vfs_writepage_locked()
|
/kernel/linux/linux-5.10/drivers/block/ |
D | loop.c | 267 static int lo_write_bvec(struct file *file, struct bio_vec *bvec, loff_t *ppos) in lo_write_bvec() argument 272 iov_iter_bvec(&i, WRITE, bvec, 1, bvec->bv_len); in lo_write_bvec() 278 if (likely(bw == bvec->bv_len)) in lo_write_bvec() 283 (unsigned long long)*ppos, bvec->bv_len); in lo_write_bvec() 292 struct bio_vec bvec; in lo_write_simple() local 296 rq_for_each_segment(bvec, rq, iter) { in lo_write_simple() 297 ret = lo_write_bvec(lo->lo_backing_file, &bvec, &pos); in lo_write_simple() 314 struct bio_vec bvec, b; in lo_write_transfer() local 323 rq_for_each_segment(bvec, rq, iter) { in lo_write_transfer() 324 ret = lo_do_transfer(lo, WRITE, page, 0, bvec.bv_page, in lo_write_transfer() [all …]
|
D | brd.c | 288 struct bio_vec bvec; in brd_submit_bio() local 296 bio_for_each_segment(bvec, bio, iter) { in brd_submit_bio() 297 unsigned int len = bvec.bv_len; in brd_submit_bio() 301 WARN_ON_ONCE((bvec.bv_offset & (SECTOR_SIZE - 1)) || in brd_submit_bio() 304 err = brd_do_bvec(brd, bvec.bv_page, len, bvec.bv_offset, in brd_submit_bio()
|
/kernel/linux/linux-5.10/arch/m68k/emu/ |
D | nfblock.c | 65 struct bio_vec bvec; in nfhd_submit_bio() local 72 bio_for_each_segment(bvec, bio, iter) { in nfhd_submit_bio() 73 len = bvec.bv_len; in nfhd_submit_bio() 76 page_to_phys(bvec.bv_page) + bvec.bv_offset); in nfhd_submit_bio()
|
/kernel/linux/linux-5.10/drivers/s390/block/ |
D | xpram.c | 188 struct bio_vec bvec; in xpram_submit_bio() local 206 bio_for_each_segment(bvec, bio, iter) { in xpram_submit_bio() 208 kmap(bvec.bv_page) + bvec.bv_offset; in xpram_submit_bio() 209 bytes = bvec.bv_len; in xpram_submit_bio()
|
/kernel/linux/linux-5.10/Documentation/block/ |
D | biovecs.rst | 20 bytes completed in the current bvec. 50 exactly one bvec at a time - for example, bio_copy_data() in block/bio.c, 58 coding bvec iterators before, and having common implementation considerably 63 it somewhere else if there was an error) had to save the entire bvec array 66 * Biovecs can be shared between multiple bios - a bvec iter can represent an 74 bios with more than a single bvec! Now, we can efficiently split arbitrary 86 fine to _most_ devices, but since accessing the raw bvec array was the 88 since all drivers _must_ go through the bvec iterator - and have been 143 * The following helpers iterate over multi-page bvec. The passed 'struct
|
/kernel/linux/linux-5.10/net/sunrpc/ |
D | svcsock.c | 228 static void svc_flush_bvec(const struct bio_vec *bvec, size_t size, size_t seek) in svc_flush_bvec() argument 235 bvec_iter_advance(bvec, &bi, seek & PAGE_MASK); in svc_flush_bvec() 236 for_each_bvec(bv, bvec, bi, bi) in svc_flush_bvec() 240 static inline void svc_flush_bvec(const struct bio_vec *bvec, size_t size, in svc_flush_bvec() argument 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() 274 iov_iter_bvec(&msg.msg_iter, READ, bvec, i, buflen); in svc_tcp_read_msg() 281 svc_flush_bvec(bvec, len, seek); in svc_tcp_read_msg() [all …]
|
/kernel/linux/linux-5.10/drivers/nvdimm/ |
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()
|
D | pmem.c | 198 struct bio_vec bvec; in pmem_submit_bio() local 209 bio_for_each_segment(bvec, bio, iter) { in pmem_submit_bio() 211 rc = pmem_do_write(pmem, bvec.bv_page, bvec.bv_offset, in pmem_submit_bio() 212 iter.bi_sector, bvec.bv_len); in pmem_submit_bio() 214 rc = pmem_do_read(pmem, bvec.bv_page, bvec.bv_offset, in pmem_submit_bio() 215 iter.bi_sector, bvec.bv_len); in pmem_submit_bio()
|
/kernel/linux/linux-5.10/arch/xtensa/platforms/iss/ |
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 = kmap_atomic(bvec.bv_page) + bvec.bv_offset; in simdisk_submit_bio() 113 unsigned len = bvec.bv_len >> SECTOR_SHIFT; in simdisk_submit_bio()
|