[PATCH] Remember to check ioops version in loaded module
[fio.git] / engines / fio-engine-cpu.c
CommitLineData
2866c82d
JA
1#include "fio.h"
2#include "os.h"
3
4static int fio_cpuio_init(struct thread_data *td)
5{
6 if (!td->cpuload) {
7 td_vmsg(td, EINVAL, "cpu thread needs rate");
8 return 1;
9 } else if (td->cpuload > 100)
10 td->cpuload = 100;
11
12 td->read_iolog = td->write_iolog = 0;
13 td->fd = -1;
14
15 return 0;
16}
17
18struct ioengine_ops ioengine = {
19 .name = "cpuio",
20 .version = FIO_IOOPS_VERSION,
21 .init = fio_cpuio_init,
22 .flags = FIO_CPUIO,
23};