If an ioengine returned FIO_Q_BUSY, td->io_issues[ddir] would be
over decremented: once in td_io_queue() and then again in
requeue_io_u(). This was because td_io_queue() reverted various values
upon finding the queue busy but requeue_io_u() found the I/O was still
in flight so decremented again. This then showed up as unsigned
underflow on td->io_issues[ddir].
Fix this by clearing IO_U_F_FLIGHT on the I/O when we find the queue was
busy in td_io_queue().
Signed-off-by: Sitsofe Wheeer <sitsofe@yahoo.com>
td->io_issues[ddir]--;
td->io_issue_bytes[ddir] -= buflen;
td->rate_io_issue_bytes[ddir] -= buflen;
td->io_issues[ddir]--;
td->io_issue_bytes[ddir] -= buflen;
td->rate_io_issue_bytes[ddir] -= buflen;
+ io_u_clear(td, io_u, IO_U_F_FLIGHT);