zfsonlinux/zfs — pull request #906 by foobarz (2012-08-28 14:19:47+00:00)
Title: Added autoconf check for linux/elevator.h elevator_change() and usage in module/zfs/vdev_disk.c

Added autoconf check for elevator_change() in the target kernel (HAVE_ELEVATOR_CHANGE).

In module/zfs/vdev_disk.c, two versions of elevator_switch() are available; If HAVE_ELEVATOR_CHANGE, then use version that calls elevator_change(). Otherwise, use version with call_usermodehelper to echo elevator into /sys (depends on existence of echo and mounted /sys in user-space before opening/mounting a zfs fs).

These changes will allow the elevator switch to work with newer (>=2.6.36) kernels while opening/mounting from a very minimal initramfs that maybe only contains a simple init program.