History

Merge tag 'for-5.3/io_uring-20190711' of git://git.kernel.dk/linux-block

Pull io_uring updates from Jens Axboe: "This contains: - Support for recvmsg/sendmsg as first class opcodes. I don't envision going much further down this path, as there are plans in progress to support potentially any system call in an async fashion through io_uring. But I think it does make sense to have certain core ops available directly, especially those that can support a "try this non-blocking" flag/mode. (me) - Handle generic short reads automatically. This can happen fairly easily if parts of the buffered read is cached. Since the application needs to issue another request for the remainder, just do this internally and save kernel/user roundtrip while providing a nicer more robust API. (me) - Support for linked SQEs. This allows SQEs to depend on each other, enabling an application to eg queue a read-from-this-file,write-to-that-file pair. (me) - Fix race in stopping SQ thread (Jackie)" * tag 'for-5.3/io_uring-20190711' of git://git.kernel.dk/linux-block: io_uring: fix io_sq_thread_stop running in front of io_sq_thread io_uring: add support for recvmsg() io_uring: add support for sendmsg() io_uring: add support for sqe links io_uring: punt short reads to async context uio: make import_iovec()/compat_import_iovec() return bytes on success

Linus Torvalds committed 7 years ago

Commit a2d79c72 parents 964a4ea a4c0b3d9 files · +330 −76Browse files

Showing the changes to include/uapi/linux (1 of 9 files). Show all

Unified · Split

include/uapi/linux/io_uring.h+4−0
@@ -27,6 +27,7 @@ struct io_uring_sqe { · 26 unmodified lines
2727 __u32 fsync_flags;
2828 __u16 poll_events;
2929 __u32 sync_range_flags;
30+ __u32 msg_flags;
3031 };
3132 __u64 user_data; /* data to be passed back at completion time */
3233 union {
@@ -40,6 +41,7 @@ struct io_uring_sqe { · 7 unmodified lines
4041 */
4142 #define IOSQE_FIXED_FILE (1U << 0) /* use fixed fileset */
4243 #define IOSQE_IO_DRAIN (1U << 1) /* issue after inflight IO */
44+#define IOSQE_IO_LINK (1U << 2) /* links next sqe */
4345
4446 /*
4547 * io_uring_setup() flags
@@ -57,6 +59,8 @@ struct io_uring_sqe { · 11 unmodified lines
5759 #define IORING_OP_POLL_ADD 6
5860 #define IORING_OP_POLL_REMOVE 7
5961 #define IORING_OP_SYNC_FILE_RANGE 8
62+#define IORING_OP_SENDMSG 9
63+#define IORING_OP_RECVMSG 10
6064
6165 /*
6266 * sqe->fsync_flags