]> git.baikalelectronics.ru Git - kernel.git/commit
io_uring: only return -EBUSY for submit on non-flushed backlog
authorJens Axboe <axboe@kernel.dk>
Fri, 22 Nov 2019 04:01:26 +0000 (21:01 -0700)
committerJens Axboe <axboe@kernel.dk>
Tue, 26 Nov 2019 02:56:11 +0000 (19:56 -0700)
commit97c16828e2fc8daee524d6876e1525b46a2597b7
tree6375063a0714ee09939f2660af0fba287e3abf96
parent95225cf0d4bea445f4bcf2586874b03b09fe97b4
io_uring: only return -EBUSY for submit on non-flushed backlog

We return -EBUSY on submit when we have a CQ ring overflow backlog, but
that can be a bit problematic if the application is using pure userspace
poll of the CQ ring. For that case, if the ring briefly overflowed and
we have pending entries in the backlog, the submit flushes the backlog
successfully but still returns -EBUSY. If we're able to fully flush the
CQ ring backlog, let the submission proceed.

Reported-by: Dan Melnic <dmm@fb.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c