Whamcloud - gitweb
LU-2800 autoconf: remove LC_PAGE_CONSTANT 39/5339/7
authorJames Simmons <uja.ornl@gmail.com>
Mon, 9 Sep 2013 18:43:58 +0000 (14:43 -0400)
committerOleg Drokin <oleg.drokin@intel.com>
Thu, 26 Sep 2013 05:16:35 +0000 (05:16 +0000)
The purpose of this patch was to see if the kernel
was patched to support raid5 zerocopy. This only was
supported on RHLE5 servers which means this test can
be removed now.

Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: I36276dfee7a6247719e716a9a304453dd519acdb
Reviewed-on: http://review.whamcloud.com/5339
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Minh Diep <minh.diep@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/autoconf/lustre-core.m4
lustre/osd-ldiskfs/osd_io.c

index ed73058..0950ea8 100644 (file)
@@ -356,34 +356,6 @@ AC_DEFUN([LC_CONFIG_GSS],
  fi
 ])
 
  fi
 ])
 
-#2.6.18 + RHEL5 (fc6)
-
-# raid5-zerocopy patch
-
-#
-# LC_PAGE_CONSTANT
-#
-# In order to support raid5 zerocopy patch, we have to patch the kernel to make
-# it support constant page, which means the page won't be modified during the
-# IO.
-#
-AC_DEFUN([LC_PAGE_CONSTANT],
-[AC_MSG_CHECKING([if kernel have PageConstant defined])
-LB_LINUX_TRY_COMPILE([
-        #include <linux/mm.h>
-        #include <linux/page-flags.h>
-],[
-        #ifndef PG_constant
-        #error "Have no raid5 zcopy patch"
-        #endif
-],[
-        AC_MSG_RESULT(yes)
-        AC_DEFINE(HAVE_PAGE_CONSTANT, 1, [kernel have PageConstant supported])
-],[
-        AC_MSG_RESULT(no);
-])
-])
-
 # 2.6.24
 
 # 2.6.24 has bio_endio with 2 args
 # 2.6.24
 
 # 2.6.24 has bio_endio with 2 args
@@ -1407,9 +1379,6 @@ AC_DEFUN([LC_PROG_LINUX],
          LC_CONFIG_RMTCLIENT
          LC_CONFIG_GSS
 
          LC_CONFIG_RMTCLIENT
          LC_CONFIG_GSS
 
-         # raid5-zerocopy patch
-         LC_PAGE_CONSTANT
-
          # 2.6.24
          LC_BIO_ENDIO_2ARG
          LC_PROCFS_DELETED
          # 2.6.24
          LC_BIO_ENDIO_2ARG
          LC_PROCFS_DELETED
index fde470a..7da40f0 100644 (file)
 /* ext_depth() */
 #include <ldiskfs/ldiskfs_extents.h>
 
 /* ext_depth() */
 #include <ldiskfs/ldiskfs_extents.h>
 
-#ifndef HAVE_PAGE_CONSTANT
-#define mapping_cap_page_constant_write(mapping) 0
-#define SetPageConstant(page) do {} while (0)
-#define ClearPageConstant(page) do {} while (0)
-#endif
-
 static int __osd_init_iobuf(struct osd_device *d, struct osd_iobuf *iobuf,
                            int rw, int line, int pages)
 {
 static int __osd_init_iobuf(struct osd_device *d, struct osd_iobuf *iobuf,
                            int rw, int line, int pages)
 {
@@ -190,18 +184,9 @@ static int dio_complete_routine(struct bio *bio, unsigned int done, int error)
                         if (likely(error == 0))
                                 SetPageUptodate(bvl->bv_page);
                         LASSERT(PageLocked(bvl->bv_page));
                         if (likely(error == 0))
                                 SetPageUptodate(bvl->bv_page);
                         LASSERT(PageLocked(bvl->bv_page));
-                        ClearPageConstant(bvl->bv_page);
                 }
                 cfs_atomic_dec(&iobuf->dr_dev->od_r_in_flight);
         } else {
                 }
                 cfs_atomic_dec(&iobuf->dr_dev->od_r_in_flight);
         } else {
-                struct page *p = iobuf->dr_pages[0];
-                if (p->mapping) {
-                        if (mapping_cap_page_constant_write(p->mapping)) {
-                                bio_for_each_segment(bvl, bio, i) {
-                                        ClearPageConstant(bvl->bv_page);
-                                }
-                        }
-                }
                 cfs_atomic_dec(&iobuf->dr_dev->od_w_in_flight);
         }
 
                 cfs_atomic_dec(&iobuf->dr_dev->od_w_in_flight);
         }
 
@@ -332,15 +317,6 @@ static int osd_do_bio(struct osd_device *osd, struct inode *inode,
                                 sector_bits))
                                 nblocks++;
 
                                 sector_bits))
                                 nblocks++;
 
-                        /* I only set the page to be constant only if it
-                         * is mapped to a contiguous underlying disk block(s).
-                         * It will then make sure the corresponding device
-                         * cache of raid5 will be overwritten by this page.
-                         * - jay */
-                        if (iobuf->dr_rw && (nblocks == blocks_per_page) &&
-                            mapping_cap_page_constant_write(inode->i_mapping))
-                                SetPageConstant(page);
-
                         if (bio != NULL &&
                             can_be_merged(bio, sector) &&
                             bio_add_page(bio, page,
                         if (bio != NULL &&
                             can_be_merged(bio, sector) &&
                             bio_add_page(bio, page,