zbd: Improve robustness of unit tests
[fio.git] / engines / io_uring.c
index 5b3509a98d734bd3fe50157b81a3aa1a358b9547..9bcfec1726b05402bbc0875b2a53bf3edfc13e52 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;
                }
 
@@ -531,6 +533,7 @@ static int fio_ioring_io_u_init(struct thread_data *td, struct io_u *io_u)
 static struct ioengine_ops ioengine = {
        .name                   = "io_uring",
        .version                = FIO_IOOPS_VERSION,
+       .flags                  = FIO_ASYNCIO_SYNC_TRIM,
        .init                   = fio_ioring_init,
        .post_init              = fio_ioring_post_init,
        .io_u_init              = fio_ioring_io_u_init,