Tell the backend that null just fakes IO, and use this knowledge
to have verifies automagically work when using null. This allows
testing of a wider range of paths with ioengine=null.
Signed-off-by: Jens Axboe <axboe@fb.com>
.init = fio_null_init,
.cleanup = fio_null_cleanup,
.open_file = fio_null_open,
.init = fio_null_init,
.cleanup = fio_null_cleanup,
.open_file = fio_null_open,
- .flags = FIO_DISKLESSIO,
+ .flags = FIO_DISKLESSIO | FIO_FAKEIO,
};
static void fio_init fio_null_register(void)
};
static void fio_init fio_null_register(void)
ioengine->init = fio_null_init;
ioengine->cleanup = fio_null_cleanup;
ioengine->open_file = fio_null_open;
ioengine->init = fio_null_init;
ioengine->cleanup = fio_null_cleanup;
ioengine->open_file = fio_null_open;
- ioengine->flags = FIO_DISKLESSIO;
+ ioengine->flags = FIO_DISKLESSIO | FIO_FAKEIO;
}
}
#endif /* FIO_EXTERNAL_ENGINE */
}
}
#endif /* FIO_EXTERNAL_ENGINE */
FIO_BARRIER = 1 << 8, /* engine supports barriers */
FIO_MEMALIGN = 1 << 9, /* engine wants aligned memory */
FIO_BIT_BASED = 1 << 10, /* engine uses a bit base (e.g. uses Kbit as opposed to KB) */
FIO_BARRIER = 1 << 8, /* engine supports barriers */
FIO_MEMALIGN = 1 << 9, /* engine wants aligned memory */
FIO_BIT_BASED = 1 << 10, /* engine uses a bit base (e.g. uses Kbit as opposed to KB) */
+ FIO_FAKEIO = 1 << 11, /* engine pretends to do IO */
if (td->o.verify == VERIFY_NULL || io_u->ddir != DDIR_READ)
return 0;
if (td->o.verify == VERIFY_NULL || io_u->ddir != DDIR_READ)
return 0;
+ /*
+ * If the IO engine is faking IO (like null), then just pretend
+ * we verified everything.
+ */
+ if (td->io_ops->flags & FIO_FAKEIO)
+ return 0;
+
if (io_u->flags & IO_U_F_TRIMMED) {
ret = verify_trimmed_io_u(td, io_u);
goto done;
if (io_u->flags & IO_U_F_TRIMMED) {
ret = verify_trimmed_io_u(td, io_u);
goto done;