Whamcloud - gitweb
LU-11132 compile: fix LC_BI_BDEV for old kernels 99/32799/2
authorVladimir Saveliev <c17830@cray.com>
Thu, 12 Jul 2018 19:45:11 +0000 (22:45 +0300)
committerAndreas Dilger <adilger@whamcloud.com>
Mon, 23 Jul 2018 22:19:10 +0000 (22:19 +0000)
struct bio is located in linux/bio.h in 2.6 kernel serie. LC_BI_BDEV
uses linux/blk_types.h. That makes the configuration check to fail for
those kernels and breaks compiling.

Use linux/bio.h in LC_BI_BDEV so that it worked for both new and all
kernels.

Signed-off-by: Vladimir Saveliev <c17830@cray.com>
Change-Id: Iaeefea9ba96ebe4dad30acedb5fa7551c4516241
Reviewed-on: https://review.whamcloud.com/32799
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Minh Diep <mdiep@whamcloud.com>
lustre/autoconf/lustre-core.m4

index 2dd5327..ce53272 100644 (file)
@@ -2887,7 +2887,7 @@ pagevec_init, [
 AC_DEFUN([LC_BI_BDEV], [
 LB_CHECK_COMPILE([if 'bi_bdev' exist],
 bi_bdev, [
 AC_DEFUN([LC_BI_BDEV], [
 LB_CHECK_COMPILE([if 'bi_bdev' exist],
 bi_bdev, [
-       #include <linux/blk_types.h>
+       #include <linux/bio.h>
 ],[
        ((struct bio *)0)->bi_bdev = NULL;
 ],[
 ],[
        ((struct bio *)0)->bi_bdev = NULL;
 ],[