diff options
author | Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> | 2008-02-06 04:40:14 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-06 13:41:20 -0500 |
commit | 1eca93f9cafdec4a332ace9b0fc0d3886d430c28 (patch) | |
tree | 18eb1ea370ef6464c18a218c81cf65327535aa57 /fs | |
parent | feda58d37ae0efe22e711a74e26fb541d4eb1baa (diff) |
ext3: change the default behaviour on error
ext3 file system was by default ignoring errors and continuing. This is
not a good default as continuing on error could lead to file system
corruption. Change the default to mark the file system readonly. Debian
and ubuntu already does this as the default in their fstab.
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Cc: <linux-ext4@vger.kernel.org>
Cc: Eric Sandeen <sandeen@redhat.com>
Cc: Jan Kara <jack@ucw.cz>
Cc: Dave Jones <davej@codemonkey.org.uk>
Cc: Chuck Ebbert <cebbert@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/ext3/super.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/fs/ext3/super.c b/fs/ext3/super.c index f3675cc630e9..15e75139b7e8 100644 --- a/fs/ext3/super.c +++ b/fs/ext3/super.c | |||
@@ -575,16 +575,16 @@ static int ext3_show_options(struct seq_file *seq, struct vfsmount *vfs) | |||
575 | le16_to_cpu(es->s_def_resgid) != EXT3_DEF_RESGID) { | 575 | le16_to_cpu(es->s_def_resgid) != EXT3_DEF_RESGID) { |
576 | seq_printf(seq, ",resgid=%u", sbi->s_resgid); | 576 | seq_printf(seq, ",resgid=%u", sbi->s_resgid); |
577 | } | 577 | } |
578 | if (test_opt(sb, ERRORS_CONT)) { | 578 | if (test_opt(sb, ERRORS_RO)) { |
579 | int def_errors = le16_to_cpu(es->s_errors); | 579 | int def_errors = le16_to_cpu(es->s_errors); |
580 | 580 | ||
581 | if (def_errors == EXT3_ERRORS_PANIC || | 581 | if (def_errors == EXT3_ERRORS_PANIC || |
582 | def_errors == EXT3_ERRORS_RO) { | 582 | def_errors == EXT3_ERRORS_CONTINUE) { |
583 | seq_puts(seq, ",errors=continue"); | 583 | seq_puts(seq, ",errors=remount-ro"); |
584 | } | 584 | } |
585 | } | 585 | } |
586 | if (test_opt(sb, ERRORS_RO)) | 586 | if (test_opt(sb, ERRORS_CONT)) |
587 | seq_puts(seq, ",errors=remount-ro"); | 587 | seq_puts(seq, ",errors=continue"); |
588 | if (test_opt(sb, ERRORS_PANIC)) | 588 | if (test_opt(sb, ERRORS_PANIC)) |
589 | seq_puts(seq, ",errors=panic"); | 589 | seq_puts(seq, ",errors=panic"); |
590 | if (test_opt(sb, NO_UID32)) | 590 | if (test_opt(sb, NO_UID32)) |
@@ -1583,10 +1583,10 @@ static int ext3_fill_super (struct super_block *sb, void *data, int silent) | |||
1583 | 1583 | ||
1584 | if (le16_to_cpu(sbi->s_es->s_errors) == EXT3_ERRORS_PANIC) | 1584 | if (le16_to_cpu(sbi->s_es->s_errors) == EXT3_ERRORS_PANIC) |
1585 | set_opt(sbi->s_mount_opt, ERRORS_PANIC); | 1585 | set_opt(sbi->s_mount_opt, ERRORS_PANIC); |
1586 | else if (le16_to_cpu(sbi->s_es->s_errors) == EXT3_ERRORS_RO) | 1586 | else if (le16_to_cpu(sbi->s_es->s_errors) == EXT3_ERRORS_CONTINUE) |
1587 | set_opt(sbi->s_mount_opt, ERRORS_RO); | ||
1588 | else | ||
1589 | set_opt(sbi->s_mount_opt, ERRORS_CONT); | 1587 | set_opt(sbi->s_mount_opt, ERRORS_CONT); |
1588 | else | ||
1589 | set_opt(sbi->s_mount_opt, ERRORS_RO); | ||
1590 | 1590 | ||
1591 | sbi->s_resuid = le16_to_cpu(es->s_def_resuid); | 1591 | sbi->s_resuid = le16_to_cpu(es->s_def_resuid); |
1592 | sbi->s_resgid = le16_to_cpu(es->s_def_resgid); | 1592 | sbi->s_resgid = le16_to_cpu(es->s_def_resgid); |