/linux/include/linux/ |
A D | uio.h | 33 unsigned long nr_segs; member 50 unsigned long nr_segs; member 69 state->nr_segs = iter->nr_segs; in iov_iter_save_state() 114 static inline size_t iov_length(const struct iovec *iov, unsigned long nr_segs) in iov_length() argument 119 for (seg = 0; seg < nr_segs; seg++) in iov_length() 236 unsigned long nr_segs, size_t count); 238 unsigned long nr_segs, size_t count); 240 unsigned long nr_segs, size_t count); 309 unsigned long nr_segs, unsigned long fast_segs, 312 unsigned nr_segs, unsigned fast_segs, struct iovec **iovp, [all …]
|
A D | bio.h | 15 static inline unsigned int bio_max_segs(unsigned int nr_segs) in bio_max_segs() argument 17 return min(nr_segs, BIO_MAX_VECS); in bio_max_segs()
|
A D | blk-mq.h | 876 unsigned int nr_segs) in blk_rq_bio_prep() argument 878 rq->nr_phys_segments = nr_segs; in blk_rq_bio_prep()
|
/linux/block/ |
A D | blk-merge.c | 339 unsigned int *nr_segs) in __blk_queue_split() argument 350 nr_segs); in __blk_queue_split() 354 nr_segs); in __blk_queue_split() 387 unsigned int nr_segs; in blk_queue_split() local 390 __blk_queue_split(q, bio, &nr_segs); in blk_queue_split() 642 unsigned int nr_segs) in ll_front_merge_fn() argument 964 struct bio *bio, unsigned int nr_segs) in bio_attempt_back_merge() argument 968 if (!ll_back_merge_fn(req, bio, nr_segs)) in bio_attempt_back_merge() 988 struct bio *bio, unsigned int nr_segs) in bio_attempt_front_merge() argument 1041 unsigned int nr_segs, in blk_attempt_bio_merge() argument [all …]
|
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() 32 memcpy(bmd->iov, data->iov, sizeof(struct iovec) * data->nr_segs); in bio_alloc_map_data() 486 unsigned int nr_segs = 0; in blk_rq_append_bio() local 489 nr_segs++; in blk_rq_append_bio() 492 blk_rq_bio_prep(rq, bio, nr_segs); in blk_rq_append_bio() 494 if (!ll_back_merge_fn(rq, bio, nr_segs)) in blk_rq_append_bio()
|
A D | blk-mq-sched.h | 14 unsigned int nr_segs, struct request **merged_request); 16 unsigned int nr_segs);
|
A D | blk.h | 256 unsigned int nr_segs, bool *same_queue_rq); 258 struct bio *bio, unsigned int nr_segs); 330 unsigned int *nr_segs); 332 unsigned int nr_segs);
|
A D | blk-mq-sched.c | 365 unsigned int nr_segs) in blk_mq_sched_bio_merge() argument 374 ret = e->type->ops.bio_merge(q, bio, nr_segs); in blk_mq_sched_bio_merge() 392 if (blk_bio_list_merge(q, &ctx->rq_lists[type], bio, nr_segs)) in blk_mq_sched_bio_merge()
|
A D | blk-mq.c | 2298 unsigned int nr_segs) in blk_mq_bio_to_request() argument 2307 blk_rq_bio_prep(rq, bio, nr_segs); in blk_mq_bio_to_request() 2500 struct bio *bio, unsigned int nr_segs, in blk_mq_attempt_bio_merge() argument 2504 if (blk_attempt_plug_merge(q, bio, nr_segs, same_queue_rq)) in blk_mq_attempt_bio_merge() 2506 if (blk_mq_sched_bio_merge(q, bio, nr_segs)) in blk_mq_attempt_bio_merge() 2619 unsigned int nr_segs = 1; in blk_mq_submit_bio() local 2627 __blk_queue_split(q, &bio, &nr_segs); in blk_mq_submit_bio() 2633 rq = blk_mq_get_request(q, plug, bio, nr_segs, &same_queue_rq); in blk_mq_submit_bio() 2641 blk_mq_bio_to_request(rq, bio, nr_segs); in blk_mq_submit_bio()
|
A D | kyber-iosched.c | 567 unsigned int nr_segs) in kyber_bio_merge() argument 578 merged = blk_bio_list_merge(hctx->queue, rq_list, bio, nr_segs); in kyber_bio_merge()
|
A D | mq-deadline.c | 690 unsigned int nr_segs) in dd_bio_merge() argument 697 ret = blk_mq_sched_try_merge(q, bio, nr_segs, &free); in dd_bio_merge()
|
/linux/lib/ |
A D | iov_iter.c | 519 .nr_segs = nr_segs, in iov_iter_init() 1040 i->nr_segs -= bi.bi_idx; in iov_iter_bvec_advance() 1133 i->nr_segs++; in iov_iter_revert() 1145 i->nr_segs++; in iov_iter_revert() 1162 if (i->nr_segs > 1) { in iov_iter_single_seg_count() 1181 .nr_segs = nr_segs, in iov_iter_kvec() 1197 .nr_segs = nr_segs, in iov_iter_bvec() 1917 if (nr_segs == 0) in iovec_from_user() 2063 i->bvec -= state->nr_segs - i->nr_segs; in iov_iter_restore() 2065 i->iov -= state->nr_segs - i->nr_segs; in iov_iter_restore() [all …]
|
/linux/fs/ksmbd/ |
A D | transport_tcp.c | 115 unsigned int nr_segs, size_t bytes) in kvec_array_init() argument 126 nr_segs--; in kvec_array_init() 131 memcpy(new, iov, sizeof(*iov) * nr_segs); in kvec_array_init() 134 return nr_segs; in kvec_array_init() 144 static struct kvec *get_conn_iovec(struct tcp_transport *t, unsigned int nr_segs) in get_conn_iovec() argument 148 if (t->iov && nr_segs <= t->nr_iov) in get_conn_iovec() 152 new_iov = kmalloc_array(nr_segs, sizeof(*new_iov), GFP_KERNEL); in get_conn_iovec() 156 t->nr_iov = nr_segs; in get_conn_iovec() 290 unsigned int nr_segs, unsigned int to_read) in ksmbd_tcp_readv() argument 299 iov = get_conn_iovec(t, nr_segs); in ksmbd_tcp_readv() [all …]
|
/linux/drivers/scsi/ |
A D | xen-scsifront.c | 1064 unsigned int sg_grant, nr_segs; in scsifront_read_backend_params() local 1068 nr_segs = min_t(unsigned int, sg_grant, SG_ALL); in scsifront_read_backend_params() 1069 nr_segs = max_t(unsigned int, nr_segs, VSCSIIF_SG_TABLESIZE); in scsifront_read_backend_params() 1070 nr_segs = min_t(unsigned int, nr_segs, in scsifront_read_backend_params() 1075 dev_info(&dev->dev, "using up to %d SG entries\n", nr_segs); in scsifront_read_backend_params() 1076 else if (info->pause && nr_segs < host->sg_tablesize) in scsifront_read_backend_params() 1079 host->sg_tablesize, nr_segs); in scsifront_read_backend_params() 1081 host->sg_tablesize = nr_segs; in scsifront_read_backend_params() 1082 host->max_sectors = (nr_segs - 1) * PAGE_SIZE / 512; in scsifront_read_backend_params()
|
A D | scsi_lib.c | 985 unsigned short nr_segs = blk_rq_nr_phys_segments(rq); in scsi_alloc_sgtables() local 991 if (WARN_ON_ONCE(!nr_segs)) in scsi_alloc_sgtables() 999 nr_segs++; in scsi_alloc_sgtables() 1004 if (unlikely(sg_alloc_table_chained(&cmd->sdb.table, nr_segs, in scsi_alloc_sgtables()
|
/linux/drivers/hwtracing/intel_th/ |
A D | msu.c | 73 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() 664 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() 1116 win->nr_segs = ret; in msc_buffer_win_alloc() 1141 for_each_sg(win->sgt->sgl, sg, win->nr_segs, i) { in __msc_buffer_win_free() 1217 if (blk == win->nr_segs - 1) { in msc_buffer_relink() [all …]
|
/linux/arch/powerpc/mm/ |
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/fs/fuse/ |
A D | dev.c | 657 unsigned long nr_segs; member 713 BUG_ON(!cs->nr_segs); in fuse_copy_fill() 719 cs->nr_segs--; in fuse_copy_fill() 721 if (cs->nr_segs >= cs->pipe->max_usage) in fuse_copy_fill() 737 cs->nr_segs++; in fuse_copy_fill() 813 BUG_ON(!cs->nr_segs); in fuse_try_move_page() 817 cs->nr_segs--; in fuse_try_move_page() 905 if (cs->nr_segs >= cs->pipe->max_usage) in fuse_ref_page() 923 cs->nr_segs++; in fuse_ref_page() 1409 for (; page_nr < cs.nr_segs; page_nr++) in fuse_dev_splice_read() [all …]
|
/linux/drivers/block/xen-blkback/ |
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() 1256 pending_req->nr_segs = nseg; in dispatch_rw_block_io() 1377 pending_req->nr_segs); in dispatch_rw_block_io()
|
A D | common.h | 344 int nr_segs; member
|
/linux/drivers/nvme/target/ |
A D | io-cmd-file.c | 103 unsigned long nr_segs, size_t count, int ki_flags) in nvmet_file_submit_bvec() argument 120 iov_iter_bvec(&iter, rw, req->f.bvec, nr_segs, count); in nvmet_file_submit_bvec()
|
/linux/mm/ |
A D | swap.c | 176 int get_kernel_pages(const struct kvec *kiov, int nr_segs, int write, in get_kernel_pages() argument 181 for (seg = 0; seg < nr_segs; seg++) { in get_kernel_pages()
|
/linux/sound/core/ |
A D | pcm_native.c | 3461 if (to->nr_segs > 1024 || to->nr_segs != runtime->channels) in snd_pcm_readv() 3466 bufs = kmalloc_array(to->nr_segs, sizeof(void *), GFP_KERNEL); in snd_pcm_readv() 3469 for (i = 0; i < to->nr_segs; ++i) in snd_pcm_readv() 3498 if (from->nr_segs > 128 || from->nr_segs != runtime->channels || in snd_pcm_writev() 3502 bufs = kmalloc_array(from->nr_segs, sizeof(void *), GFP_KERNEL); in snd_pcm_writev() 3505 for (i = 0; i < from->nr_segs; ++i) in snd_pcm_writev()
|
/linux/fs/cifs/ |
A D | smb1ops.c | 747 struct kvec *iov, unsigned long nr_segs) in cifs_sync_write() argument 751 return CIFSSMBWrite2(xid, parms, written, iov, nr_segs); in cifs_sync_write()
|
/linux/fs/ |
A D | splice.c | 1297 unsigned long, nr_segs, unsigned int, flags) in SYSCALL_DEFINE4() argument 1314 error = import_iovec(type, uiov, nr_segs, in SYSCALL_DEFINE4()
|