#include <sys/ioctl.h>
#include <sys/uio.h>
#include <sys/syscall.h>
+#include <sys/vfs.h>
#include <unistd.h>
#include <fcntl.h>
#include <errno.h>
+#include <sched.h>
#include <linux/unistd.h>
#include <linux/raw.h>
#include <linux/major.h>
#define FIO_HAVE_PSHARED_MUTEX
#define FIO_HAVE_CL_SIZE
#define FIO_HAVE_CGROUPS
+#define FIO_HAVE_FDATASYNC
+#define FIO_HAVE_FS_STAT
+
+#ifdef SYNC_FILE_RANGE_WAIT_BEFORE
+#define FIO_HAVE_SYNC_FILE_RANGE
+#endif
#define OS_MAP_ANON MAP_ANONYMOUS
return atoi(size);
}
+static inline unsigned long long get_fs_size(const char *path)
+{
+ unsigned long long ret;
+ struct statfs s;
+
+ if (statfs(path, &s) < 0)
+ return -1ULL;
+
+ ret = s.f_bsize;
+ ret *= (unsigned long long) s.f_bfree;
+ return ret;
+}
+
#endif