mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-11-17 01:51:00 +03:00
config: remove HAVE_BLK_QUEUE_SECDISCARD
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
30a2907ce9
commit
d69bb93c9f
@ -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 <linux/blkdev.h>
|
||||
],[
|
||||
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], [
|
||||
@ -208,20 +197,11 @@ AC_DEFUN([ZFS_AC_KERNEL_BLK_QUEUE_SECURE_ERASE], [
|
||||
AC_MSG_RESULT(yes)
|
||||
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])
|
||||
])
|
||||
])
|
||||
])
|
||||
])
|
||||
|
||||
dnl #
|
||||
dnl # 4.16 API change,
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user