X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=os%2Fos-linux.h;h=70c993b5de61d449051cfff989482a728cdfd2ad;hp=f7154a4af2c16e32ea9e51989f22e4e7af9a8d21;hb=9b8365618309572d8fd2579c8ea3132db89f843f;hpb=a5f3027cb0495dfe217b2626d248fcc054e7e878 diff --git a/os/os-linux.h b/os/os-linux.h index f7154a4a..70c993b5 100644 --- a/os/os-linux.h +++ b/os/os-linux.h @@ -14,6 +14,8 @@ #include #include "indirect.h" +#include "binject.h" +#include "../file.h" #define FIO_HAVE_LIBAIO #define FIO_HAVE_POSIXAIO @@ -37,6 +39,8 @@ #define FIO_HAVE_FDATASYNC #define FIO_HAVE_FS_STAT #define FIO_HAVE_TRIM +#define FIO_HAVE_BINJECT +#define FIO_HAVE_CLOCK_MONOTONIC #ifdef SYNC_FILE_RANGE_WAIT_BEFORE #define FIO_HAVE_SYNC_FILE_RANGE @@ -190,14 +194,14 @@ enum { #define BLKDISCARD _IO(0x12,119) #endif -static inline int blockdev_invalidate_cache(int fd) +static inline int blockdev_invalidate_cache(struct fio_file *f) { - return ioctl(fd, BLKFLSBUF); + return ioctl(f->fd, BLKFLSBUF); } -static inline int blockdev_size(int fd, unsigned long long *bytes) +static inline int blockdev_size(struct fio_file *f, unsigned long long *bytes) { - if (!ioctl(fd, BLKGETSIZE64, bytes)) + if (!ioctl(f->fd, BLKGETSIZE64, bytes)) return 0; return errno;