[PATCH] Only fsync on close if fsync= given
authorJens Axboe <axboe@suse.de>
Thu, 25 May 2006 21:01:01 +0000 (23:01 +0200)
committerJens Axboe <axboe@suse.de>
Thu, 25 May 2006 21:01:01 +0000 (23:01 +0200)
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 (td->cur_depth)
                cleanup_pending_aio(td);
 
-       if (should_fsync(td))
+       if (should_fsync(td) && td->fsync_blocks)
                sync_td(td);
 }
 
                sync_td(td);
 }