Skip to contentSkip to conversation

OCFS2-1.4: One patch change from last drop

Ocfs2-devel New Sunil Mushran 1 participant 2 messages Jan 7, 2008

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Emailing only the changed patch from the last drop.

The change makes configure error out if the kernel source is missing mainline commit 349457ccf2592c14bdf13b6706170ae2e94931b1.

Sunil

#1 lore raw

PATCH 13/30 ocfs2: Define FS_RENAME_DOES_D_MOVE

Commit 349457ccf2592c14bdf13b6706170ae2e94931b1 in mainline defines macro FS_RENAME_DOES_D_MOVE to allow fs to call d_move() during rename(). This patch allows one to build ocfs2 with kernels having/not having this change.

---
 Makefile                                    |    3 ++-
 configure.in                                |   16 ++++++++++++++++
 kapi-compat/include/fs_rename_does_d_move.h |    6 ++++++
 3 files changed, 24 insertions(+), 1 deletions(-)
 create mode 100644 kapi-compat/include/fs_rename_does_d_move.h
Makefile +2 -1
index 23af453..43cd04c 100644
@@ -17,7 +17,8 @@ KAPI_COMPAT_FILES = \
 	kapi-compat/include/umh_wait.h \
 	kapi-compat/include/inc_nlink.h \
 	kapi-compat/include/drop_nlink.h \
-	kapi-compat/include/slab.h
+	kapi-compat/include/slab.h \
+	kapi-compat/include/fs_rename_does_d_move.h
 
 PATCH_FILES =
 
configure.in +16 -0
index 11b877f..6e66d59 100644
@@ -210,6 +210,22 @@ OCFS2_CHECK_KERNEL([kmem_cache_create() with dtor arg in slab.h], slab.h,
 AC_SUBST(KMEM_CACHE_CREATE_DTOR)
 KAPI_COMPAT_HEADERS="$KAPI_COMPAT_HEADERS slab.h"
 
+fstype_compat_header=""
+OCFS2_CHECK_KERNEL([flag FS_RENAME_DOES_D_MOVE in fs.h], fs.h,
+  , fstype_compat_header="fs_rename_does_d_move.h", [FS_RENAME_DOES_D_MOVE])
+KAPI_COMPAT_HEADERS="$KAPI_COMPAT_HEADERS $fstype_compat_header"
+
+if test "x$fstype_compat_header" = "xfs_rename_does_d_move.h" ; then
+  AC_MSG_CHECKING(whether to ignore the missing vfs rename kernel patch)
+  AC_ARG_ENABLE(vfs_rename_patch_override, [  --enable-vfs-rename-patch-override=[yes/no]	Enable FS_RENAME_DOES_D_MOVE patch override [default=no]],,enable_vfs_rename_patch_override=no)
+  AC_MSG_RESULT($enable_vfs_rename_patch_override)
+  if test "x$enable_vfs_rename_patch_override" = "xno" ; then
+    AC_MSG_ERROR(Kernel source is missing mainline patch commit 349457ccf2592c14bdf13b6706170ae2e94931b1)
+  else
+    AC_MSG_WARN(Building eventhough kernel source is missing mainline patch commit 349457ccf2592c14bdf13b6706170ae2e94931b1)
+  fi
+fi
+
 # using -include has two advantages:
 #  the source doesn't need to know to include compat headers
 #  the compat header file names don't go through the search path
kapi-compat/include/fs_rename_does_d_move.h new file +6 -0
new file mode 100644
index 0000000..895ea86
@@ -0,0 +1,6 @@
+#ifndef KAPI_FSTYPE_H
+#define KAPI_FSTYPE_H
+
+#define FS_RENAME_DOES_D_MOVE	FS_ODD_RENAME
+
+#endif
Signature · 1 line
1.5.2.5