Update fio io engine version
[fio.git] / engines / sync.c
index 5cf73662ad6dcc9f1e9893f12e34a3669d6e5124..a137282786e8759f0c175230a2c45206a814235d 100644 (file)
@@ -1,5 +1,8 @@
 /*
- * regular read/write sync io engine
+ * sync engine
+ *
+ * IO engine that does regular read(2)/write(2) with lseek(2) to transfer
+ * data.
  *
  */
 #include <stdio.h>
@@ -21,7 +24,7 @@ static int fio_syncio_prep(struct thread_data *td, struct io_u *io_u)
                return 0;
 
        if (lseek(f->fd, io_u->offset, SEEK_SET) == -1) {
-               td_verror(td, errno);
+               td_verror(td, errno, "lseek");
                return 1;
        }
 
@@ -50,7 +53,7 @@ static int fio_syncio_queue(struct thread_data *td, struct io_u *io_u)
        }
 
        if (io_u->error)
-               td_verror(td, io_u->error);
+               td_verror(td, io_u->error, "xfer");
 
        return FIO_Q_COMPLETED;
 }
@@ -60,6 +63,8 @@ static struct ioengine_ops ioengine = {
        .version        = FIO_IOOPS_VERSION,
        .prep           = fio_syncio_prep,
        .queue          = fio_syncio_queue,
+       .open_file      = generic_open_file,
+       .close_file     = generic_close_file,
        .flags          = FIO_SYNCIO,
 };