summaryrefslogtreecommitdiff
path: root/os
diff options
context:
space:
mode:
authorTrip Volpe <trip@qumulo.com>2019-11-07 15:13:48 -0800
committerTrip Volpe <trip@qumulo.com>2019-11-12 09:57:42 -0800
commit38ca5f03add887d9b7fa371fecd535c624a3031a (patch)
treed7a4268743d91db00e9b3de9e824ea09ed202cb8 /os
parentd5c4f97458d59689c3d1a13831519617d000fb19 (diff)
downloadfio-38ca5f03add887d9b7fa371fecd535c624a3031a.tar.gz
fio-38ca5f03add887d9b7fa371fecd535c624a3031a.tar.bz2
filesetup: add fallocate=truncate option.
Fixes #833. Provides the ability to initially "layout" the file by ftruncating it to the desired size before performing IO. This is mainly useful on Windows, which serializes all writes that extend the size of a file. Using this option with a suitable iodepth allows fio to emulate the behavior of Windows Explorer file copy, which always truncates to the expected size before issuing writes for performance reasons.
Diffstat (limited to 'os')
-rw-r--r--os/os.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/os/os.h b/os/os.h
index e4729680..dadcd87b 100644
--- a/os/os.h
+++ b/os/os.h
@@ -397,7 +397,7 @@ static inline bool fio_fallocate(struct fio_file *f, uint64_t offset, uint64_t l
#endif
#if defined(CONFIG_POSIX_FALLOCATE) || defined(FIO_HAVE_NATIVE_FALLOCATE)
-# define FIO_HAVE_ANY_FALLOCATE
+# define FIO_HAVE_DEFAULT_FALLOCATE
#endif
#ifndef FIO_HAVE_CPU_HAS