Always fsync if asked to
authorJens Axboe <axboe@kernel.dk>
Sat, 26 Jan 2013 16:28:23 +0000 (09:28 -0700)
committerJens Axboe <axboe@kernel.dk>
Sat, 26 Jan 2013 16:28:23 +0000 (09:28 -0700)
Currently we don't fsync() is direct IO is issued. But if the
user asked for fsync(), he should get an fsync. So remove this
restriction.

Reported-by: Stefan Hajnoczi <stefanha@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fio.h

diff --git a/fio.h b/fio.h
index 3a26335..9e20299 100644 (file)
--- a/fio.h
+++ b/fio.h
@@ -655,8 +655,6 @@ static inline int should_fsync(struct thread_data *td)
 {
        if (td->last_was_sync)
                return 0;
-       if (td->o.odirect)
-               return 0;
        if (td_write(td) || td_rw(td) || td->o.override_sync)
                return 1;