Otherwise we can hang fio, since it'll attempt to wait for more
IOs than we have in flight.
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
*/
full = queue_full(td) || ret == FIO_Q_BUSY;
if (full || !td->o.iodepth_batch_complete) {
*/
full = queue_full(td) || ret == FIO_Q_BUSY;
if (full || !td->o.iodepth_batch_complete) {
- min_events = td->o.iodepth_batch_complete;
+ min_events = min(td->o.iodepth_batch_complete,
+ td->cur_depth);
if (full && !min_events)
min_events = 1;
if (full && !min_events)
min_events = 1;
*/
full = queue_full(td) || ret == FIO_Q_BUSY;
if (full || !td->o.iodepth_batch_complete) {
*/
full = queue_full(td) || ret == FIO_Q_BUSY;
if (full || !td->o.iodepth_batch_complete) {
- min_evts = td->o.iodepth_batch_complete;
+ min_evts = min(td->o.iodepth_batch_complete,
+ td->cur_depth);
if (full && !min_evts)
min_evts = 1;
if (full && !min_evts)
min_evts = 1;