Merge branch 'linux-arc' into refs/top-bases/linux-zfs-branch

This commit is contained in:
Brian Behlendorf 2009-07-29 17:49:26 -07:00
commit e925f6cc86
7 changed files with 103 additions and 25 deletions

View File

@ -1,24 +0,0 @@
dnl #
dnl # 2.6.x API change
dnl # bio_end_io_t uses 2 args (size was dropped from prototype)
dnl #
AC_DEFUN([ZFS_AC_CONFIG_KERNEL_BIO_ARGS],
[AC_MSG_CHECKING([whether bio_end_io_t wants 2 args])
tmp_flags="$EXTRA_KCFLAGS"
EXTRA_KCFLAGS="-Werror"
ZFS_LINUX_TRY_COMPILE([
#include <linux/bio.h>
],[
void (*wanted_end_io)(struct bio *, int) = NULL;
bio_end_io_t *local_end_io;
local_end_io = wanted_end_io;
],[
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_2ARGS_BIO_END_IO_T, 1,
[bio_end_io_t wants 2 args])
],[
AC_MSG_RESULT(no)
])
EXTRA_KCFLAGS="$tmp_flags"
])

View File

@ -0,0 +1,20 @@
dnl #
dnl # 2.6.24 API change
dnl # Empty write barriers are now supported and we should use them.
dnl #
AC_DEFUN([ZFS_AC_KERNEL_BIO_EMPTY_BARRIER], [
AC_MSG_CHECKING([whether bio_empty_barrier() is defined])
EXTRA_KCFLAGS="-Werror"
ZFS_LINUX_TRY_COMPILE([
#include <linux/bio.h>
],[
struct bio bio;
(void)bio_empty_barrier(&bio);
],[
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_BIO_EMPTY_BARRIER, 1,
[bio_empy_barrier() is defined])
],[
AC_MSG_RESULT(no)
])
])

View File

@ -0,0 +1,29 @@
dnl #
dnl # 2.6.24 API change
dnl # Size argument dropped from bio_endio and bi_end_io, because the
dnl # bi_end_io is only called once now when the request is complete.
dnl # There is no longer any need for a size argument. This also means
dnl # that partial IO's are no longer possibe and the end_io callback
dnl # should not check bi->bi_size. Finally, the return type was updated
dnl # to void.
dnl #
AC_DEFUN([ZFS_AC_KERNEL_BIO_END_IO_T_ARGS], [
AC_MSG_CHECKING([whether bio_end_io_t wants 2 args])
tmp_flags="$EXTRA_KCFLAGS"
EXTRA_KCFLAGS="-Werror"
ZFS_LINUX_TRY_COMPILE([
#include <linux/bio.h>
],[
void (*wanted_end_io)(struct bio *, int) = NULL;
bio_end_io_t *local_end_io;
local_end_io = wanted_end_io;
],[
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_2ARGS_BIO_END_IO_T, 1,
[bio_end_io_t wants 2 args])
],[
AC_MSG_RESULT(no)
])
EXTRA_KCFLAGS="$tmp_flags"
])

View File

@ -0,0 +1,18 @@
dnl #
dnl # 2.6.29 API change
dnl # BIO_RW_SYNC renamed to BIO_RW_SYNCIO
dnl #
AC_DEFUN([ZFS_AC_KERNEL_BIO_RW_SYNCIO], [
AC_MSG_CHECKING([whether BIO_RW_SYNCIO is defined])
ZFS_LINUX_TRY_COMPILE([
#include <linux/bio.h>
],[
int flags = BIO_RW_SYNCIO;
],[
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_BIO_RW_SYNCIO, 1,
[BIO_RW_SYNCIO is defined])
],[
AC_MSG_RESULT(no)
])
])

View File

@ -0,0 +1,19 @@
dnl #
dnl # 2.6.22 API change
dnl # Unused destroy_dirty_buffers arg removed from prototype.
dnl #
AC_DEFUN([ZFS_AC_KERNEL_INVALIDATE_BDEV_ARGS], [
AC_MSG_CHECKING([whether invalidate_bdev() wants 1 arg])
ZFS_LINUX_TRY_COMPILE([
#include <linux/buffer_head.h>
],[
struct block_device *bdev;
invalidate_bdev(bdev);
],[
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_1ARG_INVALIDATE_BDEV, 1,
[invalidate_bdev() wants 1 arg])
],[
AC_MSG_RESULT(no)
])
])

View File

@ -0,0 +1,12 @@
dnl #
dnl # 2.6.28 API change
dnl # open/close_bdev_excl() renamed to open/close_bdev_exclusive()
dnl #
AC_DEFUN([ZFS_AC_KERNEL_OPEN_BDEV_EXCLUSIVE], [
ZFS_CHECK_SYMBOL_EXPORT(
[open_bdev_exclusive],
[fs/block_dev.c],
[AC_DEFINE(HAVE_OPEN_BDEV_EXCLUSIVE, 1,
[open_bdev_exclusive() is available])],
[])
])

View File

@ -4,7 +4,11 @@ dnl #
AC_DEFUN([ZFS_AC_CONFIG_KERNEL], [
ZFS_AC_KERNEL
ZFS_AC_SPL
ZFS_AC_CONFIG_KERNEL_BIO_ARGS
ZFS_AC_KERNEL_OPEN_BDEV_EXCLUSIVE
ZFS_AC_KERNEL_INVALIDATE_BDEV_ARGS
ZFS_AC_KERNEL_BIO_END_IO_T_ARGS
ZFS_AC_KERNEL_BIO_RW_SYNCIO
ZFS_AC_KERNEL_BIO_EMPTY_BARRIER
dnl # Kernel build make options
dnl # KERNELMAKE_PARAMS="V=1" # Enable verbose module build