X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=os%2Fos-solaris.h;h=3e82543695de88d94797b0640030418368382e1a;hp=c49ce8d99abdd21f611c11ec5c90952314cd1c05;hb=9b8365618309572d8fd2579c8ea3132db89f843f;hpb=515d18304324c2e11f40742c394c90799913fa67 diff --git a/os/os-solaris.h b/os/os-solaris.h index c49ce8d9..3e825436 100644 --- a/os/os-solaris.h +++ b/os/os-solaris.h @@ -2,16 +2,21 @@ #define FIO_OS_SOLARIS_H #include +#include #include #include #include +#include "../file.h" + #define FIO_HAVE_POSIXAIO #define FIO_HAVE_SOLARISAIO #define FIO_HAVE_FALLOCATE #define FIO_HAVE_POSIXAIO_FSYNC #define FIO_HAVE_CPU_AFFINITY #define FIO_HAVE_PSHARED_MUTEX +#define FIO_USE_GENERIC_BDEV_SIZE +#define FIO_HAVE_FDATASYNC #define OS_MAP_ANON MAP_ANON #define OS_RAND_MAX 2147483648UL @@ -23,21 +28,7 @@ struct solaris_rand_seed { typedef psetid_t os_cpu_mask_t; typedef struct solaris_rand_seed os_random_state_t; -/* - * FIXME - */ -static inline int blockdev_size(int fd, unsigned long long *bytes) -{ - off_t end = lseek(fd, 0, SEEK_END); - - if (end < 0) - return errno; - - *bytes = end; - return 0; -} - -static inline int blockdev_invalidate_cache(int fd) +static inline int blockdev_invalidate_cache(struct fio_file *f) { return EINVAL; } @@ -111,4 +102,8 @@ static inline int fio_cpuset_exit(os_cpu_mask_t *mask) */ #define FIO_MAX_CPUS 16384 +#ifdef MADV_FREE +#define FIO_MADV_FREE MADV_FREE +#endif + #endif