])
])
+#
+# 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/page-flags.h>
+],[
+ PageConstant((struct page *)NULL);
+],[
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_PAGE_CONSTANT, 1, [kernel have PageConstant supported])
+],[
+ AC_MSG_RESULT(no);
+])
+])
+
# RHEL5 in FS-cache patch rename PG_checked flag
# into PG_fs_misc
AC_DEFUN([LC_PG_FS_MISC],
# 2.6.20
LC_CANCEL_DIRTY_PAGE
+
+# raid5-zerocopy patch
+LC_PAGE_CONSTANT
])
#
raid5-stripe-by-stripe-handling.patch
raid5-merge-ios.patch
raid5-serialize-ovelapping-reqs.patch
+raid5-zerocopy.patch
jbd-stats-2.6.9.patch
bitops_ext2_find_next_le_bit-2.6.patch
quota-deadlock-on-pagelock-core.patch
struct filter_iobuf *iobuf = bio->bi_private;
unsigned long flags;
+#ifdef HAVE_PAGE_CONSTANT
+ struct bio_vec *bvl;
+ int i;
+#endif
+
/* CAVEAT EMPTOR: possibly in IRQ context
* DO NOT record procfs stats here!!! */
return 0;
}
+#ifdef HAVE_PAGE_CONSTANT
+ bio_for_each_segment(bvl, bio, i)
+ ClearPageConstant(bvl->bv_page);
+#endif
+
spin_lock_irqsave(&iobuf->dr_lock, flags);
if (iobuf->dr_error == 0)
iobuf->dr_error = error;
(blocks[block_idx + i + nblocks] << sector_bits))
nblocks++;
+#ifdef HAVE_PAGE_CONSTANT
+ /* 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 ((rw == OBD_BRW_WRITE) &&
+ (nblocks == blocks_per_page) &&
+ mapping_cap_page_constant_write(inode->i_mapping))
+ SetPageConstant(page);
+#endif
+
if (bio != NULL &&
can_be_merged(bio, sector) &&
bio_add_page(bio, page,