+ struct null_data *nd = td->io_ops->data;
+
+ fio_ro_check(td, io_u);
+
+ if (td->io_ops->flags & FIO_SYNCIO)
+ return FIO_Q_COMPLETED;
+ if (nd->events)
+ return FIO_Q_BUSY;
+
+ nd->io_us[nd->queued++] = io_u;
+ return FIO_Q_QUEUED;
+}
+
+static int fio_null_open(struct thread_data fio_unused *td,
+ struct fio_file fio_unused *f)
+{
+ return 0;
+}
+
+static void fio_null_cleanup(struct thread_data *td)
+{
+ struct null_data *nd = td->io_ops->data;
+
+ if (nd) {
+ if (nd->io_us)
+ free(nd->io_us);
+ free(nd);
+ }
+}
+
+static int fio_null_init(struct thread_data *td)
+{
+ struct null_data *nd = malloc(sizeof(*nd));
+
+ memset(nd, 0, sizeof(*nd));
+
+ if (td->o.iodepth != 1) {
+ nd->io_us = malloc(td->o.iodepth * sizeof(struct io_u *));
+ memset(nd->io_us, 0, td->o.iodepth * sizeof(struct io_u *));
+ } else
+ td->io_ops->flags |= FIO_SYNCIO;
+
+ td->io_ops->data = nd;
+ return 0;