From 2c3a4ae912d1453e09a2da013669904685c41933 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Wed, 1 Oct 2014 08:42:27 -0600 Subject: [PATCH 1/1] 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 --- engines/libaio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- 2.25.1