Merge branch 'global_dedup' of https://github.com/bardavid/fio
[fio.git] / engines / windowsaio.c
index d82c80536145409356739c3a5ea94d518259f141..6681f8bbabfa9dd4b273720f444e70e4e628d20d 100644 (file)
@@ -248,7 +248,7 @@ static int fio_windowsaio_open_file(struct thread_data *td, struct fio_file *f)
                log_err("fio: unknown fadvise type %d\n", td->o.fadvise_hint);
        }
 
-       if (!td_write(td) || read_only)
+       if ((!td_write(td) && !(td->flags & TD_F_SYNCS)) || read_only)
                access = GENERIC_READ;
        else
                access = (GENERIC_READ | GENERIC_WRITE);