io_uring: add support for bundles
This adds a new command type, IORING_OP_BUNDLE. Such a request must have
a link flag set, and a submission can have any number of linked request
submitted. Each linked request will be part of the bundle, and a bundle
will terminate when the link flag is no longer set. This works just like
regular links.
The difference is that a bundle request completes when ALL the requests
in a bundle have completed, and each request in the bundle can be issued
in parallel. Unlike regular links, there are no dependencies between
the individual requests in a bundle.
If used with CQE supression (setting IOSQE_CQE_SKIP_SUCCESS in the SQE),
a bundle will only generate a single CQE - for the bundle itself. If
any of the bundled requests error, they will post a completion as per
usual with IOSQE_CQE_SKIP_SUCCESS.
The IORING_OP_BUNDLE completion is either < 0 for an error, or the
number of bundle members that completed (0, if the submitted bundle
was empty).
Signed-off-by: Jens Axboe <axboe@kernel.dk>