]> git.proxmox.com Git - mirror_zfs.git/blame - config/kernel-bio-end-io-t-args.m4
Improve error message for zfs create with @ or # in name
[mirror_zfs.git] / config / kernel-bio-end-io-t-args.m4
CommitLineData
c9c0d073 1dnl #
784a7fe5
LW
2dnl # 4.3 API change
3dnl # Error argument dropped from bio_endio in favor of newly introduced
4dnl # bio->bi_error. This also replaces bio->bi_flags value BIO_UPTODATE.
5dnl # Introduced by torvalds/linux@4246a0b63bd8f56a1469b12eafeb875b1041a451
6dnl # ("block: add a bi_error field to struct bio").
c9c0d073
BB
7dnl #
8AC_DEFUN([ZFS_AC_KERNEL_BIO_END_IO_T_ARGS], [
784a7fe5 9 AC_MSG_CHECKING([whether bio_end_io_t wants 1 arg])
c9c0d073
BB
10 ZFS_LINUX_TRY_COMPILE([
11 #include <linux/bio.h>
c9c0d073 12
784a7fe5 13 void wanted_end_io(struct bio *bio) { return; }
c38367c7
RY
14
15 bio_end_io_t *end_io __attribute__ ((unused)) = wanted_end_io;
16 ],[
c9c0d073
BB
17 ],[
18 AC_MSG_RESULT(yes)
784a7fe5
LW
19 AC_DEFINE(HAVE_1ARG_BIO_END_IO_T, 1,
20 [bio_end_io_t wants 1 arg])
c9c0d073
BB
21 ],[
22 AC_MSG_RESULT(no)
23 ])
c9c0d073 24])
36ba27e9
BB
25
26dnl #
27dnl # 4.13 API change
28dnl # The bio->bi_error field was replaced with bio->bi_status which is an
29dnl # enum which describes all possible error types.
30dnl #
31AC_DEFUN([ZFS_AC_KERNEL_BIO_BI_STATUS], [
32 AC_MSG_CHECKING([whether bio->bi_status exists])
33 ZFS_LINUX_TRY_COMPILE([
34 #include <linux/bio.h>
35 ],[
36 struct bio bio __attribute__ ((unused));
37 blk_status_t status __attribute__ ((unused)) = BLK_STS_OK;
38
39 bio.bi_status = status;
40 ],[
41 AC_MSG_RESULT(yes)
42 AC_DEFINE(HAVE_BIO_BI_STATUS, 1, [bio->bi_status exists])
43 ],[
44 AC_MSG_RESULT(no)
45 ])
46])