From 0c69ea9f6d6d044b6463787d5a56b2384bb9663a Mon Sep 17 00:00:00 2001 From: James Simmons Date: Mon, 9 Sep 2013 14:43:58 -0400 Subject: [PATCH] LU-2800 autoconf: remove LC_PAGE_CONSTANT 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 Change-Id: I36276dfee7a6247719e716a9a304453dd519acdb Reviewed-on: http://review.whamcloud.com/5339 Reviewed-by: Bob Glossman Tested-by: Hudson Tested-by: Maloo Reviewed-by: Minh Diep Reviewed-by: Oleg Drokin --- lustre/autoconf/lustre-core.m4 | 31 ------------------------------- lustre/osd-ldiskfs/osd_io.c | 24 ------------------------ 2 files changed, 55 deletions(-) diff --git a/lustre/autoconf/lustre-core.m4 b/lustre/autoconf/lustre-core.m4 index ed73058..0950ea8 100644 --- a/lustre/autoconf/lustre-core.m4 +++ b/lustre/autoconf/lustre-core.m4 @@ -356,34 +356,6 @@ AC_DEFUN([LC_CONFIG_GSS], 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 - #include -],[ - #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 @@ -1407,9 +1379,6 @@ AC_DEFUN([LC_PROG_LINUX], LC_CONFIG_RMTCLIENT LC_CONFIG_GSS - # raid5-zerocopy patch - LC_PAGE_CONSTANT - # 2.6.24 LC_BIO_ENDIO_2ARG LC_PROCFS_DELETED diff --git a/lustre/osd-ldiskfs/osd_io.c b/lustre/osd-ldiskfs/osd_io.c index fde470a..7da40f0 100644 --- a/lustre/osd-ldiskfs/osd_io.c +++ b/lustre/osd-ldiskfs/osd_io.c @@ -60,12 +60,6 @@ /* ext_depth() */ #include -#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) { @@ -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)); - ClearPageConstant(bvl->bv_page); } 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); } @@ -332,15 +317,6 @@ static int osd_do_bio(struct osd_device *osd, struct inode *inode, 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, -- 1.8.3.1