[Pvfs2-cvs] commit by pcarns in pvfs2-1/src/kernel/linux-2.6: super.c

CVS commit program cvs at parl.clemson.edu
Thu May 1 14:18:18 EDT 2008


Update of /projects/cvsroot/pvfs2-1/src/kernel/linux-2.6
In directory parlweb1:/tmp/cvs-serv32251

Modified Files:
	super.c 
Log Message:
make the mount command fail (rather than ignore silently) if someone tries 
to use a mount option that is not supported


Index: super.c
===================================================================
RCS file: /projects/cvsroot/pvfs2-1/src/kernel/linux-2.6/super.c,v
diff -p -u -r1.97 -r1.98
--- super.c	19 Feb 2008 17:38:09 -0000	1.97
+++ super.c	1 May 2008 18:18:18 -0000	1.98
@@ -149,6 +149,7 @@ static int parse_mount_options(
             /* option string did not match any of the known keywords */
             if (j == num_possible_keywords)
             {
+#ifdef PVFS2_LINUX_KERNEL_2_4
                 /* assume we have a device name */
                 if (got_device == 0)
                 {
@@ -167,6 +168,13 @@ static int parse_mount_options(
                     gossip_debug(GOSSIP_SUPER_DEBUG, "pvfs2: multiple device names specified: "
                                 "ignoring %s\n", options[i]);
                 }
+#else
+                /* in the 2.6 kernel, we don't pass device name through this
+                 * path; we must have gotten an unsupported option.
+                 */
+                gossip_err("Error: mount option [%s] is not supported.\n", options[i]);
+                return(-EINVAL);
+#endif
             }
         }
     }



More information about the Pvfs2-cvs mailing list