Commit 39ef17f1 authored by Theodore Ts'o's avatar Theodore Ts'o

ext4: simplify handling of the errors=* mount options

Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
parent c64db50e
...@@ -924,6 +924,7 @@ struct ext4_inode_info { ...@@ -924,6 +924,7 @@ struct ext4_inode_info {
#define EXT4_MOUNT_ERRORS_CONT 0x00010 /* Continue on errors */ #define EXT4_MOUNT_ERRORS_CONT 0x00010 /* Continue on errors */
#define EXT4_MOUNT_ERRORS_RO 0x00020 /* Remount fs ro on errors */ #define EXT4_MOUNT_ERRORS_RO 0x00020 /* Remount fs ro on errors */
#define EXT4_MOUNT_ERRORS_PANIC 0x00040 /* Panic on errors */ #define EXT4_MOUNT_ERRORS_PANIC 0x00040 /* Panic on errors */
#define EXT4_MOUNT_ERRORS_MASK 0x00070
#define EXT4_MOUNT_MINIX_DF 0x00080 /* Mimics the Minix statfs */ #define EXT4_MOUNT_MINIX_DF 0x00080 /* Mimics the Minix statfs */
#define EXT4_MOUNT_NOLOAD 0x00100 /* Don't use existing journal*/ #define EXT4_MOUNT_NOLOAD 0x00100 /* Don't use existing journal*/
#define EXT4_MOUNT_DATA_FLAGS 0x00C00 /* Mode for data writes: */ #define EXT4_MOUNT_DATA_FLAGS 0x00C00 /* Mode for data writes: */
......
...@@ -1565,18 +1565,15 @@ static int parse_options(char *options, struct super_block *sb, ...@@ -1565,18 +1565,15 @@ static int parse_options(char *options, struct super_block *sb,
/* *sb_block = match_int(&args[0]); */ /* *sb_block = match_int(&args[0]); */
break; break;
case Opt_err_panic: case Opt_err_panic:
clear_opt(sb, ERRORS_CONT); clear_opt(sb, ERRORS_MASK);
clear_opt(sb, ERRORS_RO);
set_opt(sb, ERRORS_PANIC); set_opt(sb, ERRORS_PANIC);
break; break;
case Opt_err_ro: case Opt_err_ro:
clear_opt(sb, ERRORS_CONT); clear_opt(sb, ERRORS_MASK);
clear_opt(sb, ERRORS_PANIC);
set_opt(sb, ERRORS_RO); set_opt(sb, ERRORS_RO);
break; break;
case Opt_err_cont: case Opt_err_cont:
clear_opt(sb, ERRORS_RO); clear_opt(sb, ERRORS_MASK);
clear_opt(sb, ERRORS_PANIC);
set_opt(sb, ERRORS_CONT); set_opt(sb, ERRORS_CONT);
break; break;
case Opt_nouid32: case Opt_nouid32:
......
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