mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-11-17 01:51:00 +03:00
config: remove HAVE_BIO_BVEC_ITER
Sponsored-by: https://despairlabs.com/sponsor/ Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Tony Hutter <hutter2@llnl.gov> Reviewed-by: Tino Reichardt <milky-zfs@mcmilk.de> Signed-off-by: Rob Norris <robn@despairlabs.com> Closes #16479
This commit is contained in:
parent
233bed67a8
commit
609559e5b9
@ -262,30 +262,6 @@ AC_DEFUN([ZFS_AC_KERNEL_BIO_BI_STATUS], [
|
||||
])
|
||||
])
|
||||
|
||||
dnl #
|
||||
dnl # 3.14 API change,
|
||||
dnl # Immutable biovecs. A number of fields of struct bio are moved to
|
||||
dnl # struct bvec_iter.
|
||||
dnl #
|
||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_BIO_BVEC_ITER], [
|
||||
ZFS_LINUX_TEST_SRC([bio_bvec_iter], [
|
||||
#include <linux/bio.h>
|
||||
],[
|
||||
struct bio bio;
|
||||
bio.bi_iter.bi_sector = 0;
|
||||
])
|
||||
])
|
||||
|
||||
AC_DEFUN([ZFS_AC_KERNEL_BIO_BVEC_ITER], [
|
||||
AC_MSG_CHECKING([whether bio has bi_iter])
|
||||
ZFS_LINUX_TEST_RESULT([bio_bvec_iter], [
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_BIO_BVEC_ITER, 1, [bio has bi_iter])
|
||||
],[
|
||||
AC_MSG_RESULT(no)
|
||||
])
|
||||
])
|
||||
|
||||
dnl #
|
||||
dnl # 4.8 API change
|
||||
dnl # The rw argument has been removed from submit_bio/submit_bio_wait.
|
||||
@ -488,7 +464,6 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_BIO], [
|
||||
ZFS_AC_KERNEL_SRC_BIO_OPS
|
||||
ZFS_AC_KERNEL_SRC_BIO_SET_DEV
|
||||
ZFS_AC_KERNEL_SRC_BIO_BI_STATUS
|
||||
ZFS_AC_KERNEL_SRC_BIO_BVEC_ITER
|
||||
ZFS_AC_KERNEL_SRC_BIO_SUBMIT_BIO
|
||||
ZFS_AC_KERNEL_SRC_BIO_CURRENT_BIO_LIST
|
||||
ZFS_AC_KERNEL_SRC_BLKG_TRYGET
|
||||
@ -513,7 +488,6 @@ AC_DEFUN([ZFS_AC_KERNEL_BIO], [
|
||||
|
||||
ZFS_AC_KERNEL_BIO_SET_DEV
|
||||
ZFS_AC_KERNEL_BIO_BI_STATUS
|
||||
ZFS_AC_KERNEL_BIO_BVEC_ITER
|
||||
ZFS_AC_KERNEL_BIO_SUBMIT_BIO
|
||||
ZFS_AC_KERNEL_BIO_CURRENT_BIO_LIST
|
||||
ZFS_AC_KERNEL_BLKG_TRYGET
|
||||
|
@ -143,7 +143,6 @@ blk_queue_set_read_ahead(struct request_queue *q, unsigned long ra_pages)
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef HAVE_BIO_BVEC_ITER
|
||||
#define BIO_BI_SECTOR(bio) (bio)->bi_iter.bi_sector
|
||||
#define BIO_BI_SIZE(bio) (bio)->bi_iter.bi_size
|
||||
#define BIO_BI_IDX(bio) (bio)->bi_iter.bi_idx
|
||||
@ -151,15 +150,6 @@ blk_queue_set_read_ahead(struct request_queue *q, unsigned long ra_pages)
|
||||
#define bio_for_each_segment4(bv, bvp, b, i) \
|
||||
bio_for_each_segment((bv), (b), (i))
|
||||
typedef struct bvec_iter bvec_iterator_t;
|
||||
#else
|
||||
#define BIO_BI_SECTOR(bio) (bio)->bi_sector
|
||||
#define BIO_BI_SIZE(bio) (bio)->bi_size
|
||||
#define BIO_BI_IDX(bio) (bio)->bi_idx
|
||||
#define BIO_BI_SKIP(bio) (0)
|
||||
#define bio_for_each_segment4(bv, bvp, b, i) \
|
||||
bio_for_each_segment((bvp), (b), (i))
|
||||
typedef int bvec_iterator_t;
|
||||
#endif
|
||||
|
||||
static inline void
|
||||
bio_set_flags_failfast(struct block_device *bdev, int *flags, bool dev,
|
||||
|
Loading…
Reference in New Issue
Block a user