X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=os%2Fos-linux.h;h=aab74e581e5fc4cb76fa1eb00739ae1c145c9bb4;hp=20f2a94ef4d06783aa006e202a37644ce64f7a1e;hb=ecc314ba;hpb=03e20d687566753b90383571e5e152c5142bdffd diff --git a/os/os-linux.h b/os/os-linux.h index 20f2a94e..aab74e58 100644 --- a/os/os-linux.h +++ b/os/os-linux.h @@ -39,6 +39,7 @@ #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 @@ -192,14 +193,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 *fd) { - 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;