/linux/lib/ |
H A D | iov_iter.c | 172 .nr_segs = nr_segs, in iov_iter_init() 571 i->nr_segs++; in iov_iter_revert() 583 i->nr_segs++; in iov_iter_revert() 619 .nr_segs = nr_segs, in iov_iter_kvec() 635 .nr_segs = nr_segs, in iov_iter_bvec() 1033 i->nr_segs--; in __iov_iter_get_pages_alloc() 1395 i->bvec -= state->nr_segs - i->nr_segs; in iov_iter_restore() 1397 i->__iov -= state->nr_segs - i->nr_segs; in iov_iter_restore() 1398 i->nr_segs = state->nr_segs; in iov_iter_restore() 1468 i->nr_segs--; in iov_iter_extract_bvec_pages() [all …]
|
H A D | kunit_iov_iter.c | 126 KUNIT_EXPECT_EQ(test, iter.nr_segs, 0); in iov_kunit_copy_to_kvec() 176 KUNIT_EXPECT_EQ(test, iter.nr_segs, 0); in iov_kunit_copy_from_kvec() 285 KUNIT_EXPECT_EQ(test, iter.nr_segs, 0); in iov_kunit_copy_to_bvec() 339 KUNIT_EXPECT_EQ(test, iter.nr_segs, 0); in iov_kunit_copy_from_bvec()
|
/linux/include/linux/ |
H A D | uio.h | 38 unsigned long nr_segs; member 76 unsigned long nr_segs; member 101 state->nr_segs = iter->nr_segs; in iov_iter_save_state() 156 for (seg = 0; seg < nr_segs; seg++) in iov_length() 270 unsigned long nr_segs, size_t count); 272 unsigned long nr_segs, size_t count); 274 unsigned long nr_segs, size_t count); 337 unsigned long nr_segs, unsigned long fast_segs, 340 unsigned nr_segs, unsigned fast_segs, struct iovec **iovp, 343 unsigned nr_segs, unsigned fast_segs, struct iovec **iovp, [all …]
|
H A D | iov_iter.h | 63 iter->nr_segs -= p - iter->__iov; in iterate_iovec() 97 iter->nr_segs -= p - iter->kvec; in iterate_kvec() 136 iter->nr_segs -= p - iter->bvec; in iterate_bvec()
|
/linux/net/core/ |
H A D | net_test.c | 51 unsigned int nr_segs; member 60 .nr_segs = 1, 67 .nr_segs = 3, 76 .nr_segs = 3, 84 .nr_segs = 3, 93 .nr_segs = 2, 103 .nr_segs = 3, 111 .nr_segs = 2, 121 .nr_segs = 4, 135 .nr_segs = 4, [all …]
|
/linux/block/ |
H A D | blk-merge.c | 352 unsigned int *nr_segs) in __bio_split_to_limits() argument 366 split = bio_split_rw(bio, lim, nr_segs, bs, in __bio_split_to_limits() 401 unsigned int nr_segs; in bio_split_to_limits() local 652 unsigned int nr_segs) in ll_front_merge_fn() argument 979 struct bio *bio, unsigned int nr_segs) in bio_attempt_back_merge() argument 983 if (!ll_back_merge_fn(req, bio, nr_segs)) in bio_attempt_back_merge() 1008 struct bio *bio, unsigned int nr_segs) in bio_attempt_front_merge() argument 1020 if (!ll_front_merge_fn(req, bio, nr_segs)) in bio_attempt_front_merge() 1071 unsigned int nr_segs, in blk_attempt_bio_merge() argument 1116 unsigned int nr_segs) in blk_attempt_plug_merge() argument [all …]
|
H A D | blk-map.c | 26 if (data->nr_segs > UIO_MAXIOV) in bio_alloc_map_data() 29 bmd = kmalloc(struct_size(bmd, iov, data->nr_segs), gfp_mask); in bio_alloc_map_data() 541 unsigned int nr_segs = 0; in blk_rq_append_bio() local 544 nr_segs++; in blk_rq_append_bio() 547 blk_rq_bio_prep(rq, bio, nr_segs); in blk_rq_append_bio() 549 if (!ll_back_merge_fn(rq, bio, nr_segs)) in blk_rq_append_bio() 566 size_t nr_segs = iter->nr_segs; in blk_rq_map_user_bvec() local 575 if (nr_segs > queue_max_segments(q)) in blk_rq_map_user_bvec() 584 blk_rq_bio_prep(rq, bio, nr_segs); in blk_rq_map_user_bvec() 588 for (i = 0; i < nr_segs; i++) { in blk_rq_map_user_bvec() [all …]
|
H A D | blk-mq-sched.h | 11 unsigned int nr_segs, struct request **merged_request); 13 unsigned int nr_segs);
|
H A D | blk.h | 280 struct bio *bio, unsigned int nr_segs); 282 unsigned int nr_segs); 284 struct bio *bio, unsigned int nr_segs); 345 unsigned int *nr_segs); 347 unsigned int nr_segs);
|
H A D | blk-mq-sched.c | 338 unsigned int nr_segs) in blk_mq_sched_bio_merge() argument 347 ret = e->type->ops.bio_merge(q, bio, nr_segs); in blk_mq_sched_bio_merge() 365 if (blk_bio_list_merge(q, &ctx->rq_lists[type], bio, nr_segs)) in blk_mq_sched_bio_merge()
|
H A D | blk-crypto-fallback.c | 162 unsigned int nr_segs = bio_segments(bio_src); in blk_crypto_fallback_clone_bio() local 167 bio = bio_kmalloc(nr_segs, GFP_NOIO); in blk_crypto_fallback_clone_bio() 170 bio_init(bio, bio_src->bi_bdev, bio->bi_inline_vecs, nr_segs, in blk_crypto_fallback_clone_bio()
|
H A D | blk-zoned.c | 852 struct bio *bio, unsigned int nr_segs) in blk_zone_wplug_add_bio() argument 873 bio->__bi_nr_segments = nr_segs; in blk_zone_wplug_add_bio() 1039 static bool blk_zone_wplug_handle_write(struct bio *bio, unsigned int nr_segs) in blk_zone_wplug_handle_write() argument 1104 blk_zone_wplug_add_bio(zwplug, bio, nr_segs); in blk_zone_wplug_handle_write() 1123 bool blk_zone_plug_bio(struct bio *bio, unsigned int nr_segs) in blk_zone_plug_bio() argument 1172 return blk_zone_wplug_handle_write(bio, nr_segs); in blk_zone_plug_bio()
|
H A D | blk-mq.c | 2544 unsigned int nr_segs) in blk_mq_bio_to_request() argument 2553 blk_rq_bio_prep(rq, bio, nr_segs); in blk_mq_bio_to_request() 2837 struct bio *bio, unsigned int nr_segs) in blk_mq_attempt_bio_merge() argument 2840 if (blk_attempt_plug_merge(q, bio, nr_segs)) in blk_mq_attempt_bio_merge() 2842 if (blk_mq_sched_bio_merge(q, bio, nr_segs)) in blk_mq_attempt_bio_merge() 2936 unsigned int nr_segs = 1; in blk_mq_submit_bio() local 2952 nr_segs = bio->__bi_nr_segments; in blk_mq_submit_bio() 2970 bio = __bio_split_to_limits(bio, &q->limits, &nr_segs); in blk_mq_submit_bio() 2977 if (blk_mq_attempt_bio_merge(q, bio, nr_segs)) in blk_mq_submit_bio() 2985 rq = blk_mq_get_new_requests(q, plug, bio, nr_segs); in blk_mq_submit_bio() [all …]
|
/linux/fs/smb/server/ |
H A D | transport_tcp.c | 117 unsigned int nr_segs, size_t bytes) in kvec_array_init() argument 128 nr_segs--; in kvec_array_init() 133 memcpy(new, iov, sizeof(*iov) * nr_segs); in kvec_array_init() 136 return nr_segs; in kvec_array_init() 146 static struct kvec *get_conn_iovec(struct tcp_transport *t, unsigned int nr_segs) in get_conn_iovec() argument 150 if (t->iov && nr_segs <= t->nr_iov) in get_conn_iovec() 154 new_iov = kmalloc_array(nr_segs, sizeof(*new_iov), GFP_KERNEL); in get_conn_iovec() 158 t->nr_iov = nr_segs; in get_conn_iovec() 305 unsigned int nr_segs, unsigned int to_read, in ksmbd_tcp_readv() argument 315 iov = get_conn_iovec(t, nr_segs); in ksmbd_tcp_readv() [all …]
|
/linux/arch/powerpc/mm/ |
H A D | dma-noncoherent.c | 65 int nr_segs = 1 + ((size - seg_size) + PAGE_SIZE - 1)/PAGE_SIZE; in __dma_sync_page_highmem() local 84 } while (seg_nr < nr_segs); in __dma_sync_page_highmem()
|
/linux/drivers/scsi/ |
H A D | xen-scsifront.c | 1132 unsigned int sg_grant, nr_segs; in scsifront_read_backend_params() local 1136 nr_segs = min_t(unsigned int, sg_grant, SG_ALL); in scsifront_read_backend_params() 1137 nr_segs = max_t(unsigned int, nr_segs, VSCSIIF_SG_TABLESIZE); in scsifront_read_backend_params() 1138 nr_segs = min_t(unsigned int, nr_segs, in scsifront_read_backend_params() 1143 dev_info(&dev->dev, "using up to %d SG entries\n", nr_segs); in scsifront_read_backend_params() 1144 else if (info->pause && nr_segs < host->sg_tablesize) in scsifront_read_backend_params() 1147 host->sg_tablesize, nr_segs); in scsifront_read_backend_params() 1149 host->sg_tablesize = nr_segs; in scsifront_read_backend_params() 1150 host->max_sectors = (nr_segs - 1) * PAGE_SIZE / 512; in scsifront_read_backend_params()
|
/linux/drivers/hwtracing/intel_th/ |
H A D | msu.c | 74 unsigned int nr_segs; member 330 for_each_sg(win->sgt->sgl, sg, win->nr_segs, blk) { in msc_win_total_sz() 425 for_each_sg(win->sgt->sgl, sg, win->nr_segs, blk) { in msc_win_oldest_sg() 662 for_each_sg(win->sgt->sgl, sg, win->nr_segs, blk) { in msc_buffer_clear_hw_header() 994 unsigned int nr_segs) in __msc_buffer_win_alloc() argument 1004 for_each_sg(win->sgt->sgl, sg_ptr, nr_segs, i) { in __msc_buffer_win_alloc() 1014 return nr_segs; in __msc_buffer_win_alloc() 1126 win->nr_segs = ret; in msc_buffer_win_alloc() 1151 for_each_sg(win->sgt->sgl, sg, win->nr_segs, i) { in __msc_buffer_win_free() 1227 if (blk == win->nr_segs - 1) { in msc_buffer_relink() [all …]
|
/linux/drivers/md/bcache/ |
H A D | debug.c | 110 unsigned int nr_segs = bio_segments(bio); in bch_data_verify() local 115 check = bio_kmalloc(nr_segs, GFP_NOIO); in bch_data_verify() 118 bio_init(check, bio->bi_bdev, check->bi_inline_vecs, nr_segs, in bch_data_verify()
|
/linux/io_uring/ |
H A D | net.c | 181 kmsg->free_iov_nr = kmsg->msg.msg_iter.nr_segs; in io_net_vec_assign() 208 int ret, nr_segs; in io_compat_msg_copy_hdr() local 211 nr_segs = iomsg->free_iov_nr; in io_compat_msg_copy_hdr() 215 nr_segs = 1; in io_compat_msg_copy_hdr() 244 nr_segs, &iov, &iomsg->msg.msg_iter, true); in io_compat_msg_copy_hdr() 257 int ret, nr_segs; in io_msg_copy_hdr() local 260 nr_segs = iomsg->free_iov_nr; in io_msg_copy_hdr() 264 nr_segs = 1; in io_msg_copy_hdr() 317 iomsg->msg.msg_iter.nr_segs = 0; in io_sendmsg_copy_hdr() 688 iomsg->msg.msg_iter.nr_segs = 0; in io_recvmsg_copy_hdr() [all …]
|
H A D | rw.c | 87 int nr_segs, ret; in __io_import_iovec() local 106 nr_segs = io->free_iov_nr; in __io_import_iovec() 110 nr_segs = 1; in __io_import_iovec() 112 ret = __import_iovec(ddir, buf, sqe_len, nr_segs, &iov, &io->iter, in __io_import_iovec() 118 io->free_iov_nr = io->iter.nr_segs; in __io_import_iovec()
|
/linux/fs/fuse/ |
H A D | dev.c | 651 unsigned long nr_segs; member 707 BUG_ON(!cs->nr_segs); in fuse_copy_fill() 713 cs->nr_segs--; in fuse_copy_fill() 715 if (cs->nr_segs >= cs->pipe->max_usage) in fuse_copy_fill() 731 cs->nr_segs++; in fuse_copy_fill() 807 BUG_ON(!cs->nr_segs); in fuse_try_move_page() 811 cs->nr_segs--; in fuse_try_move_page() 900 if (cs->nr_segs >= cs->pipe->max_usage) in fuse_ref_page() 918 cs->nr_segs++; in fuse_ref_page() 1414 for (; page_nr < cs.nr_segs; page_nr++) in fuse_dev_splice_read() [all …]
|
/linux/drivers/nvme/target/ |
H A D | io-cmd-file.c | 77 unsigned long nr_segs, size_t count, int ki_flags) in nvmet_file_submit_bvec() argument 94 iov_iter_bvec(&iter, rw, req->f.bvec, nr_segs, count); in nvmet_file_submit_bvec()
|
/linux/fs/bcachefs/ |
H A D | fs-io-direct.c | 317 if (dio->iter.nr_segs > ARRAY_SIZE(dio->inline_vecs)) { in bch2_dio_write_copy_iov() 318 dio->iov = iov = kmalloc_array(dio->iter.nr_segs, sizeof(*iov), in bch2_dio_write_copy_iov() 324 memcpy(iov, dio->iter.__iov, dio->iter.nr_segs * sizeof(*iov)); in bch2_dio_write_copy_iov()
|
/linux/fs/netfs/ |
H A D | iterator.c | 113 unsigned int nbv = iter->nr_segs, ix = 0, nsegs = 0; in netfs_limit_bvec()
|
/linux/drivers/block/xen-blkback/ |
H A D | blkback.c | 710 invcount = xen_blkbk_unmap_prepare(ring, pages, req->nr_segs, in xen_blkbk_unmap_and_respond() 907 pending_req->nr_segs, in xen_blkbk_map_seg() 923 nseg = pending_req->nr_segs; in xen_blkbk_parse_indirect() 1361 pending_req->nr_segs = nseg; in dispatch_rw_block_io() 1475 pending_req->nr_segs); in dispatch_rw_block_io()
|