* accept-multi:
open/openat2: update man page to include IORING_FILE_INDEX_ALLOC
liburing.h: use helper for io_uring_prep_multishot_accept()
man/io_uring_prep_accept.3: fixup some phrasing
man/io_uring_prep_accept.3: add man info for multishot accept
test/accept.c: test for multishot direct accept with wrong arg
test/accept.c: add test for multishot mode accept
liburing.h: add api to support multishot accept direct
liburing.h: support multishot accept
test/accept.c: close the listen fd at the end of the test
This updates the io_uring.h file with the changes in the kernel.
Fixed the build issue that arises because of the updated fields.
Signed-off-by: Krishna Kanth Reddy <krish.reddy@samsung.com>
This asks the kernel to setup a ring with 128-byte SQE entries. May fail
with -EINVAL if the kernel doesn't support this feature. If the kernel
does support the feature, then the ring will support big sqe entries
which some commands may require.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
* xattr:
32-bit build warning cleanups
test/xattr: don't fail on kernels not supporting the feature
test/xattr: style fixups
test/xattr: specify file mode with O_CREAT
liburing: Add new test program to verify xattr support
liburing: Add helper functions for fgetxattr and getxattr
liburing: add helper functions for setxattr and fsetxattr
liburing: Update io_uring in liburing
Signed-off-by: Jens Axboe <axboe@kernel.dk>
This flag can be used by send/sendmsg or recv/recvmsg to tell io_uring
that it expects the socket to not be immediately ready for send or
recv. For that case, it's worthless trying to do IO first, it's better
to just arm poll internally and let that drive the first attempt.
Can be used in conjunction with the IORING_CQE_F_SOCK_NONEMPTY feedback
from the kernel, or independently.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
* cancel-fd-all:
test/poll-cancel-all: add async read test case
test/poll-cancel-all: test IORING_ASYNC_CANCEL_ANY
io_uring.h: add IORING_ASYNC_CANCEL_ANY
test/poll-cancel-all: abort test if cancel flags not supported
test/poll-cancel-all: add test case canceling a subset of pending
test/poll-cancel-all: test issuing CANCEL_ALL | CANCEL_FD
liburing.h: add io_uring_prep_cancel_fd()
io_uring: add new cancel flags
Check it in cq_ring_needs_flush(), so that a peek operation will notice
and enter the kernel to flush completions.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
If this is set in features, applications can rely on file assignments
being done sanely in deferred execution setups (like links, or drain).
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Remove it from the io_uring_prep_msg_ring.3 man page as it's no longer
being set by the kernel, and remove the definition and comment from the
kernel header.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
* registered-ring:
test/sq-poll-dup: modify ring fd hack to work with enter_ring_fd
Add ring fd registration helpers
Add preliminary support for using a registered ring fd
io_uring.h: sync with kernel for registered ring feature
If the ring is created with this flag, then we expect submissions to
continue even if we hit an error in a batch. Check if that is the case
or not.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
The IORING_OP_MSG_RING command type can be used to send a notification
to another ring. This can be used to either just wakeup anyone waiting
on the ring, for example.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
A full memory barrier is required between the store to the SQ tail in
__io_uring_flush_sq and the load of the flags in sq_ring_needs_enter
to prevent a situation where the kernel thread goes to sleep while
sq_ring_needs_enter returns false
Fixes: https://github.com/axboe/liburing/issues/541
Signed-off-by: Almog Khaikin <almogkh@gmail.com>
There are still discussions about the API, and hence the feature will
miss the 5.17 kernel release. As the API is likely to change, remove
the getdents support for now and we can re-add it when it's finalized.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Applications can index the array they pass in to
IORING_REGISTER_IOWQ_MAX_WORKERS instead of using non-specific 0 and 1
values for bound/unbound.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
A previous commit did sync with the kernel in terms of the API, but we
neglected to change the actual enum as well.
Fixes: 8295a41544 ("Change IORING_REGISTER_IOWQ_MAX_UNBOUND_WORKERS")
Signed-off-by: Jens Axboe <axboe@kernel.dk>