Whamcloud - gitweb
LU-2800 autoconf: remove LC_BI_HW_SEGMENTS test 70/5370/10
authorJames Simmons <uja.ornl@gmail.com>
Wed, 11 Sep 2013 17:24:24 +0000 (13:24 -0400)
committerOleg Drokin <oleg.drokin@intel.com>
Thu, 26 Sep 2013 05:20:20 +0000 (05:20 +0000)
bio.bi_hw_segments has been removed from the upstream kernel
since v2.6.27

We can remove the test and dead code.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: Iaf8c468750aeb3c0234e46c09873f8f382c77b9a
Reviewed-on: http://review.whamcloud.com/5370
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/autoconf/lustre-core.m4
lustre/include/linux/lustre_compat25.h
lustre/osd-ldiskfs/osd_io.c

index 368df37..620963c 100644 (file)
@@ -454,25 +454,6 @@ LB_LINUX_TRY_COMPILE([
 ])
 ])
 
 ])
 ])
 
-# 2.6.27.15-2 sles11
-
-# 2.6.27 sles11 remove the bi_hw_segments
-AC_DEFUN([LC_BI_HW_SEGMENTS],
-[AC_MSG_CHECKING([struct bio has a bi_hw_segments field])
-LB_LINUX_TRY_COMPILE([
-        #include <linux/bio.h>
-],[
-        struct bio io;
-        io.bi_hw_segments = sizeof(io);
-],[
-        AC_DEFINE(HAVE_BI_HW_SEGMENTS, 1,
-                [struct bio has a bi_hw_segments field])
-        AC_MSG_RESULT([yes])
-],[
-        AC_MSG_RESULT([no])
-])
-])
-
 #
 # 2.6.27 sles11 move the quotaio_v1{2}.h from include/linux to fs
 # 2.6.32 move the quotaio_v1{2}.h from fs to fs/quota
 #
 # 2.6.27 sles11 move the quotaio_v1{2}.h from include/linux to fs
 # 2.6.32 move the quotaio_v1{2}.h from fs to fs/quota
@@ -1326,7 +1307,6 @@ AC_DEFUN([LC_PROG_LINUX],
          LC_PROCFS_DELETED
 
          # 2.6.27.15-2 sles11
          LC_PROCFS_DELETED
 
          # 2.6.27.15-2 sles11
-         LC_BI_HW_SEGMENTS
          LC_HAVE_QUOTAIO_H
 
          # 2.6.32
          LC_HAVE_QUOTAIO_H
 
          # 2.6.32
index 9759a26..cd79e6e 100644 (file)
@@ -301,11 +301,6 @@ unsigned int ll_crypto_tfm_alg_min_keysize(struct crypto_blkcipher *tfm)
 #define DECLARE_LL_D_HLIST_NODE_PTR(name) /* nothing */
 #endif
 
 #define DECLARE_LL_D_HLIST_NODE_PTR(name) /* nothing */
 #endif
 
-
-#ifndef HAVE_BI_HW_SEGMENTS
-#define bio_hw_segments(q, bio) 0
-#endif
-
 #ifndef QUOTA_OK
 # define QUOTA_OK 0
 #endif
 #ifndef QUOTA_OK
 # define QUOTA_OK 0
 #endif
index 7da40f0..a217bb3 100644 (file)
@@ -335,8 +335,7 @@ static int osd_do_bio(struct osd_device *osd, struct inode *inode,
                                        bio->bi_size >> 9, queue_max_sectors(q),
                                        bio_phys_segments(q, bio),
                                        queue_max_phys_segments(q),
                                        bio->bi_size >> 9, queue_max_sectors(q),
                                        bio_phys_segments(q, bio),
                                        queue_max_phys_segments(q),
-                                       bio_hw_segments(q, bio),
-                                       queue_max_hw_segments(q));
+                                      0, queue_max_hw_segments(q));
 
                                 record_start_io(iobuf, bio->bi_size);
                                 osd_submit_bio(iobuf->dr_rw, bio);
 
                                 record_start_io(iobuf, bio->bi_size);
                                 osd_submit_bio(iobuf->dr_rw, bio);