OSDN Git Service

io_uring: add support for sqe links
authorJens Axboe <axboe@kernel.dk>
Fri, 10 May 2019 22:07:28 +0000 (16:07 -0600)
committerJens Axboe <axboe@kernel.dk>
Mon, 24 Jun 2019 14:00:18 +0000 (08:00 -0600)
commit9e645e1105ca60fbbc6bddf2fd5ef7e57ed3dca8
tree4b035192211c7a57d57f4102ba1fa982f70c5df9
parent9d93a3f5a0c0d0f79aebc597d47c7cedc852aeb5
io_uring: add support for sqe links

With SQE links, we can create chains of dependent SQEs. One example
would be queueing an SQE that's a read from one file descriptor, with
the linked SQE being a write to another with the same set of buffers.

An SQE link will not stall the pipeline, it'll just ensure that
dependent SQEs aren't issued before the previous link has completed.

Any error at submission or completion time will break the chain of SQEs.
For completions, this also includes short reads or writes, as the next
SQE could depend on the previous one being fully completed.

Any SQE in a chain that gets canceled due to any of the above errors,
will get an CQE fill with -ECANCELED as the error value.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c
include/uapi/linux/io_uring.h