On Wed, Jul 22, 2020 at 07:08:21PM +0300, Avi Kivity wrote: > > On 13/12/2018 13.53, Goldwyn Rodrigues wrote: > > For AIO+DIO with RWF_NOWAIT, if the block layer does not support REQ_NOWAIT, > > it returns EIO. Return EOPNOTSUPP to represent the correct error code. > > > > Signed-off-by: Goldwyn Rodrigues <rgoldwyn@xxxxxxxx> I think the main problem is the EOPNOTSUPP return value. Everywhere else we treat the lack of support as BLK_STS_AGAIN / -EAGAIN, so it should return that. Independ of that the legacy direct I/O code really should just use blk_status_to_errno like most of the other infrastructure instead of havings it's own conversion and dropping the detailed error status on the floor.