From: Jens Axboe Date: Wed, 1 Oct 2014 14:42:27 +0000 (-0600) Subject: engines/libaio: fix submit loop to use 'ld->queued' for exit X-Git-Tag: fio-2.1.13~4 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=2c3a4ae912d1453e09a2da013669904685c41933;ds=inline engines/libaio: fix submit loop to use 'ld->queued' for exit We could have head == tail for a full ring, so use the amount queued as the gauge instead. This would be very hard to trigger, as it would require a full ring on entry and the first submit would have to fail to submit anything before we loop around. Signed-off-by: Jens Axboe --- diff --git a/engines/libaio.c b/engines/libaio.c index ca7bfdef..6f625167 100644 --- a/engines/libaio.c +++ b/engines/libaio.c @@ -283,7 +283,7 @@ static int fio_libaio_commit(struct thread_data *td) continue; } else break; - } while (ld->head != ld->tail); + } while (ld->queued); return ret; }