ioengines: Fix td->io_issues[ddir] over decrement
authorSitsofe Wheeer <sitsofe@yahoo.com>
Sun, 27 Nov 2016 10:34:53 +0000 (10:34 +0000)
committerSitsofe Wheeler <sitsofe@yahoo.com>
Sun, 27 Nov 2016 21:40:26 +0000 (21:40 +0000)
commit871467d9b6a804632c8c952a61fc3065b3e1e93f
tree08cf214d836f5620833eabc73ad06d9373554cb5
parent90eff1c9f01d2f8b4ff8bc75a2bf120a1789b37c
ioengines: Fix td->io_issues[ddir] over decrement

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>
ioengines.c