ioengine: if we get BUSY in queuing, adjust accounting
authorJens Axboe <axboe@fb.com>
Fri, 16 Jan 2015 17:06:02 +0000 (10:06 -0700)
committerJens Axboe <axboe@fb.com>
Fri, 16 Jan 2015 17:06:02 +0000 (10:06 -0700)
Signed-off-by: Jens Axboe <axboe@fb.com>
ioengines.c

index 88f67d51dbaede8438a0a589073e816887a8fb6b..00098d6739daf8da3183476e98927395cba20e8c 100644 (file)
@@ -303,6 +303,11 @@ int td_io_queue(struct thread_data *td, struct io_u *io_u)
 
        unlock_file(td, io_u->file);
 
 
        unlock_file(td, io_u->file);
 
+       if (ret == FIO_Q_BUSY && ddir_rw(acct_ddir(io_u))) {
+               td->io_issues[acct_ddir(io_u)]--;
+               td->io_issue_bytes[acct_ddir(io_u)] -= io_u->xfer_buflen;
+       }
+
        /*
         * If an error was seen and the io engine didn't propagate it
         * back to 'td', do so.
        /*
         * If an error was seen and the io engine didn't propagate it
         * back to 'td', do so.