Skip to content
Commit c58c1f83 authored by Roman Penyaev's avatar Roman Penyaev Committed by Jens Axboe
Browse files

block: end bio with BLK_STS_AGAIN in case of non-mq devs and REQ_NOWAIT



Non-mq devs do not honor REQ_NOWAIT so give a chance to the caller to repeat
request gracefully on -EAGAIN error.

The problem is well reproduced using io_uring:

   mkfs.ext4 /dev/ram0
   mount /dev/ram0 /mnt

   # Preallocate a file
   dd if=/dev/zero of=/mnt/file bs=1M count=1

   # Start fio with io_uring and get -EIO
   fio --rw=write --ioengine=io_uring --size=1M --direct=1 --name=job --filename=/mnt/file

Signed-off-by: default avatarRoman Penyaev <rpenyaev@suse.de>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 1c05839a
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment