Home
last modified time | relevance | path

Searched refs:nr_segs (Results 1 – 25 of 46) sorted by relevance

12

/linux/lib/
H A Diov_iter.c163 const struct iovec *iov, unsigned long nr_segs, in iov_iter_init() argument
172 .nr_segs = nr_segs, in iov_iter_init()
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()
522 for (iov = iter_iov(i), end = iov + i->nr_segs; iov < end; iov++) { in iov_iter_iovec_advance()
528 i->nr_segs -= iov - iter_iov(i); in iov_iter_iovec_advance()
634 i->nr_segs++; in iov_iter_revert()
649 i->nr_segs++; in iov_iter_revert()
666 if (i->nr_segs > 1) { in iov_iter_single_seg_count()
680 const struct kvec *kvec, unsigned long nr_segs, in iov_iter_kvec() argument
[all …]
H A Dkunit_iov_iter.c130 KUNIT_EXPECT_EQ(test, iter.nr_segs, 0); in iov_kunit_copy_to_kvec()
180 KUNIT_EXPECT_EQ(test, iter.nr_segs, 0); in iov_kunit_copy_from_kvec()
289 KUNIT_EXPECT_EQ(test, iter.nr_segs, 0); in iov_kunit_copy_to_bvec()
343 KUNIT_EXPECT_EQ(test, iter.nr_segs, 0); in iov_kunit_copy_from_bvec()
/linux/include/linux/
H A Duio.h40 unsigned long nr_segs; member
79 unsigned long nr_segs; member
105 state->nr_segs = iter->nr_segs; in iov_iter_save_state()
160 static inline size_t iov_length(const struct iovec *iov, unsigned long nr_segs) in iov_length() argument
165 for (seg = 0; seg < nr_segs; seg++) in iov_length()
285 unsigned long nr_segs, size_t count);
287 unsigned long nr_segs, size_t count);
289 unsigned long nr_segs, size_t count);
355 unsigned long nr_segs, unsigned long fast_segs,
358 unsigned nr_segs, unsigned fast_segs, struct iovec **iovp,
[all …]
H A Diov_iter.h64 iter->nr_segs -= p - iter->__iov; in iterate_iovec()
98 iter->nr_segs -= p - iter->kvec; in iterate_kvec()
137 iter->nr_segs -= p - iter->bvec; in iterate_bvec()
H A Dblk-mq.h981 unsigned int nr_segs) in blk_rq_bio_prep() argument
983 rq->nr_phys_segments = nr_segs; in blk_rq_bio_prep()
/linux/net/core/
H A Dnet_test.c51 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 Dblk-merge.c378 unsigned *nr_segs) in bio_split_rw() argument
381 bio_split_rw_at(bio, lim, nr_segs, in bio_split_rw()
393 const struct queue_limits *lim, unsigned *nr_segs) in bio_split_zone_append() argument
397 split_sectors = bio_split_rw_at(bio, lim, nr_segs, in bio_split_zone_append()
437 unsigned int nr_segs; in bio_split_to_limits() local
439 return __bio_split_to_limits(bio, bdev_limits(bio->bi_bdev), &nr_segs); in bio_split_to_limits()
674 int ll_back_merge_fn(struct request *req, struct bio *bio, unsigned int nr_segs) in ll_back_merge_fn() argument
689 return ll_new_hw_segment(req, bio, nr_segs); in ll_back_merge_fn()
693 unsigned int nr_segs) in ll_front_merge_fn() argument
708 return ll_new_hw_segment(req, bio, nr_segs); in ll_front_merge_fn()
[all …]
H A Dblk.h300 struct bio *bio, unsigned int nr_segs);
302 unsigned int nr_segs);
304 struct bio *bio, unsigned int nr_segs);
344 unsigned *nr_segs);
346 const struct queue_limits *lim, unsigned *nr_segs);
377 const struct queue_limits *lim, unsigned int *nr_segs) in __bio_split_to_limits() argument
383 return bio_split_rw(bio, lim, nr_segs); in __bio_split_to_limits()
384 *nr_segs = 1; in __bio_split_to_limits()
387 return bio_split_zone_append(bio, lim, nr_segs); in __bio_split_to_limits()
390 return bio_split_discard(bio, lim, nr_segs); in __bio_split_to_limits()
[all …]
H A Dblk-mq-sched.h11 unsigned int nr_segs, struct request **merged_request);
13 unsigned int nr_segs);
H A Dblk-mq-sched.c338 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 Dblk-mq.c2652 unsigned int nr_segs) in blk_mq_bio_to_request() argument
2660 blk_rq_bio_prep(rq, bio, nr_segs); in blk_mq_bio_to_request()
2951 struct bio *bio, unsigned int nr_segs) in blk_mq_attempt_bio_merge() argument
2954 if (blk_attempt_plug_merge(q, bio, nr_segs)) in blk_mq_attempt_bio_merge()
2956 if (blk_mq_sched_bio_merge(q, bio, nr_segs)) in blk_mq_attempt_bio_merge()
3061 unsigned int nr_segs; in blk_mq_submit_bio() local
3077 nr_segs = bio->__bi_nr_segments; in blk_mq_submit_bio()
3103 bio = __bio_split_to_limits(bio, &q->limits, &nr_segs); in blk_mq_submit_bio()
3110 if (blk_mq_attempt_bio_merge(q, bio, nr_segs)) in blk_mq_submit_bio()
3113 if (blk_queue_is_zoned(q) && blk_zone_plug_bio(bio, nr_segs)) in blk_mq_submit_bio()
[all …]
/linux/fs/smb/server/
H A Dtransport_tcp.c117 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), KSMBD_DEFAULT_GFP); 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/drivers/scsi/
H A Dxen-scsifront.c1132 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/arch/powerpc/mm/
H A Ddma-noncoherent.c65 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/hwtracing/intel_th/
H A Dmsu.c74 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
1000 ret = sg_alloc_table(win->sgt, nr_segs, GFP_KERNEL); in __msc_buffer_win_alloc()
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()
1039 for_each_sg(win->sgt->sgl, sg_ptr, win->nr_segs, i) { in msc_buffer_set_uc()
1059 for_each_sg(win->sgt->sgl, sg_ptr, win->nr_segs, i) { in msc_buffer_set_wb()
[all …]
/linux/drivers/md/bcache/
H A Ddebug.c110 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 Dnet.c190 kmsg->free_iov_nr = kmsg->msg.msg_iter.nr_segs; in io_net_vec_assign()
217 int ret, nr_segs; in io_compat_msg_copy_hdr() local
220 nr_segs = iomsg->free_iov_nr; in io_compat_msg_copy_hdr()
224 nr_segs = 1; in io_compat_msg_copy_hdr()
253 nr_segs, &iov, &iomsg->msg.msg_iter, true); in io_compat_msg_copy_hdr()
267 int ret, nr_segs; in io_msg_copy_hdr() local
270 nr_segs = iomsg->free_iov_nr; in io_msg_copy_hdr()
274 nr_segs = 1; in io_msg_copy_hdr()
311 ret = __import_iovec(ddir, msg->msg_iov, msg->msg_iovlen, nr_segs, in io_msg_copy_hdr()
327 iomsg->msg.msg_iter.nr_segs = 0; in io_sendmsg_copy_hdr()
[all …]
H A Drw.c97 int nr_segs, ret; in __io_import_iovec() local
116 nr_segs = io->free_iov_nr; in __io_import_iovec()
120 nr_segs = 1; in __io_import_iovec()
122 ret = __import_iovec(ddir, buf, sqe_len, nr_segs, &iov, &io->iter, in __io_import_iovec()
128 io->free_iov_nr = io->iter.nr_segs; in __io_import_iovec()
/linux/drivers/nvme/target/
H A Dio-cmd-file.c77 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 Dfs-io-direct.c317 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/drivers/block/xen-blkback/
H A Dblkback.c710 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()
H A Dcommon.h347 int nr_segs; member
/linux/fs/netfs/
H A Diterator.c113 unsigned int nbv = iter->nr_segs, ix = 0, nsegs = 0; in netfs_limit_bvec()
H A Dwrite_issue.c295 subreq->nr_segs++; in netfs_advance_write()
299 subreq->nr_segs >= stream->sreq_max_segs || in netfs_advance_write()
/linux/drivers/usb/host/
H A Dxen-hcd.c719 int nr_segs = 0; in xenhcd_gnttab_done() local
728 nr_segs = shadow->req.nr_buffer_segs; in xenhcd_gnttab_done()
731 nr_segs += shadow->req.u.isoc.nr_frame_desc_segs; in xenhcd_gnttab_done()
733 for (i = 0; i < nr_segs; i++) { in xenhcd_gnttab_done()

12