]> granicus.if.org Git - zfs/commitdiff
Remove blk_rq_bytes()/blk_rq_sectors autotools checks
authorRichard Yao <ryao@gentoo.org>
Mon, 7 Jul 2014 01:06:43 +0000 (21:06 -0400)
committerRichard Yao <ryao@gentoo.org>
Fri, 4 Sep 2015 19:37:24 +0000 (15:37 -0400)
Signed-off-by: Richard Yao <ryao@gentoo.org>
config/kernel-blk-rq-bytes.m4 [deleted file]
config/kernel-blk-rq-sectors.m4 [deleted file]
config/kernel.m4
include/linux/blkdev_compat.h

diff --git a/config/kernel-blk-rq-bytes.m4 b/config/kernel-blk-rq-bytes.m4
deleted file mode 100644 (file)
index bedbcc6..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-dnl #
-dnl # 2.6.29 API change
-dnl # In the 2.6.29 kernel blk_rq_bytes() was available as a GPL-only symbol.
-dnl # So we need to check the symbol license as well.  As of 2.6.31 the
-dnl blk_rq_bytes() helper was changed to a static inline which we can use.
-dnl #
-AC_DEFUN([ZFS_AC_KERNEL_BLK_RQ_BYTES], [
-       AC_MSG_CHECKING([whether blk_rq_bytes() is available])
-       tmp_flags="$EXTRA_KCFLAGS"
-       EXTRA_KCFLAGS="${NO_UNUSED_BUT_SET_VARIABLE}"
-       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)
-       ])
-
-       AC_MSG_CHECKING([whether blk_rq_bytes() is GPL-only])
-       ZFS_LINUX_TRY_COMPILE([
-               #include <linux/module.h>
-               #include <linux/blkdev.h>
-
-               MODULE_LICENSE("$ZFS_META_LICENSE");
-       ],[
-               struct request *req = NULL;
-               (void) blk_rq_bytes(req);
-       ],[
-               AC_MSG_RESULT(no)
-       ],[
-               AC_MSG_RESULT(yes)
-               AC_DEFINE(HAVE_BLK_RQ_BYTES_GPL_ONLY, 1,
-                         [blk_rq_bytes() is GPL-only])
-       ])
-       EXTRA_KCFLAGS="$tmp_flags"
-])
diff --git a/config/kernel-blk-rq-sectors.m4 b/config/kernel-blk-rq-sectors.m4
deleted file mode 100644 (file)
index dea5bb5..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-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])
-       tmp_flags="$EXTRA_KCFLAGS"
-       EXTRA_KCFLAGS="${NO_UNUSED_BUT_SET_VARIABLE}"
-       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)
-       ])
-       EXTRA_KCFLAGS="$tmp_flags"
-])
index 504e45df557d4530bc976323ca84806ff6997d29..12d1ac78cc0274684e4ca6f6648956bec56784a9 100644 (file)
@@ -33,8 +33,6 @@ AC_DEFUN([ZFS_AC_CONFIG_KERNEL], [
        ZFS_AC_KERNEL_BLK_QUEUE_MAX_SEGMENTS
        ZFS_AC_KERNEL_BLK_QUEUE_NONROT
        ZFS_AC_KERNEL_BLK_QUEUE_DISCARD
-       ZFS_AC_KERNEL_BLK_RQ_BYTES
-       ZFS_AC_KERNEL_BLK_RQ_SECTORS
        ZFS_AC_KERNEL_GET_DISK_RO
        ZFS_AC_KERNEL_GET_GENDISK
        ZFS_AC_KERNEL_DISCARD_GRANULARITY
index 2842af7e38f680c343f2f26036582c8cbb8d9898..c3c466bc2a25accca8525499cab860991d4a8695 100644 (file)
@@ -52,29 +52,6 @@ __blk_queue_flush(struct request_queue *q, unsigned int flags)
        q->flush_flags = flags & (REQ_FLUSH | REQ_FUA);
 }
 #endif /* HAVE_BLK_QUEUE_FLUSH && HAVE_BLK_QUEUE_FLUSH_GPL_ONLY */
-
-#ifndef HAVE_BLK_RQ_SECTORS
-static inline unsigned int
-blk_rq_sectors(struct request *req)
-{
-       return (req->nr_sectors);
-}
-#endif /* HAVE_BLK_RQ_SECTORS */
-
-#if !defined(HAVE_BLK_RQ_BYTES) || defined(HAVE_BLK_RQ_BYTES_GPL_ONLY)
-/*
- * Define required to avoid conflicting 2.6.29 non-static prototype for a
- * GPL-only version of the helper.  As of 2.6.31 the helper is available
- * to non-GPL modules in the form of a static inline in the header.
- */
-#define        blk_rq_bytes __blk_rq_bytes
-static inline unsigned int
-__blk_rq_bytes(struct request *req)
-{
-       return (blk_rq_sectors(req) << 9);
-}
-#endif /* !HAVE_BLK_RQ_BYTES || HAVE_BLK_RQ_BYTES_GPL_ONLY */
-
 /*
  * Most of the blk_* macros were removed in 2.6.36.  Ostensibly this was
  * done to improve readability and allow easier grepping.  However, from