unsigned iodepth;
bool ioprio_class_set;
bool ioprio_set;
+ int prepped;
struct ioring_mmap mmap[3];
};
unsigned int nonvectored;
unsigned int uncached;
unsigned int nowait;
+ unsigned int force_async;
};
static const int ddir_to_op[2][2] = {
.category = FIO_OPT_C_ENGINE,
.group = FIO_OPT_G_IOURING,
},
+ {
+ .name = "force_async",
+ .lname = "Force async",
+ .type = FIO_OPT_INT,
+ .off1 = offsetof(struct ioring_options, force_async),
+ .help = "Set IOSQE_ASYNC every N requests",
+ .category = FIO_OPT_C_ENGINE,
+ .group = FIO_OPT_G_IOURING,
+ },
{
.name = NULL,
},
}
}
+ if (o->force_async && ++ld->prepped == o->force_async) {
+ ld->prepped = 0;
+ sqe->flags |= IOSQE_ASYNC;
+ }
+
sqe->user_data = (unsigned long) io_u;
return 0;
}