backend: clear IO_U_F_FLIGHT flag in zero byte read path
When read io_u completes with zero byte read, it sets EIO as the error
and put the io_u. However, it does not clear the IO_U_F_FLIGHT flag.
When fio runs with --ignore_error=EIO option, the io_u with the flag is
reused for next I/O and causes an assertion failure:
fio: ioengines.c:335: td_io_queue: Assertion `(io_u->flags & IO_U_F_FLIGHT) == 0' failed.
The failure is observed with blktests test case block/011 which runs fio
with the --ignore_error=EIO option [1].
[1] https://github.com/osandov/blktests/issues/29
Fix this by calling clear_io_u() instead of put_io_u() in the zero byte
read path. clear_io_u() clears the IO_U_F_FLIGHT flag then calls
put_io_u().
Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Link: https://lore.kernel.org/r/20230721044444.749537-1-shinichiro.kawasaki@wdc.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>