Merge branch 'fix-infinite-loop-of-io_uring' of https://github.com/satoru-takeuchi/fio
authorJens Axboe <axboe@kernel.dk>
Mon, 6 May 2019 16:24:24 +0000 (10:24 -0600)
committerJens Axboe <axboe@kernel.dk>
Mon, 6 May 2019 16:24:24 +0000 (10:24 -0600)
* 'fix-infinite-loop-of-io_uring' of https://github.com/satoru-takeuchi/fio:
  io_uring: fix possible infinite loop

engines/io_uring.c

index 5b3509a98d734bd3fe50157b81a3aa1a358b9547..a5e77d8f52fcfe29e1985824f953b0b594e64f85 100644 (file)
@@ -233,6 +233,8 @@ static int fio_ioring_getevents(struct thread_data *td, unsigned int min,
                r = fio_ioring_cqring_reap(td, events, max);
                if (r) {
                        events += r;
+                       if (actual_min != 0)
+                               actual_min -= r;
                        continue;
                }