* [PATCH 2.6.18] ext2: errors behaviour fix
@ 2006-10-04 7:51 Vasily Averin
0 siblings, 0 replies; only message in thread
From: Vasily Averin @ 2006-10-04 7:51 UTC (permalink / raw)
To: Theodore Tso, Stephen Tweedie, Andrew Morton, adilger,
Linux Kernel Mailing List, linux-ext4, devel, cmm
Cc: Kirill Korotaev, Eric Sandeen
EXT2_ERRORS_CONTINUE should be read from the superblock as default value for
error behaviour.
parse_option() should clean the alternative options and should not change
default value taken from the superblock.
Signed-off-by: Vasily Averin <vvs@sw.ru>
Acked-by: Kirill Korotaev <dev@openvz.org>
--- linux-2.6.18/fs/ext2/super.c.e2erop 2006-09-20 07:42:06.000000000 +0400
+++ linux-2.6.18/fs/ext2/super.c 2006-10-03 15:50:31.000000000 +0400
@@ -365,7 +365,6 @@ static int parse_options (char * options
{
char * p;
substring_t args[MAX_OPT_ARGS];
- unsigned long kind = EXT2_MOUNT_ERRORS_CONT;
int option;
if (!options)
@@ -405,13 +404,19 @@ static int parse_options (char * options
/* *sb_block = match_int(&args[0]); */
break;
case Opt_err_panic:
- kind = EXT2_MOUNT_ERRORS_PANIC;
+ clear_opt (sbi->s_mount_opt, ERRORS_CONT);
+ clear_opt (sbi->s_mount_opt, ERRORS_RO);
+ set_opt (sbi->s_mount_opt, ERRORS_PANIC);
break;
case Opt_err_ro:
- kind = EXT2_MOUNT_ERRORS_RO;
+ clear_opt (sbi->s_mount_opt, ERRORS_CONT);
+ clear_opt (sbi->s_mount_opt, ERRORS_PANIC);
+ set_opt (sbi->s_mount_opt, ERRORS_RO);
break;
case Opt_err_cont:
- kind = EXT2_MOUNT_ERRORS_CONT;
+ clear_opt (sbi->s_mount_opt, ERRORS_RO);
+ clear_opt (sbi->s_mount_opt, ERRORS_PANIC);
+ set_opt (sbi->s_mount_opt, ERRORS_CONT);
break;
case Opt_nouid32:
set_opt (sbi->s_mount_opt, NO_UID32);
@@ -490,7 +495,6 @@ static int parse_options (char * options
return 0;
}
}
- sbi->s_mount_opt |= kind;
return 1;
}
@@ -710,6 +714,8 @@ static int ext2_fill_super(struct super_
set_opt(sbi->s_mount_opt, ERRORS_PANIC);
else if (le16_to_cpu(sbi->s_es->s_errors) == EXT2_ERRORS_RO)
set_opt(sbi->s_mount_opt, ERRORS_RO);
+ else
+ set_opt(sbi->s_mount_opt, ERRORS_CONT);
sbi->s_resuid = le16_to_cpu(es->s_def_resuid);
sbi->s_resgid = le16_to_cpu(es->s_def_resgid);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-10-04 7:51 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-04 7:51 [PATCH 2.6.18] ext2: errors behaviour fix Vasily Averin
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.