]> git.proxmox.com Git - mirror_zfs-debian.git/blame - config/kernel-bio-end-io-t-args.m4
Linux compat 2.6.39: mount_nodev()
[mirror_zfs-debian.git] / config / kernel-bio-end-io-t-args.m4
CommitLineData
c9c0d073
BB
1dnl #
2dnl # 2.6.24 API change
3dnl # Size argument dropped from bio_endio and bi_end_io, because the
4dnl # bi_end_io is only called once now when the request is complete.
5dnl # There is no longer any need for a size argument. This also means
6dnl # that partial IO's are no longer possibe and the end_io callback
7dnl # should not check bi->bi_size. Finally, the return type was updated
8dnl # to void.
9dnl #
10AC_DEFUN([ZFS_AC_KERNEL_BIO_END_IO_T_ARGS], [
11 AC_MSG_CHECKING([whether bio_end_io_t wants 2 args])
12 tmp_flags="$EXTRA_KCFLAGS"
13 EXTRA_KCFLAGS="-Werror"
14 ZFS_LINUX_TRY_COMPILE([
15 #include <linux/bio.h>
16 ],[
17 void (*wanted_end_io)(struct bio *, int) = NULL;
79713039 18 bio_end_io_t *local_end_io __attribute__ ((unused));
c9c0d073
BB
19
20 local_end_io = wanted_end_io;
21 ],[
22 AC_MSG_RESULT(yes)
23 AC_DEFINE(HAVE_2ARGS_BIO_END_IO_T, 1,
24 [bio_end_io_t wants 2 args])
25 ],[
26 AC_MSG_RESULT(no)
27 ])
28 EXTRA_KCFLAGS="$tmp_flags"
29])