diff options
author | Brian Behlendorf <[email protected]> | 2011-02-22 12:15:13 -0800 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2011-02-23 12:29:38 -0800 |
commit | 61e909608d15dc6900a710a0ceab6e101a68ac5a (patch) | |
tree | 0786db6d6de1bd8d2fe39f7c2039007b72203351 /include/sys/vdev_disk.h | |
parent | 075cf6cb72a460d884c29085413c3ea16a62d32d (diff) |
Linux 2.6.x compat, blkdev_compat.h
For legacy reasons the zvol.c and vdev_disk.c Linux compatibility
code ended up in sys/blkdev.h and sys/vdev_disk.h headers. While
there are worse places for this code to live it should be in a
linux/blkdev_compat.h header. This change moves this block device
Linux compatibility code in to the linux/blkdev_compat.h header
and updates all the correct #include locations. This is not a
functional change or bug fix, it is just code cleanup.
Diffstat (limited to 'include/sys/vdev_disk.h')
-rw-r--r-- | include/sys/vdev_disk.h | 50 |
1 files changed, 1 insertions, 49 deletions
diff --git a/include/sys/vdev_disk.h b/include/sys/vdev_disk.h index 03e7048ac..daefed718 100644 --- a/include/sys/vdev_disk.h +++ b/include/sys/vdev_disk.h @@ -28,15 +28,8 @@ #ifndef _SYS_VDEV_DISK_H #define _SYS_VDEV_DISK_H -#ifdef __cplusplus -extern "C" { -#endif - #ifdef _KERNEL #include <sys/vdev.h> -#include <sys/ddi.h> -#include <sys/sunldi.h> -#include <sys/sunddi.h> typedef struct vdev_disk { ddi_devid_t vd_devid; @@ -48,46 +41,5 @@ extern int vdev_disk_physio(struct block_device *, caddr_t, size_t, uint64_t, int); extern int vdev_disk_read_rootlabel(char *, char *, nvlist_t **); -/* 2.6.24 API change */ -#ifdef HAVE_2ARGS_BIO_END_IO_T -# define BIO_END_IO_PROTO(fn, x, y, z) static void fn(struct bio *x, int z) -# define BIO_END_IO_RETURN(rc) return -#else -# define BIO_END_IO_PROTO(fn, x, y, z) static int fn(struct bio *x, \ - unsigned int y, int z) -# define BIO_END_IO_RETURN(rc) return rc -#endif /* HAVE_2ARGS_BIO_END_IO_T */ - -/* 2.6.28 API change */ -#ifdef HAVE_OPEN_BDEV_EXCLUSIVE -# define vdev_bdev_open(path, md, hld) open_bdev_exclusive(path, md, hld) -# define vdev_bdev_close(bdev, md) close_bdev_exclusive(bdev, md) -#else -# define vdev_bdev_open(path, md, hld) open_bdev_excl(path, md, hld) -# define vdev_bdev_close(bdev, md) close_bdev_excl(bdev) -#endif /* HAVE_OPEN_BDEV_EXCLUSIVE */ - -/* 2.6.22 API change */ -#ifdef HAVE_1ARG_INVALIDATE_BDEV -# define vdev_bdev_invalidate(bdev) invalidate_bdev(bdev) -#else -# define vdev_bdev_invalidate(bdev) invalidate_bdev(bdev, 1) -#endif /* HAVE_1ARG_INVALIDATE_BDEV */ - -/* 2.6.30 API change */ -#ifdef HAVE_BDEV_LOGICAL_BLOCK_SIZE -# define vdev_bdev_block_size(bdev) bdev_logical_block_size(bdev) -#else -# define vdev_bdev_block_size(bdev) bdev_hardsect_size(bdev) -#endif - -/* Default Linux IO Scheduler */ -#define VDEV_SCHEDULER "noop" - #endif /* _KERNEL */ - -#ifdef __cplusplus -} -#endif - -#endif /* _SYS_VDEV_DISK_H */ +#endif /* _SYS_VDEV_DISK_H */ |