xref: /openbmc/linux/io_uring/rw.h (revision e40573a4)
1 // SPDX-License-Identifier: GPL-2.0
2 
3 #include <linux/pagemap.h>
4 
5 struct io_rw_state {
6 	struct iov_iter			iter;
7 	struct iov_iter_state		iter_state;
8 	struct iovec			fast_iov[UIO_FASTIOV];
9 };
10 
11 struct io_async_rw {
12 	struct io_rw_state		s;
13 	const struct iovec		*free_iovec;
14 	size_t				bytes_done;
15 	struct wait_page_queue		wpq;
16 };
17 
18 int io_prep_rw(struct io_kiocb *req, const struct io_uring_sqe *sqe);
19 int io_read(struct io_kiocb *req, unsigned int issue_flags);
20 int io_readv_prep_async(struct io_kiocb *req);
21 int io_write(struct io_kiocb *req, unsigned int issue_flags);
22 int io_writev_prep_async(struct io_kiocb *req);
23 void io_readv_writev_cleanup(struct io_kiocb *req);
24