Commit 93d435ff authored by Jeff Mahoney's avatar Jeff Mahoney Committed by Linus Torvalds

[PATCH] reiserfs: support for REISERFS_UNSUPPORTED_OPT notation

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: default avatarJeff Mahoney <jeffm@novell.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 58d38e33
...@@ -662,8 +662,14 @@ static int reiserfs_getopt ( struct super_block * s, char ** cur, opt_desc_t * o ...@@ -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 ++) { for (opt = opts; opt->option_name; opt ++) {
if (!strncmp (p, opt->option_name, strlen (opt->option_name))) { if (!strncmp (p, opt->option_name, strlen (opt->option_name))) {
if (bit_flags) { if (bit_flags) {
*bit_flags &= ~opt->clrmask; if (opt->clrmask == (1 << REISERFS_UNSUPPORTED_OPT))
*bit_flags |= opt->setmask; 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; break;
} }
......
...@@ -467,6 +467,7 @@ enum reiserfs_mount_options { ...@@ -467,6 +467,7 @@ enum reiserfs_mount_options {
REISERFS_TEST2, REISERFS_TEST2,
REISERFS_TEST3, REISERFS_TEST3,
REISERFS_TEST4, REISERFS_TEST4,
REISERFS_UNSUPPORTED_OPT,
}; };
#define reiserfs_r5_hash(s) (REISERFS_SB(s)->s_mount_opt & (1 << FORCE_R5_HASH)) #define reiserfs_r5_hash(s) (REISERFS_SB(s)->s_mount_opt & (1 << FORCE_R5_HASH))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment