CI: Move perl script to dist_noinst_DATA
[zfs.git] / config / kernel-blkdev.m4
blobe04a2bd2c3b64444c7b4b08ab31cb7e8e4a61635
1 dnl #
2 dnl # 2.6.38 API change,
3 dnl # Added blkdev_get_by_path()
4 dnl #
5 AC_DEFUN([ZFS_AC_KERNEL_SRC_BLKDEV_GET_BY_PATH], [
6         ZFS_LINUX_TEST_SRC([blkdev_get_by_path], [
7                 #include <linux/fs.h>
8                 #include <linux/blkdev.h>
9         ], [
10                 struct block_device *bdev __attribute__ ((unused)) = NULL;
11                 const char *path = "path";
12                 fmode_t mode = 0;
13                 void *holder = NULL;
15                 bdev = blkdev_get_by_path(path, mode, holder);
16         ])
19 dnl #
20 dnl # 6.5.x API change,
21 dnl # blkdev_get_by_path() takes 4 args
22 dnl #
23 AC_DEFUN([ZFS_AC_KERNEL_SRC_BLKDEV_GET_BY_PATH_4ARG], [
24         ZFS_LINUX_TEST_SRC([blkdev_get_by_path_4arg], [
25                 #include <linux/fs.h>
26                 #include <linux/blkdev.h>
27         ], [
28                 struct block_device *bdev __attribute__ ((unused)) = NULL;
29                 const char *path = "path";
30                 fmode_t mode = 0;
31                 void *holder = NULL;
32                 struct blk_holder_ops h;
34                 bdev = blkdev_get_by_path(path, mode, holder, &h);
35         ])
38 AC_DEFUN([ZFS_AC_KERNEL_BLKDEV_GET_BY_PATH], [
39         AC_MSG_CHECKING([whether blkdev_get_by_path() exists and takes 3 args])
40         ZFS_LINUX_TEST_RESULT([blkdev_get_by_path], [
41                 AC_MSG_RESULT(yes)
42         ], [
43                 AC_MSG_RESULT(no)
44                 AC_MSG_CHECKING([whether blkdev_get_by_path() exists and takes 4 args])
45                 ZFS_LINUX_TEST_RESULT([blkdev_get_by_path_4arg], [
46                         AC_DEFINE(HAVE_BLKDEV_GET_BY_PATH_4ARG, 1,
47                                 [blkdev_get_by_path() exists and takes 4 args])
48                         AC_MSG_RESULT(yes)
49                 ], [
50                         ZFS_LINUX_TEST_ERROR([blkdev_get_by_path()])
51                 ])
52         ])
55 dnl #
56 dnl # 6.5.x API change
57 dnl # blk_mode_t was added as a type to supercede some places where fmode_t
58 dnl # is used
59 dnl #
60 AC_DEFUN([ZFS_AC_KERNEL_SRC_BLKDEV_BLK_MODE_T], [
61         ZFS_LINUX_TEST_SRC([blk_mode_t], [
62                 #include <linux/fs.h>
63                 #include <linux/blkdev.h>
64         ], [
65                 blk_mode_t m __attribute((unused)) = (blk_mode_t)0;
66         ])
69 AC_DEFUN([ZFS_AC_KERNEL_BLKDEV_BLK_MODE_T], [
70         AC_MSG_CHECKING([whether blk_mode_t is defined])
71         ZFS_LINUX_TEST_RESULT([blk_mode_t], [
72                 AC_MSG_RESULT(yes)
73                 AC_DEFINE(HAVE_BLK_MODE_T, 1, [blk_mode_t is defined])
74         ], [
75                 AC_MSG_RESULT(no)
76         ])
79 dnl #
80 dnl # 2.6.38 API change,
81 dnl # Added blkdev_put()
82 dnl #
83 AC_DEFUN([ZFS_AC_KERNEL_SRC_BLKDEV_PUT], [
84         ZFS_LINUX_TEST_SRC([blkdev_put], [
85                 #include <linux/fs.h>
86                 #include <linux/blkdev.h>
87         ], [
88                 struct block_device *bdev = NULL;
89                 fmode_t mode = 0;
91                 blkdev_put(bdev, mode);
92         ])
95 dnl #
96 dnl # 6.5.x API change.
97 dnl # blkdev_put() takes (void* holder) as arg 2
98 dnl #
99 AC_DEFUN([ZFS_AC_KERNEL_SRC_BLKDEV_PUT_HOLDER], [
100         ZFS_LINUX_TEST_SRC([blkdev_put_holder], [
101                 #include <linux/fs.h>
102                 #include <linux/blkdev.h>
103         ], [
104                 struct block_device *bdev = NULL;
105                 void *holder = NULL;
107                 blkdev_put(bdev, holder);
108         ])
111 AC_DEFUN([ZFS_AC_KERNEL_BLKDEV_PUT], [
112         AC_MSG_CHECKING([whether blkdev_put() exists])
113         ZFS_LINUX_TEST_RESULT([blkdev_put], [
114                 AC_MSG_RESULT(yes)
115         ], [
116                 AC_MSG_CHECKING([whether blkdev_put() accepts void* as arg 2])
117                 ZFS_LINUX_TEST_RESULT([blkdev_put_holder], [
118                         AC_MSG_RESULT(yes)
119                         AC_DEFINE(HAVE_BLKDEV_PUT_HOLDER, 1,
120                                 [blkdev_put() accepts void* as arg 2])
121                 ], [
122                         ZFS_LINUX_TEST_ERROR([blkdev_put()])
123                 ])
124         ])
127 dnl #
128 dnl # 4.1 API, exported blkdev_reread_part() symbol, back ported to the
129 dnl # 3.10.0 CentOS 7.x enterprise kernels.
130 dnl #
131 AC_DEFUN([ZFS_AC_KERNEL_SRC_BLKDEV_REREAD_PART], [
132         ZFS_LINUX_TEST_SRC([blkdev_reread_part], [
133                 #include <linux/fs.h>
134                 #include <linux/blkdev.h>
135         ], [
136                 struct block_device *bdev = NULL;
137                 int error;
139                 error = blkdev_reread_part(bdev);
140         ])
143 AC_DEFUN([ZFS_AC_KERNEL_BLKDEV_REREAD_PART], [
144         AC_MSG_CHECKING([whether blkdev_reread_part() exists])
145         ZFS_LINUX_TEST_RESULT([blkdev_reread_part], [
146                 AC_MSG_RESULT(yes)
147                 AC_DEFINE(HAVE_BLKDEV_REREAD_PART, 1,
148                     [blkdev_reread_part() exists])
149         ], [
150                 AC_MSG_RESULT(no)
151         ])
154 dnl #
155 dnl # check_disk_change() was removed in 5.10
156 dnl #
157 AC_DEFUN([ZFS_AC_KERNEL_SRC_BLKDEV_CHECK_DISK_CHANGE], [
158         ZFS_LINUX_TEST_SRC([check_disk_change], [
159                 #include <linux/fs.h>
160                 #include <linux/blkdev.h>
161         ], [
162                 struct block_device *bdev = NULL;
163                 bool error;
165                 error = check_disk_change(bdev);
166         ])
169 AC_DEFUN([ZFS_AC_KERNEL_BLKDEV_CHECK_DISK_CHANGE], [
170         AC_MSG_CHECKING([whether check_disk_change() exists])
171         ZFS_LINUX_TEST_RESULT([check_disk_change], [
172                 AC_MSG_RESULT(yes)
173                 AC_DEFINE(HAVE_CHECK_DISK_CHANGE, 1,
174                     [check_disk_change() exists])
175         ], [
176                 AC_MSG_RESULT(no)
177         ])
180 dnl #
181 dnl # 6.5.x API change
182 dnl # disk_check_media_change() was added
183 dnl #
184 AC_DEFUN([ZFS_AC_KERNEL_SRC_BLKDEV_DISK_CHECK_MEDIA_CHANGE], [
185         ZFS_LINUX_TEST_SRC([disk_check_media_change], [
186                 #include <linux/fs.h>
187                 #include <linux/blkdev.h>
188         ], [
189                 struct block_device *bdev = NULL;
190                 bool error;
192                 error = disk_check_media_change(bdev->bd_disk);
193         ])
196 AC_DEFUN([ZFS_AC_KERNEL_BLKDEV_DISK_CHECK_MEDIA_CHANGE], [
197         AC_MSG_CHECKING([whether disk_check_media_change() exists])
198         ZFS_LINUX_TEST_RESULT([disk_check_media_change], [
199                 AC_MSG_RESULT(yes)
200                 AC_DEFINE(HAVE_DISK_CHECK_MEDIA_CHANGE, 1,
201                     [disk_check_media_change() exists])
202         ], [
203                 AC_MSG_RESULT(no)
204         ])
207 dnl #
208 dnl # bdev_kobj() is introduced from 5.12
209 dnl #
210 AC_DEFUN([ZFS_AC_KERNEL_SRC_BLKDEV_BDEV_KOBJ], [
211         ZFS_LINUX_TEST_SRC([bdev_kobj], [
212                 #include <linux/fs.h>
213                 #include <linux/blkdev.h>
214                 #include <linux/kobject.h>
215         ], [
216                 struct block_device *bdev = NULL;
217                 struct kobject *disk_kobj;
218                 disk_kobj = bdev_kobj(bdev);
219         ])
222 AC_DEFUN([ZFS_AC_KERNEL_BLKDEV_BDEV_KOBJ], [
223         AC_MSG_CHECKING([whether bdev_kobj() exists])
224         ZFS_LINUX_TEST_RESULT([bdev_kobj], [
225                 AC_MSG_RESULT(yes)
226                 AC_DEFINE(HAVE_BDEV_KOBJ, 1,
227                     [bdev_kobj() exists])
228         ], [
229                 AC_MSG_RESULT(no)
230         ])
233 dnl #
234 dnl # part_to_dev() was removed in 5.12
235 dnl #
236 AC_DEFUN([ZFS_AC_KERNEL_SRC_BLKDEV_PART_TO_DEV], [
237         ZFS_LINUX_TEST_SRC([part_to_dev], [
238                 #include <linux/fs.h>
239                 #include <linux/blkdev.h>
240         ], [
241                 struct hd_struct *p = NULL;
242                 struct device *pdev;
243                 pdev = part_to_dev(p);
244         ])
247 AC_DEFUN([ZFS_AC_KERNEL_BLKDEV_PART_TO_DEV], [
248         AC_MSG_CHECKING([whether part_to_dev() exists])
249         ZFS_LINUX_TEST_RESULT([part_to_dev], [
250                 AC_MSG_RESULT(yes)
251                 AC_DEFINE(HAVE_PART_TO_DEV, 1,
252                     [part_to_dev() exists])
253         ], [
254                 AC_MSG_RESULT(no)
255         ])
258 dnl #
259 dnl # 5.10 API, check_disk_change() is removed, in favor of
260 dnl # bdev_check_media_change(), which doesn't force revalidation
261 dnl #
262 AC_DEFUN([ZFS_AC_KERNEL_SRC_BLKDEV_BDEV_CHECK_MEDIA_CHANGE], [
263         ZFS_LINUX_TEST_SRC([bdev_check_media_change], [
264                 #include <linux/fs.h>
265                 #include <linux/blkdev.h>
266         ], [
267                 struct block_device *bdev = NULL;
268                 int error;
270                 error = bdev_check_media_change(bdev);
271         ])
274 AC_DEFUN([ZFS_AC_KERNEL_BLKDEV_BDEV_CHECK_MEDIA_CHANGE], [
275         AC_MSG_CHECKING([whether bdev_check_media_change() exists])
276         ZFS_LINUX_TEST_RESULT([bdev_check_media_change], [
277                 AC_MSG_RESULT(yes)
278                 AC_DEFINE(HAVE_BDEV_CHECK_MEDIA_CHANGE, 1,
279                     [bdev_check_media_change() exists])
280         ], [
281                 AC_MSG_RESULT(no)
282         ])
285 dnl #
286 dnl # 2.6.22 API change
287 dnl # Single argument invalidate_bdev()
288 dnl #
289 AC_DEFUN([ZFS_AC_KERNEL_SRC_BLKDEV_INVALIDATE_BDEV], [
290         ZFS_LINUX_TEST_SRC([invalidate_bdev], [
291                 #include <linux/buffer_head.h>
292                 #include <linux/blkdev.h>
293         ],[
294                 struct block_device *bdev = NULL;
295                 invalidate_bdev(bdev);
296         ])
299 AC_DEFUN([ZFS_AC_KERNEL_BLKDEV_INVALIDATE_BDEV], [
300         AC_MSG_CHECKING([whether invalidate_bdev() exists])
301         ZFS_LINUX_TEST_RESULT([invalidate_bdev], [
302                 AC_MSG_RESULT(yes)
303         ],[
304                 ZFS_LINUX_TEST_ERROR([invalidate_bdev()])
305         ])
308 dnl #
309 dnl # 5.11 API, lookup_bdev() takes dev_t argument.
310 dnl # 2.6.27 API, lookup_bdev() was first exported.
311 dnl # 4.4.0-6.21 API, lookup_bdev() on Ubuntu takes mode argument.
312 dnl #
313 AC_DEFUN([ZFS_AC_KERNEL_SRC_BLKDEV_LOOKUP_BDEV], [
314         ZFS_LINUX_TEST_SRC([lookup_bdev_devt], [
315                 #include <linux/blkdev.h>
316         ], [
317                 int error __attribute__ ((unused));
318                 const char path[] = "/example/path";
319                 dev_t dev;
321                 error = lookup_bdev(path, &dev);
322         ])
324         ZFS_LINUX_TEST_SRC([lookup_bdev_1arg], [
325                 #include <linux/fs.h>
326                 #include <linux/blkdev.h>
327         ], [
328                 struct block_device *bdev __attribute__ ((unused));
329                 const char path[] = "/example/path";
331                 bdev = lookup_bdev(path);
332         ])
334         ZFS_LINUX_TEST_SRC([lookup_bdev_mode], [
335                 #include <linux/fs.h>
336         ], [
337                 struct block_device *bdev __attribute__ ((unused));
338                 const char path[] = "/example/path";
340                 bdev = lookup_bdev(path, FMODE_READ);
341         ])
344 AC_DEFUN([ZFS_AC_KERNEL_BLKDEV_LOOKUP_BDEV], [
345         AC_MSG_CHECKING([whether lookup_bdev() wants dev_t arg])
346         ZFS_LINUX_TEST_RESULT_SYMBOL([lookup_bdev_devt],
347             [lookup_bdev], [fs/block_dev.c], [
348                 AC_MSG_RESULT(yes)
349                 AC_DEFINE(HAVE_DEVT_LOOKUP_BDEV, 1,
350                     [lookup_bdev() wants dev_t arg])
351         ], [
352                 AC_MSG_RESULT(no)
354                 AC_MSG_CHECKING([whether lookup_bdev() wants 1 arg])
355                 ZFS_LINUX_TEST_RESULT_SYMBOL([lookup_bdev_1arg],
356                     [lookup_bdev], [fs/block_dev.c], [
357                         AC_MSG_RESULT(yes)
358                         AC_DEFINE(HAVE_1ARG_LOOKUP_BDEV, 1,
359                             [lookup_bdev() wants 1 arg])
360                 ], [
361                         AC_MSG_RESULT(no)
363                         AC_MSG_CHECKING([whether lookup_bdev() wants mode arg])
364                         ZFS_LINUX_TEST_RESULT_SYMBOL([lookup_bdev_mode],
365                             [lookup_bdev], [fs/block_dev.c], [
366                                 AC_MSG_RESULT(yes)
367                                 AC_DEFINE(HAVE_MODE_LOOKUP_BDEV, 1,
368                                     [lookup_bdev() wants mode arg])
369                         ], [
370                                 ZFS_LINUX_TEST_ERROR([lookup_bdev()])
371                         ])
372                 ])
373         ])
376 dnl #
377 dnl # 2.6.30 API change
378 dnl #
379 dnl # The bdev_physical_block_size() interface was added to provide a way
380 dnl # to determine the smallest write which can be performed without a
381 dnl # read-modify-write operation.
382 dnl #
383 dnl # Unfortunately, this interface isn't entirely reliable because
384 dnl # drives are sometimes known to misreport this value.
385 dnl #
386 AC_DEFUN([ZFS_AC_KERNEL_SRC_BLKDEV_BDEV_PHYSICAL_BLOCK_SIZE], [
387         ZFS_LINUX_TEST_SRC([bdev_physical_block_size], [
388                 #include <linux/blkdev.h>
389         ],[
390                 struct block_device *bdev __attribute__ ((unused)) = NULL;
391                 bdev_physical_block_size(bdev);
392         ])
395 AC_DEFUN([ZFS_AC_KERNEL_BLKDEV_BDEV_PHYSICAL_BLOCK_SIZE], [
396         AC_MSG_CHECKING([whether bdev_physical_block_size() is available])
397         ZFS_LINUX_TEST_RESULT([bdev_physical_block_size], [
398                 AC_MSG_RESULT(yes)
399         ],[
400                 ZFS_LINUX_TEST_ERROR([bdev_physical_block_size()])
401         ])
404 dnl #
405 dnl # 2.6.30 API change
406 dnl # Added bdev_logical_block_size().
407 dnl #
408 AC_DEFUN([ZFS_AC_KERNEL_SRC_BLKDEV_BDEV_LOGICAL_BLOCK_SIZE], [
409         ZFS_LINUX_TEST_SRC([bdev_logical_block_size], [
410                 #include <linux/blkdev.h>
411         ],[
412                 struct block_device *bdev __attribute__ ((unused)) = NULL;
413                 bdev_logical_block_size(bdev);
414         ])
417 AC_DEFUN([ZFS_AC_KERNEL_BLKDEV_BDEV_LOGICAL_BLOCK_SIZE], [
418         AC_MSG_CHECKING([whether bdev_logical_block_size() is available])
419         ZFS_LINUX_TEST_RESULT([bdev_logical_block_size], [
420                 AC_MSG_RESULT(yes)
421         ],[
422                 ZFS_LINUX_TEST_ERROR([bdev_logical_block_size()])
423         ])
426 dnl #
427 dnl # 5.11 API change
428 dnl # Added bdev_whole() helper.
429 dnl #
430 AC_DEFUN([ZFS_AC_KERNEL_SRC_BLKDEV_BDEV_WHOLE], [
431         ZFS_LINUX_TEST_SRC([bdev_whole], [
432                 #include <linux/blkdev.h>
433         ],[
434                 struct block_device *bdev = NULL;
435                 bdev = bdev_whole(bdev);
436         ])
439 AC_DEFUN([ZFS_AC_KERNEL_BLKDEV_BDEV_WHOLE], [
440         AC_MSG_CHECKING([whether bdev_whole() is available])
441         ZFS_LINUX_TEST_RESULT([bdev_whole], [
442                 AC_MSG_RESULT(yes)
443                 AC_DEFINE(HAVE_BDEV_WHOLE, 1, [bdev_whole() is available])
444         ],[
445                 AC_MSG_RESULT(no)
446         ])
449 dnl #
450 dnl # 5.20 API change,
451 dnl # Removed bdevname(), snprintf(.., %pg) should be used.
452 dnl #
453 AC_DEFUN([ZFS_AC_KERNEL_SRC_BLKDEV_BDEVNAME], [
454         ZFS_LINUX_TEST_SRC([bdevname], [
455                 #include <linux/fs.h>
456                 #include <linux/blkdev.h>
457         ], [
458                 struct block_device *bdev __attribute__ ((unused)) = NULL;
459                 char path[BDEVNAME_SIZE];
461                 (void) bdevname(bdev, path);
462         ])
465 AC_DEFUN([ZFS_AC_KERNEL_BLKDEV_BDEVNAME], [
466         AC_MSG_CHECKING([whether bdevname() exists])
467         ZFS_LINUX_TEST_RESULT([bdevname], [
468                 AC_DEFINE(HAVE_BDEVNAME, 1, [bdevname() is available])
469                 AC_MSG_RESULT(yes)
470         ], [
471                 AC_MSG_RESULT(no)
472         ])
475 dnl #
476 dnl # 5.19 API: blkdev_issue_secure_erase()
477 dnl # 3.10 API: blkdev_issue_discard(..., BLKDEV_DISCARD_SECURE)
478 dnl #
479 AC_DEFUN([ZFS_AC_KERNEL_SRC_BLKDEV_ISSUE_SECURE_ERASE], [
480         ZFS_LINUX_TEST_SRC([blkdev_issue_secure_erase], [
481                 #include <linux/blkdev.h>
482         ],[
483                 struct block_device *bdev = NULL;
484                 sector_t sector = 0;
485                 sector_t nr_sects = 0;
486                 int error __attribute__ ((unused));
488                 error = blkdev_issue_secure_erase(bdev,
489                     sector, nr_sects, GFP_KERNEL);
490         ])
492         ZFS_LINUX_TEST_SRC([blkdev_issue_discard_flags], [
493                 #include <linux/blkdev.h>
494         ],[
495                 struct block_device *bdev = NULL;
496                 sector_t sector = 0;
497                 sector_t nr_sects = 0;
498                 unsigned long flags = 0;
499                 int error __attribute__ ((unused));
501                 error = blkdev_issue_discard(bdev,
502                     sector, nr_sects, GFP_KERNEL, flags);
503         ])
506 AC_DEFUN([ZFS_AC_KERNEL_BLKDEV_ISSUE_SECURE_ERASE], [
507         AC_MSG_CHECKING([whether blkdev_issue_secure_erase() is available])
508         ZFS_LINUX_TEST_RESULT([blkdev_issue_secure_erase], [
509                 AC_MSG_RESULT(yes)
510                 AC_DEFINE(HAVE_BLKDEV_ISSUE_SECURE_ERASE, 1,
511                     [blkdev_issue_secure_erase() is available])
512         ],[
513                 AC_MSG_RESULT(no)
515                 AC_MSG_CHECKING([whether blkdev_issue_discard() is available])
516                 ZFS_LINUX_TEST_RESULT([blkdev_issue_discard_flags], [
517                         AC_MSG_RESULT(yes)
518                         AC_DEFINE(HAVE_BLKDEV_ISSUE_DISCARD, 1,
519                             [blkdev_issue_discard() is available])
520                 ],[
521                         ZFS_LINUX_TEST_ERROR([blkdev_issue_discard()])
522                 ])
523         ])
526 dnl #
527 dnl # 5.13 API change
528 dnl # blkdev_get_by_path() no longer handles ERESTARTSYS
529 dnl #
530 dnl # Unfortunately we're forced to rely solely on the kernel version
531 dnl # number in order to determine the expected behavior.  This was an
532 dnl # internal change to blkdev_get_by_dev(), see commit a8ed1a0607.
533 dnl #
534 AC_DEFUN([ZFS_AC_KERNEL_BLKDEV_GET_ERESTARTSYS], [
535         AC_MSG_CHECKING([whether blkdev_get_by_path() handles ERESTARTSYS])
536         AS_VERSION_COMPARE([$LINUX_VERSION], [5.13.0], [
537                 AC_MSG_RESULT(yes)
538                 AC_DEFINE(HAVE_BLKDEV_GET_ERESTARTSYS, 1,
539                         [blkdev_get_by_path() handles ERESTARTSYS])
540         ],[
541                 AC_MSG_RESULT(no)
542         ],[
543                 AC_MSG_RESULT(no)
544         ])
547 dnl #
548 dnl # 6.5.x API change
549 dnl # BLK_STS_NEXUS replaced with BLK_STS_RESV_CONFLICT
550 dnl #
551 AC_DEFUN([ZFS_AC_KERNEL_SRC_BLKDEV_BLK_STS_RESV_CONFLICT], [
552         ZFS_LINUX_TEST_SRC([blk_sts_resv_conflict], [
553                 #include <linux/blkdev.h>
554         ],[
555                 blk_status_t s __attribute__ ((unused)) = BLK_STS_RESV_CONFLICT;
556         ])
559 AC_DEFUN([ZFS_AC_KERNEL_BLKDEV_BLK_STS_RESV_CONFLICT], [
560         AC_MSG_CHECKING([whether BLK_STS_RESV_CONFLICT is defined])
561                 ZFS_LINUX_TEST_RESULT([blk_sts_resv_conflict], [
562                         AC_DEFINE(HAVE_BLK_STS_RESV_CONFLICT, 1, [BLK_STS_RESV_CONFLICT is defined])
563                         AC_MSG_RESULT(yes)
564                 ], [
565                         AC_MSG_RESULT(no)
566                 ])
567         ])
570 AC_DEFUN([ZFS_AC_KERNEL_SRC_BLKDEV], [
571         ZFS_AC_KERNEL_SRC_BLKDEV_GET_BY_PATH
572         ZFS_AC_KERNEL_SRC_BLKDEV_GET_BY_PATH_4ARG
573         ZFS_AC_KERNEL_SRC_BLKDEV_PUT
574         ZFS_AC_KERNEL_SRC_BLKDEV_PUT_HOLDER
575         ZFS_AC_KERNEL_SRC_BLKDEV_REREAD_PART
576         ZFS_AC_KERNEL_SRC_BLKDEV_INVALIDATE_BDEV
577         ZFS_AC_KERNEL_SRC_BLKDEV_LOOKUP_BDEV
578         ZFS_AC_KERNEL_SRC_BLKDEV_BDEV_LOGICAL_BLOCK_SIZE
579         ZFS_AC_KERNEL_SRC_BLKDEV_BDEV_PHYSICAL_BLOCK_SIZE
580         ZFS_AC_KERNEL_SRC_BLKDEV_CHECK_DISK_CHANGE
581         ZFS_AC_KERNEL_SRC_BLKDEV_BDEV_CHECK_MEDIA_CHANGE
582         ZFS_AC_KERNEL_SRC_BLKDEV_BDEV_WHOLE
583         ZFS_AC_KERNEL_SRC_BLKDEV_BDEVNAME
584         ZFS_AC_KERNEL_SRC_BLKDEV_ISSUE_SECURE_ERASE
585         ZFS_AC_KERNEL_SRC_BLKDEV_BDEV_KOBJ
586         ZFS_AC_KERNEL_SRC_BLKDEV_PART_TO_DEV
587         ZFS_AC_KERNEL_SRC_BLKDEV_DISK_CHECK_MEDIA_CHANGE
588         ZFS_AC_KERNEL_SRC_BLKDEV_BLK_STS_RESV_CONFLICT
589         ZFS_AC_KERNEL_SRC_BLKDEV_BLK_MODE_T
592 AC_DEFUN([ZFS_AC_KERNEL_BLKDEV], [
593         ZFS_AC_KERNEL_BLKDEV_GET_BY_PATH
594         ZFS_AC_KERNEL_BLKDEV_PUT
595         ZFS_AC_KERNEL_BLKDEV_REREAD_PART
596         ZFS_AC_KERNEL_BLKDEV_INVALIDATE_BDEV
597         ZFS_AC_KERNEL_BLKDEV_LOOKUP_BDEV
598         ZFS_AC_KERNEL_BLKDEV_BDEV_LOGICAL_BLOCK_SIZE
599         ZFS_AC_KERNEL_BLKDEV_BDEV_PHYSICAL_BLOCK_SIZE
600         ZFS_AC_KERNEL_BLKDEV_CHECK_DISK_CHANGE
601         ZFS_AC_KERNEL_BLKDEV_BDEV_CHECK_MEDIA_CHANGE
602         ZFS_AC_KERNEL_BLKDEV_BDEV_WHOLE
603         ZFS_AC_KERNEL_BLKDEV_BDEVNAME
604         ZFS_AC_KERNEL_BLKDEV_GET_ERESTARTSYS
605         ZFS_AC_KERNEL_BLKDEV_ISSUE_SECURE_ERASE
606         ZFS_AC_KERNEL_BLKDEV_BDEV_KOBJ
607         ZFS_AC_KERNEL_BLKDEV_PART_TO_DEV
608         ZFS_AC_KERNEL_BLKDEV_DISK_CHECK_MEDIA_CHANGE
609         ZFS_AC_KERNEL_BLKDEV_BLK_STS_RESV_CONFLICT
610         ZFS_AC_KERNEL_BLKDEV_BLK_MODE_T