xref: /linux/io_uring/rw.h (revision ae22a94997b8a03dcb3c922857c203246711f9d4)
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_prep_rwv(struct io_kiocb *req, const struct io_uring_sqe *sqe);
20 int io_prep_rw_fixed(struct io_kiocb *req, const struct io_uring_sqe *sqe);
21 int io_read(struct io_kiocb *req, unsigned int issue_flags);
22 int io_readv_prep_async(struct io_kiocb *req);
23 int io_write(struct io_kiocb *req, unsigned int issue_flags);
24 int io_writev_prep_async(struct io_kiocb *req);
25 void io_readv_writev_cleanup(struct io_kiocb *req);
26 void io_rw_fail(struct io_kiocb *req);
27 void io_req_rw_complete(struct io_kiocb *req, struct io_tw_state *ts);
28 int io_read_mshot_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe);
29 int io_read_mshot(struct io_kiocb *req, unsigned int issue_flags);
30