From: Bruce Cran Date: Wed, 10 Oct 2012 15:24:16 +0000 (+0100) Subject: Windows: avoid large writes during file layout. X-Git-Tag: fio-2.0.10~2 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=eedd9d0fe637517fd655c4cacdd335ce4959abf2 Windows: avoid large writes during file layout. Avoid large buffered writes during file layout by flushing changes to disk by calling _commit() after each write. Signed-off-by: Jens Axboe --- diff --git a/os/windows/posix.c b/os/windows/posix.c index 24517729..11500e48 100755 --- a/os/windows/posix.c +++ b/os/windows/posix.c @@ -411,6 +411,9 @@ int posix_fallocate(int fd, off_t offset, off_t len) break; } + /* Don't allow Windows to cache the write: flush it to disk */ + _commit(fd); + bytes_remaining -= bytes_written; }