diff options
author | Bruce Cran <bruce@cran.org.uk> | 2012-10-10 16:24:16 +0100 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2012-10-10 09:36:29 -0600 |
commit | eedd9d0fe637517fd655c4cacdd335ce4959abf2 (patch) | |
tree | 05a1a1cace028b309bf9a522715057186549b60a | |
parent | 04b2f7990c50c8f45355c31e3d89288761728709 (diff) | |
download | fio-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>
-rwxr-xr-x | os/windows/posix.c | 3 |
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; } |