[Ocfs2-commits] smushran commits r2154 - trunk/fs/ocfs2

svn-commits at oss.oracle.com svn-commits at oss.oracle.com
Wed Apr 20 13:24:24 CDT 2005


Author: smushran
Signed-off-by: mfasheh
Date: 2005-04-20 13:24:23 -0500 (Wed, 20 Apr 2005)
New Revision: 2154

Modified:
   trunk/fs/ocfs2/ocfs2_fs.h
   trunk/fs/ocfs2/super.c
Log:
dummy param hbok passed during mount
Signed-off-by: mfasheh

Modified: trunk/fs/ocfs2/ocfs2_fs.h
===================================================================
--- trunk/fs/ocfs2/ocfs2_fs.h	2005-04-20 18:10:31 UTC (rev 2153)
+++ trunk/fs/ocfs2/ocfs2_fs.h	2005-04-20 18:24:23 UTC (rev 2154)
@@ -174,6 +174,8 @@
 	[LOCAL_ALLOC_SYSTEM_INODE]		{ "local_alloc:%04d", OCFS2_BITMAP_FL | OCFS2_LOCAL_ALLOC_FL, S_IFREG | 0644 }
 };
 
+/* Parameter passed from mount.ocfs2 to module */
+#define OCFS2_HB_OK		"hbok"
 
 /*
  * OCFS2 directory file types.  Only the low 3 bits are used.  The

Modified: trunk/fs/ocfs2/super.c
===================================================================
--- trunk/fs/ocfs2/super.c	2005-04-20 18:10:31 UTC (rev 2153)
+++ trunk/fs/ocfs2/super.c	2005-04-20 18:24:23 UTC (rev 2154)
@@ -393,6 +393,8 @@
 	struct inode *inode = NULL;
 	ocfs_super *osb = NULL;
 
+	LOG_ENTRY_ARGS ("%p, %p, %i", sb, data, silent);
+
 	/* for now we only have one cluster/node, make sure we see it
 	 * in the heartbeat universe */
 	if (!hb_check_local_node_heartbeating()) {
@@ -400,7 +402,13 @@
 		goto read_super_error;
 	}
 
-	LOG_ENTRY_ARGS ("%p, %p, %i", sb, data, silent);
+	/* Stopgap check to ensure that mount.ocfs2 mounted the volume */
+	if (!data || strcmp(data, OCFS2_HB_OK)) {
+		status = -EINVAL;
+		if (data)
+			LOG_ERROR_ARGS("Invalid options: %s\n", (char *)data);
+		goto read_super_error;
+	}
 
 	sb->s_magic = OCFS2_SUPER_MAGIC;
 	sb->s_op = &ocfs_sops;



More information about the Ocfs2-commits mailing list