log_err(ENOSYS) on native_fallocate() failure which was newly added
by
2c3e17be('filesetup: add native fallocate') should be silenced
or somehow be printed only once instead of being a per file message.
This happens on a platform like FreeBSD where posix_fallocate(3)
exists, but native_fallocate() is ENOSYS.
This commit just silences it if errno is set to ENOSYS on return.
"native" is the default mode, thus not printing ENOSYS won't be any
confusing unless fallocate=native is explicitly specified, and
native_fallocate() has dprint() for ENOSYS case anyway.
--
# uname
FreeBSD
# ./fio --name=xxx --ioengine=sync --rw=read --bs=4k --size=10m --nrfiles=20
xxx: (g=0): rw=read, bs=(R) 4096B-4096B, (W) 4096B-4096B, (T) 4096B-4096B, ioengine=sync, iodepth=1
fio-2.99-23-gdad0
Starting 1 process
xxx: Laying out IO files (20 files / total 10MiB)
fio: native_fallocate call failed: Function not implemented
fio: native_fallocate call failed: Function not implemented
fio: native_fallocate call failed: Function not implemented
fio: native_fallocate call failed: Function not implemented
fio: native_fallocate call failed: Function not implemented
fio: native_fallocate call failed: Function not implemented
fio: native_fallocate call failed: Function not implemented
fio: native_fallocate call failed: Function not implemented
fio: native_fallocate call failed: Function not implemented
fio: native_fallocate call failed: Function not implemented
...
Signed-off-by: Tomohiro Kusumi <tkusumi@tuxera.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>