workqueue: remove knowledge of io issue (and others) stats
[fio.git] / backend.c
index 10622efe5579d25ef029a2053a5206aad1311f6d..63d47a29bb63a5ddad78fe8618590db2db499145 100644 (file)
--- a/backend.c
+++ b/backend.c
@@ -928,10 +928,20 @@ static uint64_t do_io(struct thread_data *td)
                        log_io_piece(td, io_u);
 
                if (td->o.io_submit_mode == IO_MODE_OFFLOAD) {
+                       const unsigned long blen = io_u->xfer_buflen;
+                       const enum fio_ddir ddir = acct_ddir(io_u);
+
                        if (td->error)
                                break;
+
                        ret = workqueue_enqueue(&td->io_wq, io_u);
 
+                       if (ret == FIO_Q_QUEUED && ddir_rw(ddir)) {
+                               td->io_issues[ddir]++;
+                               td->io_issue_bytes[ddir] += blen;
+                               td->rate_io_issue_bytes[ddir] += blen;
+                       }
+
                        if (should_check_rate(td))
                                td->rate_next_io_time[ddir] = usec_for_io(td, ddir);