787acae0b5
generic_start_io_acct/generic_end_io_acct in the master branch of the linux kernel requires that the request_queue be provided. Move the logic from freemem in the spl to arc_free_memory in arc.c. Do this so we can take advantage of global_page_state interface checks in zfs. Upstream kernel replaced struct block_device with struct gendisk in struct bio. Determine if the function bio_set_dev exists during configure and have zfs use that if it exists. bio_set_dev https://github.com/torvalds/linux/commit/74d4699 global_node_page_state https://github.com/torvalds/linux/commit/75ef718 io acct https://github.com/torvalds/linux/commit/d62e26b Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Giuseppe Di Natale <dinatale2@llnl.gov> Closes #6635
23 lines
528 B
Plaintext
23 lines
528 B
Plaintext
dnl #
|
|
dnl # Linux 4.14 API,
|
|
dnl #
|
|
dnl # The bio_set_dev() helper was introduced as part of the transition
|
|
dnl # to have struct gendisk in struct bio.
|
|
dnl #
|
|
AC_DEFUN([ZFS_AC_KERNEL_BIO_SET_DEV], [
|
|
AC_MSG_CHECKING([whether bio_set_dev() exists])
|
|
ZFS_LINUX_TRY_COMPILE([
|
|
#include <linux/bio.h>
|
|
#include <linux/fs.h>
|
|
],[
|
|
struct block_device *bdev = NULL;
|
|
struct bio *bio = NULL;
|
|
bio_set_dev(bio, bdev);
|
|
],[
|
|
AC_MSG_RESULT(yes)
|
|
AC_DEFINE(HAVE_BIO_SET_DEV, 1, [bio_set_dev() exists])
|
|
],[
|
|
AC_MSG_RESULT(no)
|
|
])
|
|
])
|