sync engine: missing fsync check in vsync
authorJens Axboe <jens.axboe@oracle.com>
Mon, 4 Feb 2008 14:58:24 +0000 (15:58 +0100)
committerJens Axboe <jens.axboe@oracle.com>
Mon, 4 Feb 2008 14:58:24 +0000 (15:58 +0100)
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
engines/sync.c

index 505381d4ca942b932d7171393a2dc8f51c558726..c5410c7d4a97f6cbef713de04e15608b0e90f7e8 100644 (file)
@@ -157,6 +157,11 @@ static int fio_vsyncio_queue(struct thread_data *td, struct io_u *io_u)
                 */
                if (sd->queued)
                        return FIO_Q_BUSY;
                 */
                if (sd->queued)
                        return FIO_Q_BUSY;
+               if (io_u->ddir == DDIR_SYNC) {
+                       int ret = fsync(io_u->file->fd);
+
+                       return fio_io_end(td, io_u, ret);
+               }
 
                sd->queued = 0;
                sd->queued_bytes = 0;
 
                sd->queued = 0;
                sd->queued_bytes = 0;