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
27 __u32 fsync_flags;27 __u32 fsync_flags;
28 __u16 poll_events;28 __u16 poll_events;
29 __u32 sync_range_flags;29 __u32 sync_range_flags;
30 __u32 msg_flags;
30 };31 };
31 __u64 user_data; /* data to be passed back at completion time */32 __u64 user_data; /* data to be passed back at completion time */
32 union {33 union {
@@ -40,6 +41,7 @@ struct io_uring_sqe { · 7 unmodified lines
40 */41 */
41#define IOSQE_FIXED_FILE (1U << 0) /* use fixed fileset */42#define IOSQE_FIXED_FILE (1U << 0) /* use fixed fileset */
42#define IOSQE_IO_DRAIN (1U << 1) /* issue after inflight IO */43#define IOSQE_IO_DRAIN (1U << 1) /* issue after inflight IO */
44#define IOSQE_IO_LINK (1U << 2) /* links next sqe */
43 45
44/*46/*
45 * io_uring_setup() flags47 * io_uring_setup() flags
@@ -57,6 +59,8 @@ struct io_uring_sqe { · 11 unmodified lines
57#define IORING_OP_POLL_ADD 659#define IORING_OP_POLL_ADD 6
58#define IORING_OP_POLL_REMOVE 760#define IORING_OP_POLL_REMOVE 7
59#define IORING_OP_SYNC_FILE_RANGE 861#define IORING_OP_SYNC_FILE_RANGE 8
62#define IORING_OP_SENDMSG 9
63#define IORING_OP_RECVMSG 10
60 64
61/*65/*
62 * sqe->fsync_flags66 * sqe->fsync_flags