engines/sg: support trim operations via the UNMAP command
[fio.git] / os / os-linux.h
index 1d400a0d3aed1d10a31e564513ff19a1d92669f3..6b63d123956afa6f28f20b3e7ff32e583f652e99 100644 (file)
@@ -27,7 +27,6 @@
 #endif /* ARCH_HAVE_CRC_CRYPTO */
 
 #include "./os-linux-syscall.h"
-#include "binject.h"
 #include "../file.h"
 
 #ifndef __has_builtin         // Optional of course.
@@ -48,7 +47,6 @@
 #define FIO_HAVE_CGROUPS
 #define FIO_HAVE_FS_STAT
 #define FIO_HAVE_TRIM
-#define FIO_HAVE_BINJECT
 #define FIO_HAVE_GETTID
 #define FIO_USE_GENERIC_INIT_RANDOM_STATE
 #define FIO_HAVE_PWRITEV2
@@ -405,7 +403,7 @@ static inline bool fio_fallocate(struct fio_file *f, uint64_t offset,
                                 uint64_t len)
 {
        int ret;
-       ret = fallocate(f->fd, 0, 0, len);
+       ret = fallocate(f->fd, 0, offset, len);
        if (ret == 0)
                return true;