On 9/12/22 11:14 AM, Bart Van Assche wrote: > On 9/12/22 09:53, Stefan Roesch wrote: >> Today blk_queue_enter() and __bio_queue_enter() return -EBUSY for the >> nowait code path. This is not correct: they should return -EAGAIN >> instead. > > Why is this considered incorrect? Please explain. > > Since this patch also affects other code, e.g. NVMe pass-through, can > this patch break existing user space code by changing the value > returned to user space? It is currently broken because we always return EAGAIN/EWOULDBLOCK for these cases, if a non-block flag is set of some sort. I strongly suspect that nobody has really being doing non-blocking IO to devices before io_uring made it a lot more common. EAGAIN means "try again later, or without nonblock said". We should be consistent here. -- Jens Axboe