[PATCH] Only fsync on close if fsync= given
[fio.git] / fio.c
diff --git a/fio.c b/fio.c
index 7a037ce9814475ebb2261ea35262ed3a0d9ad581..8daa660b88b9805658445eae6422864aa85625f2 100644 (file)
--- a/fio.c
+++ b/fio.c
@@ -1050,7 +1050,7 @@ static void do_io(struct thread_data *td)
        if (td->cur_depth)
                cleanup_pending_aio(td);
 
-       if (should_fsync(td))
+       if (should_fsync(td) && td->fsync_blocks)
                sync_td(td);
 }