]> git.baikalelectronics.ru Git - kernel.git/commit
block: blk_queue_enter() / __bio_queue_enter() must return -EAGAIN for nowait
authorStefan Roesch <shr@fb.com>
Mon, 12 Sep 2022 16:53:25 +0000 (09:53 -0700)
committerJens Axboe <axboe@kernel.dk>
Tue, 13 Sep 2022 21:06:39 +0000 (15:06 -0600)
commitaac2b7d72ce1ef57881f8119789e3ac847294295
treea7ccff75d77a9c58846c02a07daa7126bfbdc7bc
parent6b18925e4063c559f367ac4bb3ba1b431d300e0d
block: blk_queue_enter() / __bio_queue_enter() must return -EAGAIN for nowait

Today blk_queue_enter() and __bio_queue_enter() return -EBUSY for the
nowait code path. This is not correct: they should return -EAGAIN
instead.

This problem was detected by fio. The following command exposed the
above problem:

t/io_uring -p0 -d128 -b4096 -s32 -c32 -F1 -B0 -R0 -X1 -n24 -P1 -u1 -O0 /dev/ng0n1

By applying the patch, the retry case is handled correctly in the slow
path.

Signed-off-by: Stefan Roesch <shr@fb.com>
Fixes: ffb93f644cbf ("blk-mq: don't wait in blk_mq_queue_enter() if __GFP_WAIT isn't set")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-core.c