2 dnl # Check for generic io accounting interface.
4 AC_DEFUN([ZFS_AC_KERNEL_SRC_GENERIC_IO_ACCT], [
5 ZFS_LINUX_TEST_SRC([generic_acct_3args], [
8 void (*generic_start_io_acct_f)(int, unsigned long,
9 struct hd_struct *) = &generic_start_io_acct;
10 void (*generic_end_io_acct_f)(int, struct hd_struct *,
11 unsigned long) = &generic_end_io_acct;
13 generic_start_io_acct(0, 0, NULL);
14 generic_end_io_acct(0, NULL, 0);
17 ZFS_LINUX_TEST_SRC([generic_acct_4args], [
18 #include <linux/bio.h>
20 void (*generic_start_io_acct_f)(struct request_queue *, int,
21 unsigned long, struct hd_struct *) = &generic_start_io_acct;
22 void (*generic_end_io_acct_f)(struct request_queue *, int,
23 struct hd_struct *, unsigned long) = &generic_end_io_acct;
25 generic_start_io_acct(NULL, 0, 0, NULL);
26 generic_end_io_acct(NULL, 0, NULL, 0);
30 AC_DEFUN([ZFS_AC_KERNEL_GENERIC_IO_ACCT], [
32 dnl # 3.19 API addition
34 dnl # torvalds/linux@394ffa50 allows us to increment iostat
35 dnl # counters without generic_make_request().
37 AC_MSG_CHECKING([whether generic IO accounting wants 3 args])
38 ZFS_LINUX_TEST_RESULT_SYMBOL([generic_acct_3args],
39 [generic_start_io_acct], [block/bio.c], [
41 AC_DEFINE(HAVE_GENERIC_IO_ACCT_3ARG, 1,
42 [generic_start_io_acct()/generic_end_io_acct() available])
49 dnl # generic_start_io_acct/generic_end_io_acct now require
50 dnl # request_queue to be provided. No functional changes,
51 dnl # but preparation for inflight accounting.
53 AC_MSG_CHECKING([whether generic IO accounting wants 4 args])
54 ZFS_LINUX_TEST_RESULT_SYMBOL([generic_acct_4args],
55 [generic_start_io_acct], [block/bio.c], [
57 AC_DEFINE(HAVE_GENERIC_IO_ACCT_4ARG, 1,
58 [generic_start_io_acct()/generic_end_io_acct() ]