Draft: io_uring: introduce a generic samba_io_uring layer and convert vfs_io_uring to use it
This makes the code independent of the system liburing and adds some infrastructure to detect the available kernel features instead.
It means when the kernel provides io_uring, each tevent_context from samba_tevent_context_init() will be able to provide io_uring calls in a generic way.
We convert vfs_io_uring to use this generic layer and add 'io_uring:force_async_{read,write}_threshold' options in order to force IOSQE_ASYNC in order to offload memcpy to helper threads.
In future we'll use it for the smb client and server to offload sendmsg/recvmsg to IORING_OP_SENDMSG/RECVMSG with IOSQE_ASYNC to move memcpy to a helper thread.
Checklist
-
Commits have
Signed-off-by:with name/author being identical to the commit author - (optional) This MR is just one part towards a larger feature.
-
(optional, if backport required) Bugzilla bug filed and
BUG:tag added - Test suite updated with functionality tests
- Test suite updated with negative tests
- Documentation updated
- CI timeout is 3h or higher (see Settings/CICD/General pipelines/ Timeout)
Reviewer's checklist:
- There is a test suite reasonably covering new functionality or modifications
-
Function naming, parameters, return values, types, etc., are consistent
and according to
README.Coding.md - This feature/change has adequate documentation added
- No obvious mistakes in the code