@@ -50,6 +50,13 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_MAKE_REQUEST_FN], [
50
50
disk = blk_alloc_disk(NUMA_NO_NODE);
51
51
] )
52
52
53
+ ZFS_LINUX_TEST_SRC([ blk_alloc_disk_2args] , [
54
+ #include <linux/blkdev.h>
55
+ ] ,[
56
+ struct gendisk *disk __attribute__ ((unused));
57
+ disk = blk_alloc_disk(NULL, NUMA_NO_NODE);
58
+ ] )
59
+
53
60
ZFS_LINUX_TEST_SRC([ blk_cleanup_disk] , [
54
61
#include <linux/blkdev.h>
55
62
] ,[
@@ -71,30 +78,45 @@ AC_DEFUN([ZFS_AC_KERNEL_MAKE_REQUEST_FN], [
71
78
AC_DEFINE ( HAVE_SUBMIT_BIO_IN_BLOCK_DEVICE_OPERATIONS , 1 ,
72
79
[ submit_bio is member of struct block_device_operations] )
73
80
81
+ dnl
82
+ dnl # Linux 6.9 API change
83
+ dnl # blk_alloc_disk() takes 2 arguments:
84
+ dnl # a queue limit and NUMA node ID.
74
85
dnl #
75
- dnl # Linux 5.14 API Change:
76
- dnl # blk_alloc_queue() + alloc_disk() combo replaced by
77
- dnl # a single call to blk_alloc_disk().
78
- dnl #
79
- AC_MSG_CHECKING ( [ whether blk_alloc_disk() exists] )
80
- ZFS_LINUX_TEST_RESULT([ blk_alloc_disk] , [
86
+ AC_MSG_CHECKING ( [ whether blk_alloc_disk() takes 2 args] )
87
+ ZFS_LINUX_TEST_RESULT([ blk_alloc_disk_2args] , [
81
88
AC_MSG_RESULT ( yes )
82
89
AC_DEFINE ( [ HAVE_BLK_ALLOC_DISK] , 1 , [ blk_alloc_disk() exists] )
90
+ AC_DEFINE ( [ HAVE_BLK_ALLOC_DISK_2ARGS] , 1 , [ blk_alloc_disk() takes 2 args] )
91
+ dnl # put_disk() should be used in 6.9.
92
+ ] , [
93
+ AC_MSG_RESULT ( no )
83
94
84
95
dnl #
85
- dnl # 5.20 API change,
86
- dnl # Removed blk_cleanup_disk(), put_disk() should be used.
96
+ dnl # Linux 5.14 API Change:
97
+ dnl # blk_alloc_queue() + alloc_disk() combo replaced by
98
+ dnl # a single call to blk_alloc_disk().
87
99
dnl #
88
- AC_MSG_CHECKING ( [ whether blk_cleanup_disk () exists] )
89
- ZFS_LINUX_TEST_RESULT([ blk_cleanup_disk ] , [
100
+ AC_MSG_CHECKING ( [ whether blk_alloc_disk () exists] )
101
+ ZFS_LINUX_TEST_RESULT([ blk_alloc_disk ] , [
90
102
AC_MSG_RESULT ( yes )
91
- AC_DEFINE ( [ HAVE_BLK_CLEANUP_DISK] , 1 ,
92
- [ blk_cleanup_disk() exists] )
103
+ AC_DEFINE ( [ HAVE_BLK_ALLOC_DISK] , 1 , [ blk_alloc_disk() exists] )
104
+
105
+ dnl #
106
+ dnl # 5.20 API change,
107
+ dnl # Removed blk_cleanup_disk(), put_disk() should be used.
108
+ dnl #
109
+ AC_MSG_CHECKING ( [ whether blk_cleanup_disk() exists] )
110
+ ZFS_LINUX_TEST_RESULT([ blk_cleanup_disk] , [
111
+ AC_MSG_RESULT ( yes )
112
+ AC_DEFINE ( [ HAVE_BLK_CLEANUP_DISK] , 1 ,
113
+ [ blk_cleanup_disk() exists] )
114
+ ] , [
115
+ AC_MSG_RESULT ( no )
116
+ ] )
93
117
] , [
94
118
AC_MSG_RESULT ( no )
95
119
] )
96
- ] , [
97
- AC_MSG_RESULT ( no )
98
120
] )
99
121
] ,[
100
122
AC_MSG_RESULT ( no )
0 commit comments