[Ocfs2-commits] zab commits r2638 - in branches/locking-changes: . fs/ocfs2

svn-commits at oss.oracle.com svn-commits at oss.oracle.com
Wed Oct 5 15:56:07 CDT 2005


Author: zab
Signed-off-by: mfasheh
Date: 2005-10-05 15:56:05 -0500 (Wed, 05 Oct 2005)
New Revision: 2638

Modified:
   branches/locking-changes/Config.make.in
   branches/locking-changes/configure.in
   branches/locking-changes/fs/ocfs2/Makefile
Log:
o have autoconf at least discover the need for the delete-inode-workaround
  if the full kernel tree is available

Signed-off-by: mfasheh


Modified: branches/locking-changes/Config.make.in
===================================================================
--- branches/locking-changes/Config.make.in	2005-10-04 23:31:02 UTC (rev 2637)
+++ branches/locking-changes/Config.make.in	2005-10-05 20:56:05 UTC (rev 2638)
@@ -58,6 +58,7 @@
 HAVE_SPARSE_ENDIAN_TYPES = @HAVE_SPARSE_ENDIAN_TYPES@
 HAVE_GENERIC_READLINK = @HAVE_GENERIC_READLINK@
 NEW_FOLLOW_LINK_API = @NEW_FOLLOW_LINK_API@
+GENERIC_DELETE_INODE_TRUNCATES = @GENERIC_DELETE_INODE_TRUNCATES@
 
 OCFS_DEBUG = @OCFS_DEBUG@
 

Modified: branches/locking-changes/configure.in
===================================================================
--- branches/locking-changes/configure.in	2005-10-04 23:31:02 UTC (rev 2637)
+++ branches/locking-changes/configure.in	2005-10-05 20:56:05 UTC (rev 2638)
@@ -267,6 +267,32 @@
   NEW_FOLLOW_LINK_API=yes, , [void \* (\*follow_link)])
 AC_SUBST(NEW_FOLLOW_LINK_API)
 
+# previously the workaround was always enabled unless you edited
+# fs/ocfs2/Makefile -- reverting before commits, etc; totally unreasonable.
+# This at least has a chance of working without intervention when building
+# against a full source tree.  Someone who cares could replace this with
+# a version check, I guess, though getting the right -mm is irritating.
+GENERIC_DELETE_INODE_TRUNCATES=yes
+if [ test -f $kernelsourcedir/fs/inode.c ]; then
+	AC_MSG_CHECKING(truncate call in generic_delete_inode)
+	first=`awk '(/void generic_delete_inode/) { gdi=1 } 
+		(/\<delete\(inode\);/) {if (gdi == 1) { print "delete" ; exit }}
+		(/truncate_inode_pages\(&inode/) { if (gdi == 1) {print "truncate"; exit}}' $kernelsourcedir/fs/inode.c`
+	case "$first" in
+		delete)
+			AC_MSG_RESULT(no; disabling workaround)
+			GENERIC_DELETE_INODE_TRUNCATES=
+			;;
+		truncate)
+			AC_MSG_RESULT(yes; leaving workaround enabled)
+			;;
+		*)
+			AC_MSG_RESULT(unknown; leaving workaround enabled)
+			;;
+	esac
+fi
+AC_SUBST(GENERIC_DELETE_INODE_TRUNCATES)
+
 # 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

Modified: branches/locking-changes/fs/ocfs2/Makefile
===================================================================
--- branches/locking-changes/fs/ocfs2/Makefile	2005-10-04 23:31:02 UTC (rev 2637)
+++ branches/locking-changes/fs/ocfs2/Makefile	2005-10-05 20:56:05 UTC (rev 2638)
@@ -30,7 +30,10 @@
 EXTRA_CFLAGS += -DNEW_FOLLOW_LINK_API
 endif
 
+ifdef GENERIC_DELETE_INODE_TRUNCATES
 EXTRA_CFLAGS += -DOCFS2_DELETE_INODE_WORKAROUND
+endif
+
 EXTRA_CFLAGS += -DOCFS2_CDSL
 
 #



More information about the Ocfs2-commits mailing list