From d69bb93c9f54c12c75ef294774b0fd5d3ab72eef Mon Sep 17 00:00:00 2001 From: Rob Norris Date: Sun, 18 Aug 2024 11:41:00 +1000 Subject: [PATCH] config: remove HAVE_BLK_QUEUE_SECDISCARD 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-blk-queue.m4 | 22 +------------------ include/os/linux/kernel/linux/blkdev_compat.h | 5 ----- 2 files changed, 1 insertion(+), 26 deletions(-) diff --git a/config/kernel-blk-queue.m4 b/config/kernel-blk-queue.m4 index f5fb8f664..04919fa88 100644 --- a/config/kernel-blk-queue.m4 +++ b/config/kernel-blk-queue.m4 @@ -161,7 +161,6 @@ AC_DEFUN([ZFS_AC_KERNEL_BLK_QUEUE_DISCARD], [ dnl # dnl # 5.19: bdev_max_secure_erase_sectors() available dnl # 4.8: blk_queue_secure_erase() available -dnl # 2.6.36: blk_queue_secdiscard() available dnl # AC_DEFUN([ZFS_AC_KERNEL_SRC_BLK_QUEUE_SECURE_ERASE], [ ZFS_LINUX_TEST_SRC([bdev_max_secure_erase_sectors], [ @@ -182,16 +181,6 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_BLK_QUEUE_SECURE_ERASE], [ memset(q, 0, sizeof(r)); value = blk_queue_secure_erase(q); ],[-Wframe-larger-than=8192]) - - ZFS_LINUX_TEST_SRC([blk_queue_secdiscard], [ - #include - ],[ - struct request_queue r; - struct request_queue *q = &r; - int value __attribute__ ((unused)); - memset(q, 0, sizeof(r)); - value = blk_queue_secdiscard(q); - ]) ]) AC_DEFUN([ZFS_AC_KERNEL_BLK_QUEUE_SECURE_ERASE], [ @@ -209,16 +198,7 @@ AC_DEFUN([ZFS_AC_KERNEL_BLK_QUEUE_SECURE_ERASE], [ AC_DEFINE(HAVE_BLK_QUEUE_SECURE_ERASE, 1, [blk_queue_secure_erase() is available]) ],[ - AC_MSG_RESULT(no) - - AC_MSG_CHECKING([whether blk_queue_secdiscard() is available]) - ZFS_LINUX_TEST_RESULT([blk_queue_secdiscard], [ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_BLK_QUEUE_SECDISCARD, 1, - [blk_queue_secdiscard() is available]) - ],[ - ZFS_LINUX_TEST_ERROR([blk_queue_secure_erase]) - ]) + ZFS_LINUX_TEST_ERROR([blk_queue_secure_erase]) ]) ]) ]) diff --git a/include/os/linux/kernel/linux/blkdev_compat.h b/include/os/linux/kernel/linux/blkdev_compat.h index e17f80bd2..51e478b66 100644 --- a/include/os/linux/kernel/linux/blkdev_compat.h +++ b/include/os/linux/kernel/linux/blkdev_compat.h @@ -501,9 +501,6 @@ bdev_discard_supported(struct block_device *bdev) * * 4.8 API, * blk_queue_secure_erase() - * - * 2.6.36 - 4.7 API, - * blk_queue_secdiscard() */ static inline boolean_t bdev_secure_discard_supported(struct block_device *bdev) @@ -512,8 +509,6 @@ bdev_secure_discard_supported(struct block_device *bdev) return (!!bdev_max_secure_erase_sectors(bdev)); #elif defined(HAVE_BLK_QUEUE_SECURE_ERASE) return (!!blk_queue_secure_erase(bdev_get_queue(bdev))); -#elif defined(HAVE_BLK_QUEUE_SECDISCARD) - return (!!blk_queue_secdiscard(bdev_get_queue(bdev))); #else #error "Unsupported kernel" #endif