[Ocfs2-commits] mfasheh commits r3055 - in branches/ocfs2-1.2: . fs/ocfs2

svn-commits at oss.oracle.com svn-commits at oss.oracle.com
Mon Aug 27 15:07:18 PDT 2007


Author: mfasheh
Date: 2007-08-27 15:07:16 -0700 (Mon, 27 Aug 2007)
New Revision: 3055

Modified:
   branches/ocfs2-1.2/Config.make.in
   branches/ocfs2-1.2/configure.in
   branches/ocfs2-1.2/fs/ocfs2/Makefile
   branches/ocfs2-1.2/fs/ocfs2/super.c
Log:
ocfs2: detect and use MS_LOOP_NO_AOPS

Some vendor kernels provide a superblock flag, MS_LOOP_NO_AOPS which will
enable writable loopback support for ocfs2 1.2. Detect that flag and use it
if possible.

Signed-off-by: smushran



Modified: branches/ocfs2-1.2/Config.make.in
===================================================================
--- branches/ocfs2-1.2/Config.make.in	2007-07-30 23:57:21 UTC (rev 3054)
+++ branches/ocfs2-1.2/Config.make.in	2007-08-27 22:07:16 UTC (rev 3055)
@@ -62,6 +62,7 @@
 STATFS_GETS_SB = @STATFS_GETS_SB@
 INODE_HAS_BLKSIZE  = @INODE_HAS_BLKSIZE@
 INODE_HAS_PRIVATE  = @INODE_HAS_PRIVATE@
+HAS_MS_LOOP_NO_AOPS  = @HAS_MS_LOOP_NO_AOPS@
 
 BUILD_DEBUGFS_BACKPORT = @BUILD_DEBUGFS_BACKPORT@
 BUILD_CONFIGFS = @BUILD_CONFIGFS@

Modified: branches/ocfs2-1.2/configure.in
===================================================================
--- branches/ocfs2-1.2/configure.in	2007-07-30 23:57:21 UTC (rev 3054)
+++ branches/ocfs2-1.2/configure.in	2007-08-27 22:07:16 UTC (rev 3055)
@@ -279,6 +279,12 @@
   INODE_HAS_PRIVATE=yes, , [i_private])
 AC_SUBST(INODE_HAS_PRIVATE)
 
+HAS_MS_LOOP_NO_AOPS=
+OCFS2_CHECK_KERNEL([MS_LOOP_NO_AOPS flag defined], fs.h,
+  HAS_MS_LOOP_NO_AOPS==yes, , [MS_LOOP_NO_AOPS])
+AC_SUBST(HAS_MS_LOOP_NO_AOPS)
+
+
 # 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/ocfs2-1.2/fs/ocfs2/Makefile
===================================================================
--- branches/ocfs2-1.2/fs/ocfs2/Makefile	2007-07-30 23:57:21 UTC (rev 3054)
+++ branches/ocfs2-1.2/fs/ocfs2/Makefile	2007-08-27 22:07:16 UTC (rev 3055)
@@ -63,6 +63,10 @@
 EXTRA_CFLAGS += -DINODE_HAS_PRIVATE
 endif
 
+ifdef HAS_MS_LOOP_NO_AOPS
+EXTRA_CFLAGS += -DHAS_MS_LOOP_NO_AOPS
+endif
+
 EXTRA_CFLAGS += -DOCFS2_CDSL
 
 #

Modified: branches/ocfs2-1.2/fs/ocfs2/super.c
===================================================================
--- branches/ocfs2-1.2/fs/ocfs2/super.c	2007-07-30 23:57:21 UTC (rev 3054)
+++ branches/ocfs2-1.2/fs/ocfs2/super.c	2007-08-27 22:07:16 UTC (rev 3055)
@@ -657,6 +657,10 @@
 	atomic_set(&osb->vol_state, VOLUME_MOUNTED);
 	wake_up(&osb->osb_mount_event);
 
+#ifdef HAS_MS_LOOP_NO_AOPS
+	/* OCFS2's prepare and commit write operations don't do any locking. */
+	sb->s_flags |= MS_LOOP_NO_AOPS;
+#endif
 	mlog_exit(status);
 	return status;
 




More information about the Ocfs2-commits mailing list