filesetup: add native fallocate
authorSitsofe Wheeler <sitsofe@yahoo.com>
Fri, 30 Jun 2017 06:32:19 +0000 (07:32 +0100)
committerSitsofe Wheeler <sitsofe@yahoo.com>
Mon, 3 Jul 2017 21:38:20 +0000 (22:38 +0100)
commit2c3e17be4c7c9a737317ada414b98929652fec15
tree0a94dce95b2d8402641cb5d4c7ce6725beb06594
parent5283741f7be708fbbb3feb2cd5ca5187f3a964d1
filesetup: add native fallocate

- Implement a native fallocate mode that only logs an error (if it's
  implemented) and falls back to the same behaviour as fallocate=none if
  it fails
- Add a native OSX and Linux fallocate
- Update man page and HOWTO with new native and defaults

v4:
- Update commit message
- Update man page and HOWTO

Fixes https://github.com/axboe/fio/issues/22 - we now print a message if
fallocate fails which gives the user a hint that behaviour might differ
from other case along with a workaround suggestion (fallocate=none).

Fixes https://github.com/axboe/fio/issues/376 - we now have
fallocate=none fallback behaviour if native fallocate fails. On at least
glibc platforms, posix_fallocate emulates fallocate if the
platform/filesystem doesn't support it (see
https://www.gnu.org/software/libc/manual/html_node/Storage-Allocation.html#index-posix_005ffallocate
for some of the caveats) resulting in strange layout performance thus
making it less attractive than fallocate=none behaviour for fio.

Signed-off-by: Sitsofe Wheeler <sitsofe@yahoo.com>
HOWTO
file.h
filesetup.c
fio.1
options.c
os/os-linux.h
os/os-mac.h
os/os.h