]>
Commit | Line | Data |
---|---|---|
c9c0d073 BB |
1 | dnl # |
2 | dnl # 2.6.24 API change | |
3 | dnl # Size argument dropped from bio_endio and bi_end_io, because the | |
4 | dnl # bi_end_io is only called once now when the request is complete. | |
5 | dnl # There is no longer any need for a size argument. This also means | |
6 | dnl # that partial IO's are no longer possibe and the end_io callback | |
7 | dnl # should not check bi->bi_size. Finally, the return type was updated | |
8 | dnl # to void. | |
9 | dnl # | |
10 | AC_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 | ]) |