]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] reiserfs: support for REISERFS_UNSUPPORTED_OPT notation
authorJeff Mahoney <jeffm@csh.rit.edu>
Wed, 20 Oct 2004 01:42:56 +0000 (18:42 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Wed, 20 Oct 2004 01:42:56 +0000 (18:42 -0700)
This patch adds a REISERFS_UNSUPPORTED_OPT flag to denote when a mount
option is allowable, but is unsupported in the running configuration.  This
allows the potential for the set of mount options to be consistent,
regardless of what features the kernel is compiled with.

Rather than failing the mount, a warning is issued and the mount succeeds.

Signed-off-by: Jeff Mahoney <jeffm@novell.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
fs/reiserfs/super.c
include/linux/reiserfs_fs_sb.h

index 3e7d7e0845e8a84ba36f08f20855a97246b99e21..b96aa702660ed4e448e81db9e4b561aaa0b4745e 100644 (file)
@@ -662,8 +662,14 @@ static int reiserfs_getopt ( struct super_block * s, char ** cur, opt_desc_t * o
     for (opt = opts; opt->option_name; opt ++) {
        if (!strncmp (p, opt->option_name, strlen (opt->option_name))) {
            if (bit_flags) {
-               *bit_flags &= ~opt->clrmask;
-               *bit_flags |= opt->setmask;
+                if (opt->clrmask == (1 << REISERFS_UNSUPPORTED_OPT))
+                    reiserfs_warning (s, "%s not supported.", p);
+                else
+                    *bit_flags &= ~opt->clrmask;
+                if (opt->setmask == (1 << REISERFS_UNSUPPORTED_OPT))
+                    reiserfs_warning (s, "%s not supported.", p);
+                else
+                    *bit_flags |= opt->setmask;
            }
            break;
        }
index 891418bb525a695df55080c9e9c51571ec853e7b..ba465f763066f04cec0aefd00b99b8262288ada0 100644 (file)
@@ -467,6 +467,7 @@ enum reiserfs_mount_options {
     REISERFS_TEST2,
     REISERFS_TEST3,
     REISERFS_TEST4,
+    REISERFS_UNSUPPORTED_OPT,
 };
 
 #define reiserfs_r5_hash(s) (REISERFS_SB(s)->s_mount_opt & (1 << FORCE_R5_HASH))