libaio: use INT_MAX to signal that we don't want the ring buffer
authorJens Axboe <axboe@kernel.dk>
Thu, 6 Sep 2012 15:07:44 +0000 (09:07 -0600)
committerJens Axboe <axboe@kernel.dk>
Thu, 6 Sep 2012 15:07:44 +0000 (09:07 -0600)
We can't use 0 since the libaio library _also_ checks the
nr_events being passed in. So lets use INT_MAX instead.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
engines/libaio.c

index ad7903cf5f1d36bdc9dfd4585e864c172ba87726..bc459da1fcbaf5a310305cc4e4d2b63136c873a8 100644 (file)
@@ -266,7 +266,7 @@ static int fio_libaio_init(struct thread_data *td)
         * and we need the right depth.
         */
        if (!o->userspace_reap)
         * and we need the right depth.
         */
        if (!o->userspace_reap)
-               err = io_queue_init(0, &ld->aio_ctx);
+               err = io_queue_init(INT_MAX, &ld->aio_ctx);
        if (o->userspace_reap || err == -EINVAL)
                err = io_queue_init(td->o.iodepth, &ld->aio_ctx);
        if (err) {
        if (o->userspace_reap || err == -EINVAL)
                err = io_queue_init(td->o.iodepth, &ld->aio_ctx);
        if (err) {