Merge commit 'refs/top-bases/linux-have-spl-debug' into linux-have-spl-debug

This commit is contained in:
Brian Behlendorf 2009-11-16 10:36:37 -08:00
commit 5576ed7f1c
10 changed files with 195 additions and 1 deletions

View File

@ -0,0 +1,33 @@
dnl #
dnl # 2.6.x API change
dnl #
AC_DEFUN([ZFS_AC_KERNEL_BDEV_BLOCK_DEVICE_OPERATIONS], [
AC_MSG_CHECKING([block device operation prototypes])
ZFS_LINUX_TRY_COMPILE([
#include <linux/blkdev.h>
],[
int (*blk_open) (struct block_device *, fmode_t) = NULL;
int (*blk_release) (struct gendisk *, fmode_t) = NULL;
int (*blk_ioctl) (struct block_device *, fmode_t,
unsigned, unsigned long) = NULL;
int (*blk_compat_ioctl) (struct block_device *, fmode_t,
unsigned, unsigned long) = NULL;
struct block_device_operations blk_ops = {
.open = blk_open,
.release = blk_release,
.ioctl = blk_ioctl,
.compat_ioctl = blk_compat_ioctl,
};
blk_ops.open(NULL, 0);
blk_ops.release(NULL, 0);
blk_ops.ioctl(NULL, 0, 0, 0);
blk_ops.compat_ioctl(NULL, 0, 0, 0);
],[
AC_MSG_RESULT(struct block_device)
AC_DEFINE(HAVE_BDEV_BLOCK_DEVICE_OPERATIONS, 1,
[struct block_device_operations use bdevs])
],[
AC_MSG_RESULT(struct inode)
])
])

View File

@ -0,0 +1,18 @@
dnl #
dnl # 2.6.18 API change
nl #
AC_DEFUN([ZFS_AC_KERNEL_BLK_END_REQUEST], [
AC_MSG_CHECKING([whether blk_end_request() is available])
ZFS_LINUX_TRY_COMPILE([
#include <linux/blkdev.h>
],[
struct request *req = NULL;
(void) blk_end_request(req, 0, 0);
],[
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_BLK_END_REQUEST, 1,
[blk_end_request() is available])
],[
AC_MSG_RESULT(no)
])
])

View File

@ -0,0 +1,22 @@
dnl #
dnl # 2.6.31 API change
dnl # Request queue peek/retrieval interface cleanup, the blk_fetch_request()
dnl # function replaces the elv_next_request() and blk_fetch_request()
dnl # functions. The updated blk_fetch_request() function returns the
dnl # next available request and removed it from the request queue.
dnl #
AC_DEFUN([ZFS_AC_KERNEL_BLK_FETCH_REQUEST], [
AC_MSG_CHECKING([whether blk_fetch_request() is available])
ZFS_LINUX_TRY_COMPILE([
#include <linux/blkdev.h>
],[
struct request_queue *q = NULL;
(void) blk_fetch_request(q);
],[
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_BLK_FETCH_REQUEST, 1,
[blk_fetch_request() is available])
],[
AC_MSG_RESULT(no)
])
])

View File

@ -0,0 +1,22 @@
dnl #
dnl # 2.6.31 API change
dnl # Request queue peek/retrieval interface cleanup, the
dnl # elv_requeue_request() function has been replaced with the
dnl # blk_requeue_request() function.
dnl #
AC_DEFUN([ZFS_AC_KERNEL_BLK_REQUEUE_REQUEST], [
AC_MSG_CHECKING([whether blk_requeue_request() is available])
ZFS_LINUX_TRY_COMPILE([
#include <linux/blkdev.h>
],[
struct request_queue *q = NULL;
struct request *req = NULL;
blk_requeue_request(q, req);
],[
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_BLK_REQUEUE_REQUEST, 1,
[blk_requeue_request() is available])
],[
AC_MSG_RESULT(no)
])
])

View File

@ -0,0 +1,18 @@
dnl #
dnl # 2.6.31 API change
dnl #
AC_DEFUN([ZFS_AC_KERNEL_BLK_RQ_BYTES], [
AC_MSG_CHECKING([whether blk_rq_bytes() is available])
ZFS_LINUX_TRY_COMPILE([
#include <linux/blkdev.h>
],[
struct request *req = NULL;
(void) blk_rq_bytes(req);
],[
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_BLK_RQ_BYTES, 1,
[blk_rq_bytes() is available])
],[
AC_MSG_RESULT(no)
])
])

View File

@ -0,0 +1,18 @@
dnl #
dnl # 2.6.31 API change
dnl #
AC_DEFUN([ZFS_AC_KERNEL_BLK_RQ_POS], [
AC_MSG_CHECKING([whether blk_rq_pos() is available])
ZFS_LINUX_TRY_COMPILE([
#include <linux/blkdev.h>
],[
struct request *req = NULL;
(void) blk_rq_pos(req);
],[
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_BLK_RQ_POS, 1,
[blk_rq_pos() is available])
],[
AC_MSG_RESULT(no)
])
])

View File

@ -0,0 +1,18 @@
dnl #
dnl # 2.6.31 API change
dnl #
AC_DEFUN([ZFS_AC_KERNEL_BLK_RQ_SECTORS], [
AC_MSG_CHECKING([whether blk_rq_sectors() is available])
ZFS_LINUX_TRY_COMPILE([
#include <linux/blkdev.h>
],[
struct request *req = NULL;
(void) blk_rq_sectors(req);
],[
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_BLK_RQ_SECTORS, 1,
[blk_rq_sectors() is available])
],[
AC_MSG_RESULT(no)
])
])

View File

@ -0,0 +1,18 @@
dnl #
dnl # 2.6.x API change
dnl #
AC_DEFUN([ZFS_AC_KERNEL_GET_DISK_RO], [
AC_MSG_CHECKING([whether get_disk_ro() is available])
ZFS_LINUX_TRY_COMPILE([
#include <linux/blkdev.h>
],[
struct gendisk *disk = NULL;
(void) get_disk_ro(disk);
],[
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_GET_DISK_RO, 1,
[blk_disk_ro() is available])
],[
AC_MSG_RESULT(no)
])
])

View File

@ -0,0 +1,18 @@
dnl #
dnl # 2.6.x API change
dnl #
AC_DEFUN([ZFS_AC_KERNEL_RQ_IS_SYNC], [
AC_MSG_CHECKING([whether rq_is_sync() is available])
ZFS_LINUX_TRY_COMPILE([
#include <linux/blkdev.h>
],[
struct request *req = NULL;
(void) rq_is_sync(req);
],[
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_RQ_IS_SYNC, 1,
[rq_is_sync() is available])
],[
AC_MSG_RESULT(no)
])
])

View File

@ -4,12 +4,21 @@ dnl #
AC_DEFUN([ZFS_AC_CONFIG_KERNEL], [ AC_DEFUN([ZFS_AC_CONFIG_KERNEL], [
ZFS_AC_KERNEL ZFS_AC_KERNEL
ZFS_AC_SPL ZFS_AC_SPL
ZFS_AC_KERNEL_BDEV_BLOCK_DEVICE_OPERATIONS
ZFS_AC_KERNEL_OPEN_BDEV_EXCLUSIVE ZFS_AC_KERNEL_OPEN_BDEV_EXCLUSIVE
ZFS_AC_KERNEL_INVALIDATE_BDEV_ARGS ZFS_AC_KERNEL_INVALIDATE_BDEV_ARGS
ZFS_AC_KERNEL_BDEV_LOGICAL_BLOCK_SIZE ZFS_AC_KERNEL_BDEV_LOGICAL_BLOCK_SIZE
ZFS_AC_KERNEL_BIO_EMPTY_BARRIER
ZFS_AC_KERNEL_BIO_END_IO_T_ARGS ZFS_AC_KERNEL_BIO_END_IO_T_ARGS
ZFS_AC_KERNEL_BIO_RW_SYNCIO ZFS_AC_KERNEL_BIO_RW_SYNCIO
ZFS_AC_KERNEL_BIO_EMPTY_BARRIER ZFS_AC_KERNEL_BLK_END_REQUEST
ZFS_AC_KERNEL_BLK_FETCH_REQUEST
ZFS_AC_KERNEL_BLK_REQUEUE_REQUEST
ZFS_AC_KERNEL_BLK_RQ_BYTES
ZFS_AC_KERNEL_BLK_RQ_POS
ZFS_AC_KERNEL_BLK_RQ_SECTORS
ZFS_AC_KERNEL_GET_DISK_RO
ZFS_AC_KERNEL_RQ_IS_SYNC
dnl # Kernel build make options dnl # Kernel build make options
dnl # KERNELMAKE_PARAMS="V=1" # Enable verbose module build dnl # KERNELMAKE_PARAMS="V=1" # Enable verbose module build