mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-25 18:59:33 +03:00
1c38ac61e1
The blk_queue_stackable() function was replaced in the 4.14 kernel by queue_is_rq_based(), commit torvalds/linux@5fdee212. This change resulted in the default elevator being used which can negatively impact performance. Rather than adding additional compatibility code to detect the new interface unconditionally attempt to set the elevator. Since we expect this to fail for block devices without an elevator the error message has been moved in to zfs_dbgmsg(). Finally, it was observed that the elevator_change() was removed from the 4.12 kernel, commit torvalds/linux@c033269. Update the comment to clearly specify which are expected to export the elevator_change() symbol. Reviewed-by: Matthew Ahrens <mahrens@delphix.com> Reviewed-by: Tony Hutter <hutter2@llnl.gov> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #7645
26 lines
649 B
Plaintext
26 lines
649 B
Plaintext
dnl #
|
|
dnl # 2.6.36 API, exported elevator_change() symbol
|
|
dnl # 4.12 API, removed elevator_change() symbol
|
|
dnl #
|
|
AC_DEFUN([ZFS_AC_KERNEL_ELEVATOR_CHANGE], [
|
|
AC_MSG_CHECKING([whether elevator_change() is available])
|
|
tmp_flags="$EXTRA_KCFLAGS"
|
|
EXTRA_KCFLAGS="${NO_UNUSED_BUT_SET_VARIABLE}"
|
|
ZFS_LINUX_TRY_COMPILE([
|
|
#include <linux/blkdev.h>
|
|
#include <linux/elevator.h>
|
|
],[
|
|
int ret;
|
|
struct request_queue *q = NULL;
|
|
char *elevator = NULL;
|
|
ret = elevator_change(q, elevator);
|
|
],[
|
|
AC_MSG_RESULT(yes)
|
|
AC_DEFINE(HAVE_ELEVATOR_CHANGE, 1,
|
|
[elevator_change() is available])
|
|
],[
|
|
AC_MSG_RESULT(no)
|
|
])
|
|
EXTRA_KCFLAGS="$tmp_flags"
|
|
])
|