From 2c3e42b252f01bde9650dc690811401933189a56 Mon Sep 17 00:00:00 2001 From: Rob Norris Date: Sat, 3 Aug 2024 12:52:05 +1000 Subject: [PATCH] config: remove HAVE_BIO_BVEC_ITER Sponsored-by: https://despairlabs.com/sponsor/ Reviewed-by: Brian Behlendorf Reviewed-by: Tony Hutter Reviewed-by: Tino Reichardt Signed-off-by: Rob Norris Closes #16479 --- config/kernel-bio.m4 | 26 ------------------- include/os/linux/kernel/linux/blkdev_compat.h | 10 ------- 2 files changed, 36 deletions(-) diff --git a/config/kernel-bio.m4 b/config/kernel-bio.m4 index 9dddf0d3d..c53bb0d09 100644 --- a/config/kernel-bio.m4 +++ b/config/kernel-bio.m4 @@ -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 - ],[ - 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 diff --git a/include/os/linux/kernel/linux/blkdev_compat.h b/include/os/linux/kernel/linux/blkdev_compat.h index 311353c12..891ff4403 100644 --- a/include/os/linux/kernel/linux/blkdev_compat.h +++ b/include/os/linux/kernel/linux/blkdev_compat.h @@ -116,7 +116,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 @@ -124,15 +123,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,