commit | 4950421a7e379ba0ca642390ae4ae7b68e92a42f | [log] [tgz] |
---|---|---|
author | Jens Axboe <jens.axboe@oracle.com> | Thu Jun 05 09:03:30 2008 +0200 |
committer | Jens Axboe <jens.axboe@oracle.com> | Thu Jun 05 09:03:30 2008 +0200 |
tree | 54a6b69d7181a12318071128eaad0fcf37e916b7 | |
parent | 0721d11e4d9807e40385e06b419824e9a875525c [diff] [blame] |
Add iodepth_batch_complete control Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
diff --git a/ioengines.c b/ioengines.c index 8975591..e447539 100644 --- a/ioengines.c +++ b/ioengines.c
@@ -195,9 +195,13 @@ if (r < 0) goto out; } + if (max > td->cur_depth) + max = td->cur_depth; + if (min > max) + max = min; r = 0; - if (td->io_ops->getevents) + if (max && td->io_ops->getevents) r = td->io_ops->getevents(td, min, max, t); out: if (r >= 0)