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>
-#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
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
/* 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)
{
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);
}
- /* 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,