]> git.baikalelectronics.ru Git - kernel.git/commit
io_uring: allow unbreakable links
authorJens Axboe <axboe@kernel.dk>
Sun, 8 Dec 2019 03:59:47 +0000 (20:59 -0700)
committerJens Axboe <axboe@kernel.dk>
Tue, 10 Dec 2019 23:33:06 +0000 (16:33 -0700)
commitf4b32a27fed18c91c6c900869063671a85fa842d
tree791553f2f64ff0dd61b1bb3e5187bb2c8699ae6a
parentcbe2204b273f268f4fbb7dcad5773587e5b33d51
io_uring: allow unbreakable links

Some commands will invariably end in a failure in the sense that the
completion result will be less than zero. One such example is timeouts
that don't have a completion count set, they will always complete with
-ETIME unless cancelled.

For linked commands, we sever links and fail the rest of the chain if
the result is less than zero. Since we have commands where we know that
will happen, add IOSQE_IO_HARDLINK as a stronger link that doesn't sever
regardless of the completion result. Note that the link will still sever
if we fail submitting the parent request, hard links are only resilient
in the presence of completion results for requests that did submit
correctly.

Cc: stable@vger.kernel.org # v5.4
Reviewed-by: Pavel Begunkov <asml.silence@gmail.com>
Reported-by: 李通洲 <carter.li@eoitek.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c
include/uapi/linux/io_uring.h