return sw;
}
-static int all_sw_idle(struct workqueue *wq)
+static bool all_sw_idle(struct workqueue *wq)
{
int i;
struct submit_worker *sw = &wq->workers[i];
if (!(sw->flags & SW_F_IDLE))
- return 0;
+ return false;
}
- return 1;
+ return true;
}
/*
fio_gettime(&td->epoch, NULL);
fio_getrusage(&td->ru_start);
- clear_io_state(td);
+ clear_io_state(td, 1);
td_set_runstate(td, TD_RUNNING);
td->flags |= TD_F_CHILD;
if (td->io_u_queued || td->cur_depth ||
td->io_u_in_flight) {
+ int ret;
+
pthread_mutex_unlock(&sw->lock);
- io_u_quiesce(td);
+ ret = io_u_quiesce(td);
+ if (ret > 0)
+ td->cur_depth -= ret;
pthread_mutex_lock(&sw->lock);
}