Searched refs:nr_segs (Results 1 - 32 of 32) sorted by relevance

/linux-4.1.27/include/linux/
H A Duio.h37 unsigned long nr_segs; member in struct:iov_iter
47 static inline size_t iov_length(const struct iovec *iov, unsigned long nr_segs) iov_length() argument
52 for (seg = 0; seg < nr_segs; seg++) iov_length()
73 unsigned long iov_shorten(struct iovec *iov, unsigned long nr_segs, size_t to);
91 unsigned long nr_segs, size_t count);
93 unsigned long nr_segs, size_t count);
95 unsigned long nr_segs, size_t count);
152 unsigned nr_segs, unsigned fast_segs,
158 unsigned nr_segs, unsigned fast_segs,
H A Dcompat.h530 unsigned int nr_segs, unsigned int flags);
670 unsigned long nr_segs,
H A Dsyscalls.h789 unsigned long nr_segs, unsigned int flags);
H A Dfs.h1663 unsigned long nr_segs, unsigned long fast_segs,
/linux-4.1.27/lib/
H A Diov_iter.c111 i->nr_segs -= bvec - i->bvec; \
121 i->nr_segs -= kvec - i->kvec; \
131 i->nr_segs -= iov - i->iov; \
213 i->nr_segs -= iov - i->iov; copy_page_to_iter_iovec()
294 i->nr_segs -= iov - i->iov; copy_page_from_iter_iovec()
347 const struct iovec *iov, unsigned long nr_segs, iov_iter_init()
359 i->nr_segs = nr_segs; iov_iter_init()
520 if (i->nr_segs == 1) iov_iter_single_seg_count()
530 const struct kvec *kvec, unsigned long nr_segs, iov_iter_kvec()
536 i->nr_segs = nr_segs; iov_iter_kvec()
543 const struct bio_vec *bvec, unsigned long nr_segs, iov_iter_bvec()
549 i->nr_segs = nr_segs; iov_iter_bvec()
786 new->nr_segs * sizeof(struct bio_vec), dup_iter()
791 new->nr_segs * sizeof(struct iovec), dup_iter()
797 unsigned nr_segs, unsigned fast_segs, import_iovec()
802 n = rw_copy_check_uvector(type, uvector, nr_segs, fast_segs, import_iovec()
810 iov_iter_init(i, type, p, nr_segs, n); import_iovec()
820 unsigned nr_segs, unsigned fast_segs, compat_import_iovec()
825 n = compat_rw_copy_check_uvector(type, uvector, nr_segs, fast_segs, compat_import_iovec()
833 iov_iter_init(i, type, p, nr_segs, n); compat_import_iovec()
346 iov_iter_init(struct iov_iter *i, int direction, const struct iovec *iov, unsigned long nr_segs, size_t count) iov_iter_init() argument
529 iov_iter_kvec(struct iov_iter *i, int direction, const struct kvec *kvec, unsigned long nr_segs, size_t count) iov_iter_kvec() argument
542 iov_iter_bvec(struct iov_iter *i, int direction, const struct bio_vec *bvec, unsigned long nr_segs, size_t count) iov_iter_bvec() argument
796 import_iovec(int type, const struct iovec __user * uvector, unsigned nr_segs, unsigned fast_segs, struct iovec **iov, struct iov_iter *i) import_iovec() argument
819 compat_import_iovec(int type, const struct compat_iovec __user * uvector, unsigned nr_segs, unsigned fast_segs, struct iovec **iov, struct iov_iter *i) compat_import_iovec() argument
/linux-4.1.27/fs/
H A Dread_write.c637 unsigned long iov_shorten(struct iovec *iov, unsigned long nr_segs, size_t to) iov_shorten() argument
642 while (seg < nr_segs) { iov_shorten()
700 unsigned long nr_segs, unsigned long fast_segs, rw_copy_check_uvector()
713 if (nr_segs == 0) { rw_copy_check_uvector()
722 if (nr_segs > UIO_MAXIOV) { rw_copy_check_uvector()
726 if (nr_segs > fast_segs) { rw_copy_check_uvector()
727 iov = kmalloc(nr_segs*sizeof(struct iovec), GFP_KERNEL); rw_copy_check_uvector()
733 if (copy_from_user(iov, uvector, nr_segs*sizeof(*uvector))) { rw_copy_check_uvector()
748 for (seg = 0; seg < nr_segs; seg++) { rw_copy_check_uvector()
776 unsigned long nr_segs, loff_t *pos) do_readv_writev()
786 ret = import_iovec(type, uvector, nr_segs, do_readv_writev()
950 unsigned long nr_segs, loff_t *pos) compat_do_readv_writev()
960 ret = compat_import_iovec(type, uvector, nr_segs, compat_do_readv_writev()
699 rw_copy_check_uvector(int type, const struct iovec __user * uvector, unsigned long nr_segs, unsigned long fast_segs, struct iovec *fast_pointer, struct iovec **ret_pointer) rw_copy_check_uvector() argument
774 do_readv_writev(int type, struct file *file, const struct iovec __user * uvector, unsigned long nr_segs, loff_t *pos) do_readv_writev() argument
948 compat_do_readv_writev(int type, struct file *file, const struct compat_iovec __user *uvector, unsigned long nr_segs, loff_t *pos) compat_do_readv_writev() argument
H A Dsplice.c1544 unsigned long nr_segs, unsigned int flags) vmsplice_to_user()
1557 ret = import_iovec(READ, uiov, nr_segs, vmsplice_to_user()
1584 unsigned long nr_segs, unsigned int flags) vmsplice_to_pipe()
1606 spd.nr_pages = get_iovec_page_array(iov, nr_segs, spd.pages, vmsplice_to_pipe()
1635 unsigned long, nr_segs, unsigned int, flags) SYSCALL_DEFINE4()
1640 if (unlikely(nr_segs > UIO_MAXIOV)) SYSCALL_DEFINE4()
1642 else if (unlikely(!nr_segs)) SYSCALL_DEFINE4()
1649 error = vmsplice_to_pipe(f.file, iov, nr_segs, flags); SYSCALL_DEFINE4()
1651 error = vmsplice_to_user(f.file, iov, nr_segs, flags); SYSCALL_DEFINE4()
1661 unsigned int, nr_segs, unsigned int, flags) COMPAT_SYSCALL_DEFINE4()
1665 if (nr_segs > UIO_MAXIOV) COMPAT_SYSCALL_DEFINE4()
1667 iov = compat_alloc_user_space(nr_segs * sizeof(struct iovec)); COMPAT_SYSCALL_DEFINE4()
1668 for (i = 0; i < nr_segs; i++) { COMPAT_SYSCALL_DEFINE4()
1676 return sys_vmsplice(fd, iov, nr_segs, flags); COMPAT_SYSCALL_DEFINE4()
1543 vmsplice_to_user(struct file *file, const struct iovec __user *uiov, unsigned long nr_segs, unsigned int flags) vmsplice_to_user() argument
1583 vmsplice_to_pipe(struct file *file, const struct iovec __user *iov, unsigned long nr_segs, unsigned int flags) vmsplice_to_pipe() argument
H A Dcompat.c547 const struct compat_iovec __user *uvector, unsigned long nr_segs, compat_rw_copy_check_uvector()
561 if (nr_segs == 0) compat_rw_copy_check_uvector()
565 if (nr_segs > UIO_MAXIOV || nr_segs < 0) compat_rw_copy_check_uvector()
567 if (nr_segs > fast_segs) { compat_rw_copy_check_uvector()
569 iov = kmalloc(nr_segs*sizeof(struct iovec), GFP_KERNEL); compat_rw_copy_check_uvector()
576 if (!access_ok(VERIFY_READ, uvector, nr_segs*sizeof(*uvector))) compat_rw_copy_check_uvector()
589 for (seg = 0; seg < nr_segs; seg++) { compat_rw_copy_check_uvector()
546 compat_rw_copy_check_uvector(int type, const struct compat_iovec __user *uvector, unsigned long nr_segs, unsigned long fast_segs, struct iovec *fast_pointer, struct iovec **ret_pointer) compat_rw_copy_check_uvector() argument
/linux-4.1.27/drivers/scsi/
H A Dxen-scsifront.c1062 unsigned int sg_grant, nr_segs; scsifront_read_backend_params() local
1070 nr_segs = min_t(unsigned int, sg_grant, SG_ALL); scsifront_read_backend_params()
1071 nr_segs = max_t(unsigned int, nr_segs, VSCSIIF_SG_TABLESIZE); scsifront_read_backend_params()
1072 nr_segs = min_t(unsigned int, nr_segs, scsifront_read_backend_params()
1077 dev_info(&dev->dev, "using up to %d SG entries\n", nr_segs); scsifront_read_backend_params()
1078 else if (info->pause && nr_segs < host->sg_tablesize) scsifront_read_backend_params()
1081 host->sg_tablesize, nr_segs); scsifront_read_backend_params()
1083 host->sg_tablesize = nr_segs; scsifront_read_backend_params()
1084 host->max_sectors = (nr_segs - 1) * PAGE_SIZE / 512; scsifront_read_backend_params()
/linux-4.1.27/fs/fuse/
H A Ddev.c717 unsigned long nr_segs; member in struct:fuse_copy_state
773 BUG_ON(!cs->nr_segs); fuse_copy_fill()
779 cs->nr_segs--; fuse_copy_fill()
781 if (cs->nr_segs == cs->pipe->buffers) fuse_copy_fill()
797 cs->nr_segs++; fuse_copy_fill()
870 BUG_ON(!cs->nr_segs); fuse_try_move_page()
874 cs->nr_segs--; fuse_try_move_page()
954 if (cs->nr_segs == cs->pipe->buffers) fuse_ref_page()
967 cs->nr_segs++; fuse_ref_page()
1408 if (pipe->nrbufs + cs.nr_segs > pipe->buffers) { fuse_dev_splice_read()
1413 while (page_nr < cs.nr_segs) { fuse_dev_splice_read()
1445 for (; page_nr < cs.nr_segs; page_nr++) fuse_dev_splice_read()
2044 cs.nr_segs = nbuf; fuse_dev_splice_write()
H A Dfile.c2260 unsigned int nr_segs, size_t bytes, bool to_user) fuse_ioctl_copy_user()
2268 iov_iter_init(&ii, to_user ? READ : WRITE, iov, nr_segs, bytes); fuse_ioctl_copy_user()
2259 fuse_ioctl_copy_user(struct page **pages, struct iovec *iov, unsigned int nr_segs, size_t bytes, bool to_user) fuse_ioctl_copy_user() argument
/linux-4.1.27/net/
H A Dcompat.c40 compat_size_t nr_segs; get_compat_msghdr() local
47 __get_user(nr_segs, &umsg->msg_iovlen) || get_compat_msghdr()
79 if (nr_segs > UIO_MAXIOV) get_compat_msghdr()
85 compat_ptr(uiov), nr_segs, get_compat_msghdr()
H A Dsocket.c1838 size_t nr_segs; copy_msghdr_from_user() local
1845 __get_user(nr_segs, &umsg->msg_iovlen) || copy_msghdr_from_user()
1875 if (nr_segs > UIO_MAXIOV) copy_msghdr_from_user()
1880 return import_iovec(save_addr ? READ : WRITE, uiov, nr_segs, copy_msghdr_from_user()
/linux-4.1.27/arch/powerpc/mm/
H A Ddma-noncoherent.c361 int nr_segs = 1 + ((size - seg_size) + PAGE_SIZE - 1)/PAGE_SIZE; __dma_sync_page_highmem() local
380 } while (seg_nr < nr_segs); __dma_sync_page_highmem()
/linux-4.1.27/mm/
H A Dswap.c369 * @nr_segs: number of segments to pin
372 * Should be at least nr_segs long.
379 int get_kernel_pages(const struct kvec *kiov, int nr_segs, int write, get_kernel_pages() argument
384 for (seg = 0; seg < nr_segs; seg++) { get_kernel_pages()
401 * Must be at least nr_segs long.
/linux-4.1.27/sound/core/
H A Dpcm_native.c3102 if (to->nr_segs > 1024 || to->nr_segs != runtime->channels) snd_pcm_readv()
3107 bufs = kmalloc(sizeof(void *) * to->nr_segs, GFP_KERNEL); snd_pcm_readv()
3110 for (i = 0; i < to->nr_segs; ++i) snd_pcm_readv()
3138 if (from->nr_segs > 128 || from->nr_segs != runtime->channels || snd_pcm_writev()
3142 bufs = kmalloc(sizeof(void *) * from->nr_segs, GFP_KERNEL); snd_pcm_writev()
3145 for (i = 0; i < from->nr_segs; ++i) snd_pcm_writev()
/linux-4.1.27/fs/cifs/
H A Dconnect.c494 * @nr_segs: number of members in original array
503 kvec_array_init(struct kvec *new, struct kvec *iov, unsigned int nr_segs, kvec_array_init() argument
515 nr_segs--; kvec_array_init()
519 memcpy(new, iov, sizeof(*iov) * nr_segs); kvec_array_init()
522 return nr_segs; kvec_array_init()
526 get_server_iovec(struct TCP_Server_Info *server, unsigned int nr_segs) get_server_iovec() argument
530 if (server->iov && nr_segs <= server->nr_iov) get_server_iovec()
534 new_iov = kmalloc(sizeof(*new_iov) * nr_segs, GFP_NOFS); get_server_iovec()
538 server->nr_iov = nr_segs; get_server_iovec()
545 unsigned int nr_segs, unsigned int to_read) cifs_readv_from_socket()
553 iov = get_server_iovec(server, nr_segs); cifs_readv_from_socket()
568 segs = kvec_array_init(iov, iov_orig, nr_segs, total_read); cifs_readv_from_socket()
544 cifs_readv_from_socket(struct TCP_Server_Info *server, struct kvec *iov_orig, unsigned int nr_segs, unsigned int to_read) cifs_readv_from_socket() argument
H A Dsmb1ops.c757 struct kvec *iov, unsigned long nr_segs) cifs_sync_write()
761 return CIFSSMBWrite2(xid, parms, written, iov, nr_segs); cifs_sync_write()
755 cifs_sync_write(const unsigned int xid, struct cifs_fid *pfid, struct cifs_io_parms *parms, unsigned int *written, struct kvec *iov, unsigned long nr_segs) cifs_sync_write() argument
H A Dsmb2ops.c735 struct kvec *iov, unsigned long nr_segs) smb2_sync_write()
740 return SMB2_write(xid, parms, written, iov, nr_segs); smb2_sync_write()
733 smb2_sync_write(const unsigned int xid, struct cifs_fid *pfid, struct cifs_io_parms *parms, unsigned int *written, struct kvec *iov, unsigned long nr_segs) smb2_sync_write() argument
H A Dcifsproto.h188 struct kvec *iov_orig, unsigned int nr_segs,
/linux-4.1.27/block/
H A Dbio.c1165 for (i = 0; i < iter->nr_segs; i++) { bio_copy_user_iov()
1187 bmd = bio_alloc_map_data(iter->nr_segs, gfp_mask); bio_copy_user_iov()
1197 memcpy(bmd->iov, iter->iov, sizeof(struct iovec) * iter->nr_segs); bio_copy_user_iov()
1199 iter->nr_segs, iter->count); bio_copy_user_iov()
/linux-4.1.27/crypto/
H A Dalgif_aead.c369 if (msg->msg_iter.nr_segs > RSGL_MAX_ENTRIES) aead_recvmsg()
/linux-4.1.27/drivers/mmc/card/
H A Dblock.c1526 unsigned int len, nr_segs = 0; mmc_calc_packed_hdr_segs() local
1531 nr_segs++; mmc_calc_packed_hdr_segs()
1534 return nr_segs; mmc_calc_packed_hdr_segs()
/linux-4.1.27/fs/ocfs2/
H A Dfile.c2272 (unsigned int)from->nr_segs); /* GRRRRR */ ocfs2_file_write_iter()
2484 to->nr_segs); /* GRRRRR */ ocfs2_file_read_iter()
/linux-4.1.27/fs/nfs/
H A Ddirect.c249 * @nr_segs: size of iovec array
/linux-4.1.27/fs/gfs2/
H A Dfile.c690 * @nr_segs: Number of @iov segments
/linux-4.1.27/net/ipv4/
H A Dtcp_input.c287 u32 nr_segs; tcp_sndbuf_expand() local
299 nr_segs = max_t(u32, TCP_INIT_CWND, tp->snd_cwnd); tcp_sndbuf_expand()
300 nr_segs = max_t(u32, nr_segs, tp->reordering + 1); tcp_sndbuf_expand()
306 sndmem = 2 * nr_segs * per_mss; tcp_sndbuf_expand()
/linux-4.1.27/drivers/infiniband/hw/ipath/
H A Dipath_file_ops.c2428 if (!iter_is_iovec(from) || !from->nr_segs) ipath_write_iter()
2431 return ipath_user_sdma_writev(pd->port_dd, pq, from->iov, from->nr_segs); ipath_write_iter()
/linux-4.1.27/drivers/infiniband/hw/qib/
H A Dqib_file_ops.c2268 if (!iter_is_iovec(from) || !from->nr_segs || !pq) qib_write_iter()
2271 return qib_user_sdma_writev(rcd, pq, from->iov, from->nr_segs); qib_write_iter()
/linux-4.1.27/drivers/vhost/
H A Dscsi.c867 for (i = 0; i < iter->nr_segs; i++) { vhost_scsi_iov_to_sgl()
/linux-4.1.27/net/netlink/
H A Daf_netlink.c2372 msg->msg_iter.nr_segs == 1 && netlink_sendmsg()
/linux-4.1.27/fs/btrfs/
H A Dinode.c8305 for (seg = 0; seg < iter->nr_segs; seg++) { check_direct_IO()
8306 for (i = seg + 1; i < iter->nr_segs; i++) { check_direct_IO()

Completed in 1418 milliseconds