]> git.baikalelectronics.ru Git - kernel.git/commit
io_uring: add support for marking commands as draining
authorJens Axboe <axboe@kernel.dk>
Sun, 7 Apr 2019 03:51:27 +0000 (21:51 -0600)
committerJens Axboe <axboe@kernel.dk>
Thu, 2 May 2019 20:08:53 +0000 (14:08 -0600)
commitbc80a87477c8fa65c24db4327375f096dee28262
treef0d4a88d22ee63d0d2270249ed516b4135b92c43
parent731b48ff5c3c42a503cded2f06c31db4c530b7b0
io_uring: add support for marking commands as draining

There are no ordering constraints between the submission and completion
side of io_uring. But sometimes that would be useful to have. One common
example is doing an fsync, for instance, and have it ordered with
previous writes. Without support for that, the application must do this
tracking itself.

This adds a general SQE flag, IOSQE_IO_DRAIN. If a command is marked
with this flag, then it will not be issued before previous commands have
completed, and subsequent commands submitted after the drain will not be
issued before the drain is started.. If there are no pending commands,
setting this flag will not change the behavior of the issue of the
command.

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