Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
#include "fio.h"
#include "os.h"
+static int fio_cpuio_setup(struct thread_data fio_unused *td)
+{
+ return 0;
+}
+
static int fio_cpuio_init(struct thread_data *td)
{
if (!td->cpuload) {
.name = "cpuio",
.version = FIO_IOOPS_VERSION,
.init = fio_cpuio_init,
+ .setup = fio_cpuio_setup,
.flags = FIO_CPUIO,
};
struct stat st;
int flags = 0;
- if (td->io_ops->flags & FIO_CPUIO)
- return 0;
+ if (td->io_ops->setup)
+ return td->io_ops->setup(td);
if (stat(td->file_name, &st) == -1) {
if (errno != ENOENT) {
char name[16];
int version;
int flags;
+ int (*setup)(struct thread_data *);
int (*init)(struct thread_data *);
int (*prep)(struct thread_data *, struct io_u *);
int (*queue)(struct thread_data *, struct io_u *);