2 * null engine - doesn't do any transfers. Used to test fio.
14 static int fio_null_queue(struct thread_data fio_unused *td, struct io_u *io_u)
18 return FIO_Q_COMPLETED;
21 static int fio_null_setup(struct thread_data *td)
26 if (!td->total_file_size) {
27 log_err("fio: need size= set\n");
31 td->io_size = td->total_file_size;
32 td->total_io_size = td->io_size;
34 for_each_file(td, f, i) {
35 f->fd = dup(STDOUT_FILENO);
36 f->real_file_size = td->total_io_size / td->nr_files;
37 f->file_size = f->real_file_size;
40 td->nr_open_files = td->nr_files;
44 static struct ioengine_ops ioengine = {
46 .version = FIO_IOOPS_VERSION,
47 .setup = fio_null_setup,
48 .queue = fio_null_queue,
49 .flags = FIO_SYNCIO | FIO_DISKLESSIO | FIO_SELFOPEN,
52 static void fio_init fio_null_register(void)
54 register_ioengine(&ioengine);
57 static void fio_exit fio_null_unregister(void)
59 unregister_ioengine(&ioengine);