diff options
author | Jens Axboe <axboe@kernel.dk> | 2019-12-08 06:59:47 +0300 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2019-12-11 02:33:06 +0300 |
commit | 4e88d6e7793f2f445f43bd608828541d7f43b608 (patch) | |
tree | 791553f2f64ff0dd61b1bb3e5187bb2c8699ae6a /include/uapi/linux/io_uring.h | |
parent | 0b4295b5e2b9b42f3f3096496fe4775b656c9ba6 (diff) | |
download | linux-4e88d6e7793f2f445f43bd608828541d7f43b608.tar.xz |
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>
Diffstat (limited to 'include/uapi/linux/io_uring.h')
-rw-r--r-- | include/uapi/linux/io_uring.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/uapi/linux/io_uring.h b/include/uapi/linux/io_uring.h index eabccb46edd1..ea231366f5fd 100644 --- a/include/uapi/linux/io_uring.h +++ b/include/uapi/linux/io_uring.h @@ -48,6 +48,7 @@ struct io_uring_sqe { #define IOSQE_FIXED_FILE (1U << 0) /* use fixed fileset */ #define IOSQE_IO_DRAIN (1U << 1) /* issue after inflight IO */ #define IOSQE_IO_LINK (1U << 2) /* links next sqe */ +#define IOSQE_IO_HARDLINK (1U << 3) /* like LINK, but stronger */ /* * io_uring_setup() flags |