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;
}
/*
if (ddir_rw(ddir)) {
parent->io_issues[ddir]++;
parent->io_issue_bytes[ddir] += io_u->xfer_buflen;
+ parent->rate_io_issue_bytes[ddir] += io_u->xfer_buflen;
}
pthread_mutex_lock(&sw->lock);
memcpy(&td->ts, &parent->ts, sizeof(td->ts));
td->o.uid = td->o.gid = -1U;
dup_files(td, parent);
+ td->eo = parent->eo;
fio_options_mem_dupe(td);
if (ioengine_load(td))
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;
return 1;
}
-#ifdef CONFIG_SFA
+#ifdef CONFIG_SFAA
static void sum_val(uint64_t *dst, uint64_t *src)
{
if (*src) {
static void sum_ddir(struct thread_data *dst, struct thread_data *src,
enum fio_ddir ddir)
{
-#ifndef CONFIG_SFA
+#ifndef CONFIG_SFAA
pthread_mutex_lock(&dst->io_wq.stat_lock);
pthread_mutex_lock(&src->io_wq.stat_lock);
#endif
sum_val(&dst->this_io_bytes[ddir], &src->this_io_bytes[ddir]);
sum_val(&dst->bytes_done[ddir], &src->bytes_done[ddir]);
-#ifndef CONFIG_SFA
+#ifndef CONFIG_SFAA
pthread_mutex_unlock(&src->io_wq.stat_lock);
pthread_mutex_unlock(&dst->io_wq.stat_lock);
#endif
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);
}