lkml.org 
[lkml]   [2004]   [Oct]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH 1/2] 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: Jeff Mahoney <jeffm@novell.com>

diff -ruPX dontdiff linux-2.6.8/fs/reiserfs/super.c linux-2.6.8.fix/fs/reiserfs/super.c
--- linux-2.6.8/fs/reiserfs/super.c 2004-10-08 16:46:09.070660248 -0400
+++ linux-2.6.8.fix/fs/reiserfs/super.c 2004-10-08 16:42:59.896419104 -0400
@@ -659,8 +659,14 @@
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;
}
diff -ruPX dontdiff linux-2.6.8/include/linux/reiserfs_fs_sb.h linux-2.6.8.fix/include/linux/reiserfs_fs_sb.h
--- linux-2.6.8/include/linux/reiserfs_fs_sb.h 2004-10-08 16:46:04.541348808 -0400
+++ linux-2.6.8.fix/include/linux/reiserfs_fs_sb.h 2004-10-08 16:31:50.641161368 -0400
@@ -467,6 +467,7 @@
REISERFS_TEST2,
REISERFS_TEST3,
REISERFS_TEST4,
+ REISERFS_UNSUPPORTED_OPT,
};

#define reiserfs_r5_hash(s) (REISERFS_SB(s)->s_mount_opt & (1 << FORCE_R5_HASH))
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-03-22 14:07    [W:0.027 / U:6.140 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site