[Ocfs2-tools-commits] manish commits r861 - in trunk: . libocfs2 libocfs2/include mkfs.ocfs2

svn-commits at oss.oracle.com svn-commits at oss.oracle.com
Thu Apr 28 16:52:41 CDT 2005


Author: manish
Date: 2005-04-28 16:52:39 -0500 (Thu, 28 Apr 2005)
New Revision: 861

Modified:
   trunk/Config.make.in
   trunk/configure.in
   trunk/libocfs2/Makefile
   trunk/libocfs2/include/ocfs2_fs.h
   trunk/mkfs.ocfs2/Makefile
   trunk/mkfs.ocfs2/mkfs.c
Log:
Endian mismatch compatibility flag support for s390. Will be removed once
we're big endian safe.


Modified: trunk/Config.make.in
===================================================================
--- trunk/Config.make.in	2005-04-28 21:51:43 UTC (rev 860)
+++ trunk/Config.make.in	2005-04-28 21:52:39 UTC (rev 861)
@@ -66,3 +66,5 @@
 OCFS_DEBUG = @OCFS_DEBUG@
 
 OCFS2_DEBUG_EXE = @OCFS2_DEBUG_EXE@
+
+B0RKEN_ENDIAN = @B0RKEN_ENDIAN@

Modified: trunk/configure.in
===================================================================
--- trunk/configure.in	2005-04-28 21:51:43 UTC (rev 860)
+++ trunk/configure.in	2005-04-28 21:52:39 UTC (rev 861)
@@ -93,6 +93,14 @@
 
 AC_C_BIGENDIAN()
 
+B0RKEN_ENDIAN=
+case "$host_cpu" in
+  s390x)
+    B0RKEN_ENDIAN=-DCONFIG_ARCH_S390=1
+    ;;
+esac
+AC_SUBST(B0RKEN_ENDIAN)
+
 AC_MSG_CHECKING(for debug executables)
 AC_ARG_ENABLE(debugexe, [  --enable-debugexe=[yes/no]     Enable debug executables for library source files [default=no]],,enable_debugexe=no)
 OCFS2_DEBUG_EXE=

Modified: trunk/libocfs2/Makefile
===================================================================
--- trunk/libocfs2/Makefile	2005-04-28 21:51:43 UTC (rev 860)
+++ trunk/libocfs2/Makefile	2005-04-28 21:52:39 UTC (rev 861)
@@ -23,6 +23,7 @@
 
 CFLAGS = $(OPTS) $(WARNINGS) -fPIC
 CPPFLAGS += -DOCFS2_FLAT_INCLUDES -DO2DLM_FLAT_INCLUDES -DO2CB_FLAT_INCLUDES
+CPPFLAGS += $(B0RKEN_ENDIAN)
 
 ifneq ($(OCFS2_DEBUG_EXE),)
 DEBUG_EXE_FILES = $(shell awk '/DEBUG_EXE/{if (k[FILENAME] == 0) {print FILENAME; k[FILENAME] = 1;}}' $(CFILES))

Modified: trunk/libocfs2/include/ocfs2_fs.h
===================================================================
--- trunk/libocfs2/include/ocfs2_fs.h	2005-04-28 21:51:43 UTC (rev 860)
+++ trunk/libocfs2/include/ocfs2_fs.h	2005-04-28 21:52:39 UTC (rev 861)
@@ -86,10 +86,21 @@
 	OCFS2_SB(sb)->s_feature_incompat &= ~(mask)
 
 #define OCFS2_FEATURE_COMPAT_SUPP	0
-#define OCFS2_FEATURE_INCOMPAT_SUPP	0
 #define OCFS2_FEATURE_RO_COMPAT_SUPP	0
 
+/* We're not big endian safe yet. But it has been decreed that the
+ * unwashed zLinux masses must be appeased, lest they storm the castle
+ * with rakes and pitchforks. Thus...
+ */
+#ifdef CONFIG_ARCH_S390
+#define OCFS2_FEATURE_INCOMPAT_B0RKEN_ENDIAN	0x0001
 
+#define OCFS2_FEATURE_INCOMPAT_SUPP	OCFS2_FEATURE_INCOMPAT_B0RKEN_ENDIAN
+#else
+#define OCFS2_FEATURE_INCOMPAT_SUPP	0
+#endif
+
+
 /*
  * Flags on ocfs2_dinode.i_flags
  */

Modified: trunk/mkfs.ocfs2/Makefile
===================================================================
--- trunk/mkfs.ocfs2/Makefile	2005-04-28 21:51:43 UTC (rev 860)
+++ trunk/mkfs.ocfs2/Makefile	2005-04-28 21:52:39 UTC (rev 861)
@@ -12,6 +12,7 @@
 endif
 
 CFLAGS = $(OPTS) $(WARNINGS) 
+CPPFLAGS += $(B0RKEN_ENDIAN)
 
 sbindir = $(root_sbindir)
 SBIN_PROGRAMS = mkfs.ocfs2

Modified: trunk/mkfs.ocfs2/mkfs.c
===================================================================
--- trunk/mkfs.ocfs2/mkfs.c	2005-04-28 21:51:43 UTC (rev 860)
+++ trunk/mkfs.ocfs2/mkfs.c	2005-04-28 21:52:39 UTC (rev 861)
@@ -1451,6 +1451,11 @@
 	di->id2.i_super.s_max_nodes = cpu_to_le16(s->initial_nodes);
 	di->id2.i_super.s_first_cluster_group = cpu_to_le64(s->first_cluster_group_blkno);
 
+#ifdef CONFIG_ARCH_S390
+	di->id2.i_super.s_feature_incompat =
+		cpu_to_le32(OCFS2_FEATURE_INCOMPAT_B0RKEN_ENDIAN);
+#endif
+
 	strcpy(di->id2.i_super.s_label, s->vol_label);
 	memcpy(di->id2.i_super.s_uuid, s->uuid, 16);
 



More information about the Ocfs2-tools-commits mailing list