2017-09-16 18:00:19 +00:00
|
|
|
dnl #
|
|
|
|
dnl # Linux 4.14 API,
|
|
|
|
dnl #
|
2019-01-16 18:39:19 +00:00
|
|
|
dnl # The bio_set_dev() helper macro was introduced as part of the transition
|
2017-09-16 18:00:19 +00:00
|
|
|
dnl # to have struct gendisk in struct bio.
|
2019-01-16 18:39:19 +00:00
|
|
|
dnl #
|
|
|
|
dnl # Linux 5.0 API,
|
|
|
|
dnl #
|
|
|
|
dnl # The bio_set_dev() helper macro was updated to internally depend on
|
|
|
|
dnl # bio_associate_blkg() symbol which is exported GPL-only.
|
|
|
|
dnl #
|
2019-10-01 19:50:34 +00:00
|
|
|
AC_DEFUN([ZFS_AC_KERNEL_SRC_BIO_SET_DEV], [
|
|
|
|
ZFS_LINUX_TEST_SRC([bio_set_dev], [
|
2019-01-16 18:39:19 +00:00
|
|
|
#include <linux/bio.h>
|
|
|
|
#include <linux/fs.h>
|
|
|
|
],[
|
|
|
|
struct block_device *bdev = NULL;
|
|
|
|
struct bio *bio = NULL;
|
|
|
|
bio_set_dev(bio, bdev);
|
2019-10-01 19:50:34 +00:00
|
|
|
], [], [$ZFS_META_LICENSE])
|
2019-01-16 18:39:19 +00:00
|
|
|
])
|
|
|
|
|
|
|
|
AC_DEFUN([ZFS_AC_KERNEL_BIO_SET_DEV], [
|
2019-10-01 19:50:34 +00:00
|
|
|
AC_MSG_CHECKING([whether bio_set_dev() is available])
|
|
|
|
ZFS_LINUX_TEST_RESULT([bio_set_dev], [
|
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
AC_DEFINE(HAVE_BIO_SET_DEV, 1, [bio_set_dev() is available])
|
|
|
|
|
|
|
|
AC_MSG_CHECKING([whether bio_set_dev() is GPL-only])
|
|
|
|
ZFS_LINUX_TEST_RESULT([bio_set_dev_license], [
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
],[
|
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
AC_DEFINE(HAVE_BIO_SET_DEV_GPL_ONLY, 1,
|
|
|
|
[bio_set_dev() GPL-only])
|
|
|
|
])
|
|
|
|
],[
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
])
|
2019-01-16 18:39:19 +00:00
|
|
|
])
|