summaryrefslogtreecommitdiff
path: root/os/windows/posix.c
diff options
context:
space:
mode:
authorBruce Cran <bruce@cran.org.uk>2012-10-10 16:24:16 +0100
committerJens Axboe <axboe@kernel.dk>2012-10-10 09:36:29 -0600
commiteedd9d0fe637517fd655c4cacdd335ce4959abf2 (patch)
tree05a1a1cace028b309bf9a522715057186549b60a /os/windows/posix.c
parent04b2f7990c50c8f45355c31e3d89288761728709 (diff)
downloadfio-eedd9d0fe637517fd655c4cacdd335ce4959abf2.tar.gz
fio-eedd9d0fe637517fd655c4cacdd335ce4959abf2.tar.bz2
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 <axboe@kernel.dk>
Diffstat (limited to 'os/windows/posix.c')
-rwxr-xr-xos/windows/posix.c3
1 files changed, 3 insertions, 0 deletions
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;
}