summaryrefslogtreecommitdiff
path: root/os/os-solaris.h
diff options
context:
space:
mode:
authorJens Axboe <jens.axboe@oracle.com>2009-09-22 17:12:29 +0200
committerJens Axboe <jens.axboe@oracle.com>2009-09-22 17:12:29 +0200
commit792d551747e83601121afce033a66f357c9fc439 (patch)
tree768ad2fd76eb87f3661929a3aa27188ad586a5eb /os/os-solaris.h
parent783500ad13ededece6c8912af1c937f990880e1f (diff)
downloadfio-792d551747e83601121afce033a66f357c9fc439.tar.gz
fio-792d551747e83601121afce033a66f357c9fc439.tar.bz2
Add generic bdev_size function
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'os/os-solaris.h')
-rw-r--r--os/os-solaris.h12
1 files changed, 1 insertions, 11 deletions
diff --git a/os/os-solaris.h b/os/os-solaris.h
index 5029d38f..ff8d6f25 100644
--- a/os/os-solaris.h
+++ b/os/os-solaris.h
@@ -12,6 +12,7 @@
#define FIO_HAVE_POSIXAIO_FSYNC
#define FIO_HAVE_CPU_AFFINITY
#define FIO_HAVE_PSHARED_MUTEX
+#define FIO_USE_GENERIC_BDEV_SIZE
#define OS_MAP_ANON MAP_ANON
#define OS_RAND_MAX 2147483648UL
@@ -23,17 +24,6 @@ struct solaris_rand_seed {
typedef psetid_t os_cpu_mask_t;
typedef struct solaris_rand_seed os_random_state_t;
-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)
{
return EINVAL;