From d30056887e2b9a0c7f569f4706872803c23fc3ad Mon Sep 17 00:00:00 2001 From: Rob Norris Date: Sat, 24 Aug 2024 21:45:25 +1000 Subject: [PATCH] config: remove HAVE_GENERIC_IO_ACCT_3ARG 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-generic_io_acct.m4 | 29 ------------------- include/os/linux/kernel/linux/blkdev_compat.h | 6 ---- 2 files changed, 35 deletions(-) diff --git a/config/kernel-generic_io_acct.m4 b/config/kernel-generic_io_acct.m4 index a6a109004..da92aad05 100644 --- a/config/kernel-generic_io_acct.m4 +++ b/config/kernel-generic_io_acct.m4 @@ -49,18 +49,6 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_GENERIC_IO_ACCT], [ bio_end_io_acct(bio, start_time); ]) - ZFS_LINUX_TEST_SRC([generic_acct_3args], [ - #include - - void (*generic_start_io_acct_f)(int, unsigned long, - struct hd_struct *) = &generic_start_io_acct; - void (*generic_end_io_acct_f)(int, struct hd_struct *, - unsigned long) = &generic_end_io_acct; - ], [ - generic_start_io_acct(0, 0, NULL); - generic_end_io_acct(0, NULL, 0); - ]) - ZFS_LINUX_TEST_SRC([generic_acct_4args], [ #include @@ -138,23 +126,6 @@ AC_DEFUN([ZFS_AC_KERNEL_GENERIC_IO_ACCT], [ [generic_*_io_acct() 4 arg available]) ], [ AC_MSG_RESULT(no) - - dnl # - dnl # 3.19 API addition - dnl # - dnl # torvalds/linux@394ffa50 allows us to increment - dnl # iostat counters without generic_make_request(). - dnl # - AC_MSG_CHECKING( - [whether generic_*_io_acct wants 3 args]) - ZFS_LINUX_TEST_RESULT_SYMBOL([generic_acct_3args], - [generic_start_io_acct], [block/bio.c], [ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_GENERIC_IO_ACCT_3ARG, 1, - [generic_*_io_acct() 3 arg available]) - ], [ - AC_MSG_RESULT(no) - ]) ]) ]) ]) diff --git a/include/os/linux/kernel/linux/blkdev_compat.h b/include/os/linux/kernel/linux/blkdev_compat.h index 23c2e0e94..672f9b00c 100644 --- a/include/os/linux/kernel/linux/blkdev_compat.h +++ b/include/os/linux/kernel/linux/blkdev_compat.h @@ -466,10 +466,6 @@ blk_generic_start_io_acct(struct request_queue *q __attribute__((unused)), return (disk_start_io_acct(disk, bio_sectors(bio), bio_op(bio))); #elif defined(HAVE_BIO_IO_ACCT) return (bio_start_io_acct(bio)); -#elif defined(HAVE_GENERIC_IO_ACCT_3ARG) - unsigned long start_time = jiffies; - generic_start_io_acct(rw, bio_sectors(bio), &disk->part0); - return (start_time); #elif defined(HAVE_GENERIC_IO_ACCT_4ARG) unsigned long start_time = jiffies; generic_start_io_acct(q, rw, bio_sectors(bio), &disk->part0); @@ -494,8 +490,6 @@ blk_generic_end_io_acct(struct request_queue *q __attribute__((unused)), disk_end_io_acct(disk, bio_op(bio), start_time); #elif defined(HAVE_BIO_IO_ACCT) bio_end_io_acct(bio, start_time); -#elif defined(HAVE_GENERIC_IO_ACCT_3ARG) - generic_end_io_acct(rw, &disk->part0, start_time); #elif defined(HAVE_GENERIC_IO_ACCT_4ARG) generic_end_io_acct(q, rw, &disk->part0, start_time); #endif