[PATCH] Add end_fsync option
[fio.git] / fio.c
diff --git a/fio.c b/fio.c
index bc0083433a445ed688bdf04c11b63dab224ba524..3c35039a6a4788e25bc1abc4165630cb0335769e 100644 (file)
--- a/fio.c
+++ b/fio.c
@@ -1136,7 +1136,7 @@ static void do_io(struct thread_data *td)
        if (td->cur_depth)
                cleanup_pending_aio(td);
 
-       if (should_fsync(td) && td->fsync_blocks)
+       if (should_fsync(td) && td->end_fsync)
                sync_td(td);
 }
 
@@ -1158,6 +1158,8 @@ static int init_io(struct thread_data *td)
                return fio_posixaio_init(td);
        else if (td->io_engine == FIO_SGIO)
                return fio_sgio_init(td);
+       else if (td->io_engine == FIO_SPLICEIO)
+               return fio_spliceio_init(td);
        else {
                fprintf(stderr, "bad io_engine %d\n", td->io_engine);
                return 1;