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 int fio_null_open(struct thread_data fio_unused *td,
45 struct fio_file fio_unused *f)
50 static struct ioengine_ops ioengine = {
52 .version = FIO_IOOPS_VERSION,
53 .setup = fio_null_setup,
54 .queue = fio_null_queue,
55 .open_file = fio_null_open,
56 .flags = FIO_SYNCIO | FIO_DISKLESSIO,
59 static void fio_init fio_null_register(void)
61 register_ioengine(&ioengine);
64 static void fio_exit fio_null_unregister(void)
66 unregister_ioengine(&ioengine);