From dadfda622c03c35c16910cc82fe7d8aa099e9ea9 Mon Sep 17 00:00:00 2001 From: James Simmons Date: Wed, 11 Sep 2013 13:24:24 -0400 Subject: [PATCH] LU-2800 autoconf: remove LC_BI_HW_SEGMENTS test 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 Signed-off-by: James Simmons Change-Id: Iaf8c468750aeb3c0234e46c09873f8f382c77b9a Reviewed-on: http://review.whamcloud.com/5370 Reviewed-by: Bob Glossman Tested-by: Hudson Tested-by: Maloo Reviewed-by: Oleg Drokin --- lustre/autoconf/lustre-core.m4 | 20 -------------------- lustre/include/linux/lustre_compat25.h | 5 ----- lustre/osd-ldiskfs/osd_io.c | 3 +-- 3 files changed, 1 insertion(+), 27 deletions(-) diff --git a/lustre/autoconf/lustre-core.m4 b/lustre/autoconf/lustre-core.m4 index 368df37..620963c 100644 --- a/lustre/autoconf/lustre-core.m4 +++ b/lustre/autoconf/lustre-core.m4 @@ -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 -],[ - 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 @@ -1326,7 +1307,6 @@ AC_DEFUN([LC_PROG_LINUX], LC_PROCFS_DELETED # 2.6.27.15-2 sles11 - LC_BI_HW_SEGMENTS LC_HAVE_QUOTAIO_H # 2.6.32 diff --git a/lustre/include/linux/lustre_compat25.h b/lustre/include/linux/lustre_compat25.h index 9759a26..cd79e6e 100644 --- a/lustre/include/linux/lustre_compat25.h +++ b/lustre/include/linux/lustre_compat25.h @@ -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 - -#ifndef HAVE_BI_HW_SEGMENTS -#define bio_hw_segments(q, bio) 0 -#endif - #ifndef QUOTA_OK # define QUOTA_OK 0 #endif diff --git a/lustre/osd-ldiskfs/osd_io.c b/lustre/osd-ldiskfs/osd_io.c index 7da40f0..a217bb3 100644 --- a/lustre/osd-ldiskfs/osd_io.c +++ b/lustre/osd-ldiskfs/osd_io.c @@ -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_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); -- 1.8.3.1