io_uring: add support for IORING_OP_OPENAT

This works just like openat(2), except it can be performed async. For
the normal case of a non-blocking path lookup this will complete
inline. If we have to do IO to perform the open, it'll be done from
async context.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
Jens Axboe
2019-12-11 11:20:36 -07:00
parent 35cb6d54c1
commit 15b71abe7b
2 changed files with 95 additions and 2 deletions

View File

@@ -34,6 +34,7 @@ struct io_uring_sqe {
__u32 timeout_flags;
__u32 accept_flags;
__u32 cancel_flags;
__u32 open_flags;
};
__u64 user_data; /* data to be passed back at completion time */
union {
@@ -77,6 +78,7 @@ enum {
IORING_OP_LINK_TIMEOUT,
IORING_OP_CONNECT,
IORING_OP_FALLOCATE,
IORING_OP_OPENAT,
/* this goes last, obviously */
IORING_OP_LAST,