Home
last modified time | relevance | path

Searched refs:iov (Results 1 – 25 of 53) sorted by relevance

123

/fs/
Dpipe.c59 pipe_iov_copy_from_user(void *to, struct iovec *iov, unsigned long len, in pipe_iov_copy_from_user() argument
65 while (!iov->iov_len) in pipe_iov_copy_from_user()
66 iov++; in pipe_iov_copy_from_user()
67 copy = min_t(unsigned long, len, iov->iov_len); in pipe_iov_copy_from_user()
70 if (__copy_from_user_inatomic(to, iov->iov_base, copy)) in pipe_iov_copy_from_user()
73 if (copy_from_user(to, iov->iov_base, copy)) in pipe_iov_copy_from_user()
78 iov->iov_base += copy; in pipe_iov_copy_from_user()
79 iov->iov_len -= copy; in pipe_iov_copy_from_user()
85 pipe_iov_copy_to_user(struct iovec *iov, const void *from, unsigned long len, in pipe_iov_copy_to_user() argument
91 while (!iov->iov_len) in pipe_iov_copy_to_user()
[all …]
Dread_write.c254 struct iovec iov = { .iov_base = buf, .iov_len = len }; in do_sync_read() local
263 ret = filp->f_op->aio_read(&kiocb, &iov, 1, kiocb.ki_pos); in do_sync_read()
309 struct iovec iov = { .iov_base = (void __user *)buf, .iov_len = len }; in do_sync_write() local
318 ret = filp->f_op->aio_write(&kiocb, &iov, 1, kiocb.ki_pos); in do_sync_write()
468 unsigned long iov_shorten(struct iovec *iov, unsigned long nr_segs, size_t to) in iov_shorten() argument
475 if (len + iov->iov_len >= to) { in iov_shorten()
476 iov->iov_len = to - len; in iov_shorten()
479 len += iov->iov_len; in iov_shorten()
480 iov++; in iov_shorten()
486 ssize_t do_sync_readv_writev(struct file *filp, const struct iovec *iov, in do_sync_readv_writev() argument
[all …]
Dbio.c657 struct sg_iovec *iov, int iov_count, in bio_set_map_data() argument
661 memcpy(bmd->sgvecs, iov, sizeof(struct sg_iovec) * iov_count); in bio_set_map_data()
698 struct sg_iovec *iov, int iov_count, int uncopy, in __bio_copy_iov() argument
716 iov[iov_idx].iov_len - iov_off, bv_len); in __bio_copy_iov()
717 iov_addr = iov[iov_idx].iov_base + iov_off; in __bio_copy_iov()
736 if (iov[iov_idx].iov_len == iov_off) { in __bio_copy_iov()
784 struct sg_iovec *iov, int iov_count, in bio_copy_user_iov() argument
801 uaddr = (unsigned long)iov[i].iov_base; in bio_copy_user_iov()
802 end = (uaddr + iov[i].iov_len + PAGE_SIZE - 1) >> PAGE_SHIFT; in bio_copy_user_iov()
806 len += iov[i].iov_len; in bio_copy_user_iov()
[all …]
Dread_write.h11 ssize_t do_sync_readv_writev(struct file *filp, const struct iovec *iov,
13 ssize_t do_loop_readv_writev(struct file *filp, struct iovec *iov,
Ddirect-io.c935 const struct iovec *iov, loff_t offset, unsigned long nr_segs, in direct_io_worker() argument
971 user_addr = (unsigned long)iov[seg].iov_base; in direct_io_worker()
973 ((user_addr+iov[seg].iov_len +PAGE_SIZE-1)/PAGE_SIZE in direct_io_worker()
978 user_addr = (unsigned long)iov[seg].iov_base; in direct_io_worker()
979 dio->size += bytes = iov[seg].iov_len; in direct_io_worker()
1000 dio->result += iov[seg].iov_len - in direct_io_worker()
1112 struct block_device *bdev, const struct iovec *iov, loff_t offset, in __blockdev_direct_IO() argument
1144 addr = (unsigned long)iov[seg].iov_base; in __blockdev_direct_IO()
1145 size = iov[seg].iov_len; in __blockdev_direct_IO()
1209 retval = direct_io_worker(rw, iocb, inode, iov, offset, in __blockdev_direct_IO()
Dsplice.c1174 static int get_iovec_page_array(const struct iovec __user *iov, in get_iovec_page_array() argument
1188 if (copy_from_user(&entry, iov, sizeof(entry))) in get_iovec_page_array()
1259 iov++; in get_iovec_page_array()
1313 static long vmsplice_to_user(struct file *file, const struct iovec __user *iov, in vmsplice_to_user() argument
1337 error = get_user(base, &iov->iov_base); in vmsplice_to_user()
1340 error = get_user(len, &iov->iov_len); in vmsplice_to_user()
1379 iov++; in vmsplice_to_user()
1396 static long vmsplice_to_pipe(struct file *file, const struct iovec __user *iov, in vmsplice_to_pipe() argument
1414 spd.nr_pages = get_iovec_page_array(iov, nr_segs, pages, partial, in vmsplice_to_pipe()
1438 SYSCALL_DEFINE4(vmsplice, int, fd, const struct iovec __user *, iov, in SYSCALL_DEFINE4() argument
[all …]
/fs/cifs/
Dsess.c428 struct kvec iov[3]; in CIFS_SessSetup() local
471 iov[0].iov_base = (char *)pSMB; in CIFS_SessSetup()
472 iov[0].iov_len = smb_buf->smb_buf_length + 4; in CIFS_SessSetup()
488 iov[1].iov_base = NULL; in CIFS_SessSetup()
489 iov[1].iov_len = 0; in CIFS_SessSetup()
545 if (iov[0].iov_len % 2) { in CIFS_SessSetup()
589 if (iov[0].iov_len % 2) { in CIFS_SessSetup()
632 iov[1].iov_base = msg->data + msg->sesskey_len; in CIFS_SessSetup()
633 iov[1].iov_len = msg->secblob_len; in CIFS_SessSetup()
634 pSMB->req.SecurityBlobLength = cpu_to_le16(iov[1].iov_len); in CIFS_SessSetup()
[all …]
Dtransport.c158 smb_sendv(struct TCP_Server_Info *server, struct kvec *iov, int n_vec) in smb_sendv() argument
163 struct smb_hdr *smb_buffer = iov[0].iov_base; in smb_sendv()
164 unsigned int len = iov[0].iov_len; in smb_sendv()
190 total_len += iov[i].iov_len; in smb_sendv()
198 rc = kernel_sendmsg(ssocket, &smb_msg, &iov[first_vec], in smb_sendv()
250 if (iov[i].iov_len) { in smb_sendv()
251 if (rc > iov[i].iov_len) { in smb_sendv()
252 rc -= iov[i].iov_len; in smb_sendv()
253 iov[i].iov_len = 0; in smb_sendv()
255 iov[i].iov_base += rc; in smb_sendv()
[all …]
Dcifsencrypt.c90 static int cifs_calc_signature2(const struct kvec *iov, int n_vec, in cifs_calc_signature2() argument
96 if ((iov == NULL) || (signature == NULL) || (key == NULL)) in cifs_calc_signature2()
102 if (iov[i].iov_len == 0) in cifs_calc_signature2()
104 if (iov[i].iov_base == NULL) { in cifs_calc_signature2()
111 if (iov[0].iov_len <= 8) /* cmd field at offset 9 */ in cifs_calc_signature2()
113 cifs_MD5_update(&context, iov[0].iov_base+4, in cifs_calc_signature2()
114 iov[0].iov_len-4); in cifs_calc_signature2()
116 cifs_MD5_update(&context, iov[i].iov_base, iov[i].iov_len); in cifs_calc_signature2()
125 int cifs_sign_smb2(struct kvec *iov, int n_vec, struct TCP_Server_Info *server, in cifs_sign_smb2() argument
130 struct smb_hdr *cifs_pdu = iov[0].iov_base; in cifs_sign_smb2()
[all …]
Dfile.c987 struct kvec iov[2]; in cifs_write() local
993 iov[1].iov_base = (char *)write_data + in cifs_write()
995 iov[1].iov_len = len; in cifs_write()
999 iov, 1, long_op); in cifs_write()
1223 struct kvec *iov; in cifs_writepages() local
1251 iov = kmalloc(32 * sizeof(struct kvec), GFP_KERNEL); in cifs_writepages()
1252 if (iov == NULL) in cifs_writepages()
1262 kfree(iov); in cifs_writepages()
1356 iov[n_iov].iov_base = kmap(page); in cifs_writepages()
1357 iov[n_iov].iov_len = len; in cifs_writepages()
[all …]
/fs/smbfs/
Dsock.c40 struct kvec iov = {ubuf, size}; in _recvfrom() local
43 return kernel_recvmsg(socket, &msg, &iov, 1, size, msg.msg_flags); in _recvfrom()
265 struct kvec iov; in smb_receive_drop() local
280 iov.iov_base = drop_buffer; in smb_receive_drop()
281 iov.iov_len = PAGE_SIZE; in smb_receive_drop()
287 result = kernel_recvmsg(sock, &msg, &iov, 1, rlen, flags); in smb_receive_drop()
312 struct kvec iov[4]; in smb_receive() local
332 rlen = min_t(int, smb_move_iov(&p, &num, iov, req->rq_bytes_recvd), in smb_receive()
363 struct kvec iov[4]; in smb_send_request() local
375 smb_move_iov(&p, &num, iov, req->rq_bytes_sent); in smb_send_request()
Dfile.c218 smb_file_aio_read(struct kiocb *iocb, const struct iovec *iov, in smb_file_aio_read() argument
239 status = generic_file_aio_read(iocb, iov, nr_segs, pos); in smb_file_aio_read()
340 smb_file_aio_write(struct kiocb *iocb, const struct iovec *iov, in smb_file_aio_write() argument
363 result = generic_file_aio_write(iocb, iov, nr_segs, pos); in smb_file_aio_write()
/fs/afs/
Drxrpc.c243 struct kvec *iov) in afs_send_pages() argument
272 iov->iov_base = kmap(pages[loop]) + offset; in afs_send_pages()
273 iov->iov_len = to - offset; in afs_send_pages()
278 msg->msg_iov = (struct iovec *) iov; in afs_send_pages()
313 struct kvec iov[1]; in afs_make_call() local
349 iov[0].iov_base = call->request; in afs_make_call()
350 iov[0].iov_len = call->request_size; in afs_make_call()
354 msg.msg_iov = (struct iovec *) iov; in afs_make_call()
370 ret = afs_send_pages(call, &msg, iov); in afs_make_call()
756 struct iovec iov[1]; in afs_send_empty_reply() local
[all …]
/fs/nfs/
Ddirect.c116 ssize_t nfs_direct_IO(int rw, struct kiocb *iocb, const struct iovec *iov, loff_t pos, unsigned lon… in nfs_direct_IO() argument
274 const struct iovec *iov, in nfs_direct_read_schedule_segment() argument
279 unsigned long user_addr = (unsigned long)iov->iov_base; in nfs_direct_read_schedule_segment()
280 size_t count = iov->iov_len; in nfs_direct_read_schedule_segment()
379 const struct iovec *iov, in nfs_direct_read_schedule_iovec() argument
390 const struct iovec *vec = &iov[seg]; in nfs_direct_read_schedule_iovec()
411 static ssize_t nfs_direct_read(struct kiocb *iocb, const struct iovec *iov, in nfs_direct_read() argument
427 result = nfs_direct_read_schedule_iovec(dreq, iov, nr_segs, pos); in nfs_direct_read()
688 const struct iovec *iov, in nfs_direct_write_schedule_segment() argument
693 unsigned long user_addr = (unsigned long)iov->iov_base; in nfs_direct_write_schedule_segment()
[all …]
Dnfs2xdr.c264 struct kvec *iov = req->rq_rcv_buf.head; in nfs_xdr_readres() local
275 hdrlen = (u8 *) p - (u8 *) iov->iov_base; in nfs_xdr_readres()
276 if (iov->iov_len < hdrlen) { in nfs_xdr_readres()
278 "length %Zu > %Zu\n", hdrlen, iov->iov_len); in nfs_xdr_readres()
280 } else if (iov->iov_len != hdrlen) { in nfs_xdr_readres()
282 xdr_shift_buf(&req->rq_rcv_buf, iov->iov_len - hdrlen); in nfs_xdr_readres()
426 struct kvec *iov = rcvbuf->head; in nfs_xdr_readdirres() local
437 hdrlen = (u8 *) p - (u8 *) iov->iov_base; in nfs_xdr_readdirres()
438 if (iov->iov_len < hdrlen) { in nfs_xdr_readdirres()
440 "length %Zu > %Zu\n", hdrlen, iov->iov_len); in nfs_xdr_readdirres()
[all …]
Dnfs3xdr.c509 struct kvec *iov = rcvbuf->head; in nfs3_xdr_readdirres() local
529 hdrlen = (u8 *) p - (u8 *) iov->iov_base; in nfs3_xdr_readdirres()
530 if (iov->iov_len < hdrlen) { in nfs3_xdr_readdirres()
532 "length %Zu > %Zu\n", hdrlen, iov->iov_len); in nfs3_xdr_readdirres()
534 } else if (iov->iov_len != hdrlen) { in nfs3_xdr_readdirres()
536 xdr_shift_buf(rcvbuf, iov->iov_len - hdrlen); in nfs3_xdr_readdirres()
828 struct kvec *iov = rcvbuf->head; in nfs3_xdr_readlinkres() local
847 hdrlen = (u8 *) p - (u8 *) iov->iov_base; in nfs3_xdr_readlinkres()
848 if (iov->iov_len < hdrlen) { in nfs3_xdr_readlinkres()
850 "length %Zu > %Zu\n", hdrlen, iov->iov_len); in nfs3_xdr_readlinkres()
[all …]
Dfile.c48 static ssize_t nfs_file_read(struct kiocb *, const struct iovec *iov,
50 static ssize_t nfs_file_write(struct kiocb *, const struct iovec *iov,
256 nfs_file_read(struct kiocb *iocb, const struct iovec *iov, in nfs_file_read() argument
262 size_t count = iov_length(iov, nr_segs); in nfs_file_read()
265 return nfs_file_direct_read(iocb, iov, nr_segs, pos); in nfs_file_read()
274 result = generic_file_aio_read(iocb, iov, nr_segs, pos); in nfs_file_read()
506 static ssize_t nfs_file_write(struct kiocb *iocb, const struct iovec *iov, in nfs_file_write() argument
512 size_t count = iov_length(iov, nr_segs); in nfs_file_write()
515 return nfs_file_direct_write(iocb, iov, nr_segs, pos); in nfs_file_write()
538 result = generic_file_aio_write(iocb, iov, nr_segs, pos); in nfs_file_write()
/fs/ncpfs/
Dsock.c37 struct kvec iov = {buf, size}; in _recv() local
38 return kernel_recvmsg(sock, &msg, &iov, 1, size, flags); in _recv()
216 struct kvec *iov; in __ncptcp_try_send() local
225 memcpy(iovc, rq->tx_ciov, rq->tx_iovlen * sizeof(iov[0])); in __ncptcp_try_send()
243 iov = rq->tx_ciov; in __ncptcp_try_send()
244 while (iov->iov_len <= result) { in __ncptcp_try_send()
245 result -= iov->iov_len; in __ncptcp_try_send()
246 iov++; in __ncptcp_try_send()
249 iov->iov_base += result; in __ncptcp_try_send()
250 iov->iov_len -= result; in __ncptcp_try_send()
[all …]
/fs/ext4/
Dfile.c51 ext4_file_write(struct kiocb *iocb, const struct iovec *iov, in ext4_file_write() argument
66 size_t length = iov_length(iov, nr_segs); in ext4_file_write()
72 nr_segs = iov_shorten((struct iovec *)iov, nr_segs, in ext4_file_write()
77 ret = generic_file_aio_write(iocb, iov, nr_segs, pos); in ext4_file_write()
/fs/ntfs/
Dfile.c375 static inline void ntfs_fault_in_pages_readable_iovec(const struct iovec *iov, in ntfs_fault_in_pages_readable_iovec() argument
382 buf = iov->iov_base + iov_ofs; in ntfs_fault_in_pages_readable_iovec()
383 len = iov->iov_len - iov_ofs; in ntfs_fault_in_pages_readable_iovec()
388 iov++; in ntfs_fault_in_pages_readable_iovec()
1337 const struct iovec *iov, size_t iov_ofs, size_t bytes) in __ntfs_copy_from_user_iovec_inatomic() argument
1342 const char __user *buf = iov->iov_base + iov_ofs; in __ntfs_copy_from_user_iovec_inatomic()
1346 len = iov->iov_len - iov_ofs; in __ntfs_copy_from_user_iovec_inatomic()
1359 iov++; in __ntfs_copy_from_user_iovec_inatomic()
1368 const struct iovec *iov = *iovp; in ntfs_set_next_iovec() local
1374 len = iov->iov_len - iov_ofs; in ntfs_set_next_iovec()
[all …]
/fs/fuse/
Ddev.c494 const struct iovec *iov; member
506 const struct iovec *iov, unsigned long nr_segs) in fuse_copy_init() argument
512 cs->iov = iov; in fuse_copy_init()
543 cs->seglen = cs->iov[0].iov_len; in fuse_copy_fill()
544 cs->addr = (unsigned long) cs->iov[0].iov_base; in fuse_copy_fill()
545 cs->iov++; in fuse_copy_fill()
702 const struct iovec *iov, unsigned long nr_segs) in fuse_read_interrupt() argument
721 if (iov_length(iov, nr_segs) < reqsize) in fuse_read_interrupt()
724 fuse_copy_init(&cs, fc, 1, NULL, iov, nr_segs); in fuse_read_interrupt()
742 static ssize_t fuse_dev_read(struct kiocb *iocb, const struct iovec *iov, in fuse_dev_read() argument
[all …]
Dfile.c589 static ssize_t fuse_file_aio_read(struct kiocb *iocb, const struct iovec *iov, in fuse_file_aio_read() argument
594 if (pos + iov_length(iov, nr_segs) > i_size_read(inode)) { in fuse_file_aio_read()
605 return generic_file_aio_read(iocb, iov, nr_segs, pos); in fuse_file_aio_read()
877 static ssize_t fuse_file_aio_write(struct kiocb *iocb, const struct iovec *iov, in fuse_file_aio_write() argument
890 err = generic_segment_checks(iov, &nr_segs, &count, VERIFY_READ); in fuse_file_aio_write()
913 iov_iter_init(&i, iov, nr_segs, count, 0); in fuse_file_aio_write()
1486 static int fuse_ioctl_copy_user(struct page **pages, struct iovec *iov, in fuse_ioctl_copy_user() argument
1495 iov_iter_init(&ii, iov, nr_segs, bytes, 0); in fuse_ioctl_copy_user()
1505 char __user *uaddr = ii.iov->iov_base + ii.iov_offset; in fuse_ioctl_copy_user()
1506 size_t iov_len = ii.iov->iov_len - ii.iov_offset; in fuse_ioctl_copy_user()
[all …]
/fs/xfs/linux-2.6/
Dxfs_file.c51 const struct iovec *iov, in xfs_file_aio_read() argument
63 return xfs_read(XFS_I(file->f_path.dentry->d_inode), iocb, iov, in xfs_file_aio_read()
70 const struct iovec *iov, in xfs_file_aio_write() argument
82 return xfs_write(XFS_I(file->f_mapping->host), iocb, iov, nr_segs, in xfs_file_aio_write()
/fs/dlm/
Dlowcomms.c535 struct kvec iov[2]; in receive_from_sock() local
569 iov[0].iov_len = con->cb.base - cbuf_data(&con->cb); in receive_from_sock()
570 iov[0].iov_base = page_address(con->rx_page) + cbuf_data(&con->cb); in receive_from_sock()
571 iov[1].iov_len = 0; in receive_from_sock()
579 iov[0].iov_len = PAGE_CACHE_SIZE - cbuf_data(&con->cb); in receive_from_sock()
580 iov[1].iov_len = con->cb.base; in receive_from_sock()
581 iov[1].iov_base = page_address(con->rx_page); in receive_from_sock()
584 len = iov[0].iov_len + iov[1].iov_len; in receive_from_sock()
586 r = ret = kernel_recvmsg(con->sock, &msg, iov, nvec, len, in receive_from_sock()
614 len, iov[0].iov_base, r); in receive_from_sock()
[all …]
/fs/ext3/
Dfile.c51 ext3_file_write(struct kiocb *iocb, const struct iovec *iov, in ext3_file_write() argument
59 ret = generic_file_aio_write(iocb, iov, nr_segs, pos); in ext3_file_write()

123