We expect this to fail in cases where it isn't available, so don't
clutter the standard/error output with it.
Also ensure that native_fallocate() returns true/false, since it's
a bool function. Just a cleanup, no functional change there.
Fixes:
2c3e17be4c7c ("filesetup: add native fallocate")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
!success ? "un": "");
if (success)
- return 0;
+ return false;
if (errno == ENOSYS)
dprint(FD_FILE, "native fallocate is not implemented\n");
- return -1;
+ return true;
}
static void fallocate_file(struct thread_data *td, struct fio_file *f)
switch (td->o.fallocate_mode) {
case FIO_FALLOCATE_NATIVE:
- r = native_fallocate(td, f);
- if (r != 0 && errno != ENOSYS)
- log_err("fio: native_fallocate call failed: %s\n",
- strerror(errno));
+ native_fallocate(td, f);
break;
case FIO_FALLOCATE_NONE:
break;