The following patch enables inode syncing on 2.6 kernels in the
nm.c file.
--rusty
Index: src/nm.c
==================================================================--- src/nm.c
(revision 32)
+++ src/nm.c (working copy)
@@ -1014,10 +1014,14 @@
lockres->master_node_num = node_num;
if (inode) {
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
+ sync_mapping_buffers(inode->i_mapping);
+#else
fsync_inode_buffers(inode);
-#if LINUX_VERSION_CODE >= LinuxVersionCode(2,4,18)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,18)
fsync_inode_data_buffers(inode);
#endif
+#endif
}
if (oin != NULL) {
lockres->lock_type = lockres->lock_state = OCFS_DLM_NO_LOCK;
@@ -1249,10 +1253,14 @@
atomic_read(seq));
if (sync_buffers) {
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
+ sync_mapping_buffers(inode->i_mapping);
+#else
fsync_inode_buffers(inode);
-#if LINUX_VERSION_CODE >= LinuxVersionCode(2,4,18)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,18)
fsync_inode_data_buffers(inode);
#endif
+#endif
}
}