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 (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);
}