aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nilfs2
diff options
context:
space:
mode:
authorRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>2010-04-02 05:02:33 -0400
committerRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>2010-05-09 22:32:30 -0400
commit277a6a34175dcb0ee98dceee619e0e3190347a25 (patch)
treebda68b681972c608b78de87f5e856a649f2a04e7 /fs/nilfs2
parent73bb48869b14fd5094b9ec173a2bf86bc0e464d4 (diff)
nilfs2: change default of 'errors' mount option to 'remount-ro' mode
Like ext3, nilfs has 'errors' mount option to allow specifying desired behavior on severe errors. Currently, the default action is 'errors=continue' and has potential to advance filesystem corruption for severe errors. This will change the action to 'errors=remount-ro' to avoid the issue. Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Diffstat (limited to 'fs/nilfs2')
-rw-r--r--fs/nilfs2/super.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/nilfs2/super.c b/fs/nilfs2/super.c
index 48145f505a6..0b1758bf072 100644
--- a/fs/nilfs2/super.c
+++ b/fs/nilfs2/super.c
@@ -470,10 +470,10 @@ static int nilfs_show_options(struct seq_file *seq, struct vfsmount *vfs)
470 if (nilfs_test_opt(sbi, SNAPSHOT)) 470 if (nilfs_test_opt(sbi, SNAPSHOT))
471 seq_printf(seq, ",cp=%llu", 471 seq_printf(seq, ",cp=%llu",
472 (unsigned long long int)sbi->s_snapshot_cno); 472 (unsigned long long int)sbi->s_snapshot_cno);
473 if (nilfs_test_opt(sbi, ERRORS_RO))
474 seq_printf(seq, ",errors=remount-ro");
475 if (nilfs_test_opt(sbi, ERRORS_PANIC)) 473 if (nilfs_test_opt(sbi, ERRORS_PANIC))
476 seq_printf(seq, ",errors=panic"); 474 seq_printf(seq, ",errors=panic");
475 if (nilfs_test_opt(sbi, ERRORS_CONT))
476 seq_printf(seq, ",errors=continue");
477 if (nilfs_test_opt(sbi, STRICT_ORDER)) 477 if (nilfs_test_opt(sbi, STRICT_ORDER))
478 seq_printf(seq, ",order=strict"); 478 seq_printf(seq, ",order=strict");
479 if (nilfs_test_opt(sbi, NORECOVERY)) 479 if (nilfs_test_opt(sbi, NORECOVERY))
@@ -631,7 +631,7 @@ nilfs_set_default_options(struct nilfs_sb_info *sbi,
631 struct nilfs_super_block *sbp) 631 struct nilfs_super_block *sbp)
632{ 632{
633 sbi->s_mount_opt = 633 sbi->s_mount_opt =
634 NILFS_MOUNT_ERRORS_CONT | NILFS_MOUNT_BARRIER; 634 NILFS_MOUNT_ERRORS_RO | NILFS_MOUNT_BARRIER;
635} 635}
636 636
637static int nilfs_setup_super(struct nilfs_sb_info *sbi) 637static int nilfs_setup_super(struct nilfs_sb_info *sbi)