2011-11-08 04:39:03 +04:00
|
|
|
dnl #
|
2015-02-28 03:09:52 +03:00
|
|
|
dnl # 2.6.32 - 2.6.33, bdi_setup_and_register() is not exported.
|
|
|
|
dnl # 2.6.34 - 3.19, bdi_setup_and_register() takes 3 arguments.
|
|
|
|
dnl # 4.0 - x.y, bdi_setup_and_register() takes 2 arguments.
|
2011-11-08 04:39:03 +04:00
|
|
|
dnl #
|
2015-02-28 03:09:52 +03:00
|
|
|
AC_DEFUN([ZFS_AC_KERNEL_BDI_SETUP_AND_REGISTER], [
|
|
|
|
AC_MSG_CHECKING([whether bdi_setup_and_register() wants 2 args])
|
2012-07-26 01:38:58 +04:00
|
|
|
ZFS_LINUX_TRY_COMPILE_SYMBOL([
|
|
|
|
#include <linux/backing-dev.h>
|
2015-02-28 03:09:52 +03:00
|
|
|
struct backing_dev_info bdi;
|
2015-08-09 15:38:18 +03:00
|
|
|
], [
|
2015-02-28 03:09:52 +03:00
|
|
|
char *name = "bdi";
|
2015-03-13 19:44:42 +03:00
|
|
|
int error __attribute__((unused)) =
|
|
|
|
bdi_setup_and_register(&bdi, name);
|
2012-07-26 01:38:58 +04:00
|
|
|
], [bdi_setup_and_register], [mm/backing-dev.c], [
|
|
|
|
AC_MSG_RESULT(yes)
|
2015-02-28 03:09:52 +03:00
|
|
|
AC_DEFINE(HAVE_2ARGS_BDI_SETUP_AND_REGISTER, 1,
|
|
|
|
[bdi_setup_and_register() wants 2 args])
|
2012-07-26 01:38:58 +04:00
|
|
|
], [
|
|
|
|
AC_MSG_RESULT(no)
|
2015-02-28 03:09:52 +03:00
|
|
|
AC_MSG_CHECKING([whether bdi_setup_and_register() wants 3 args])
|
|
|
|
ZFS_LINUX_TRY_COMPILE_SYMBOL([
|
|
|
|
#include <linux/backing-dev.h>
|
|
|
|
struct backing_dev_info bdi;
|
2015-08-09 15:38:18 +03:00
|
|
|
], [
|
2015-02-28 03:09:52 +03:00
|
|
|
char *name = "bdi";
|
|
|
|
unsigned int cap = BDI_CAP_MAP_COPY;
|
2015-03-13 19:44:42 +03:00
|
|
|
int error __attribute__((unused)) =
|
|
|
|
bdi_setup_and_register(&bdi, name, cap);
|
2015-02-28 03:09:52 +03:00
|
|
|
], [bdi_setup_and_register], [mm/backing-dev.c], [
|
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
AC_DEFINE(HAVE_3ARGS_BDI_SETUP_AND_REGISTER, 1,
|
|
|
|
[bdi_setup_and_register() wants 3 args])
|
|
|
|
], [
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
])
|
2012-07-26 01:38:58 +04:00
|
|
|
])
|
2011-11-08 04:39:03 +04:00
|
|
|
])
|