Commit 277a6a34 authored by Ryusuke Konishi's avatar Ryusuke Konishi

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: default avatarRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
parent 73bb4886
...@@ -50,8 +50,8 @@ NILFS2 supports the following mount options: ...@@ -50,8 +50,8 @@ NILFS2 supports the following mount options:
(*) == default (*) == default
nobarrier Disables barriers. nobarrier Disables barriers.
errors=continue(*) Keep going on a filesystem error. errors=continue Keep going on a filesystem error.
errors=remount-ro Remount the filesystem read-only on an error. errors=remount-ro(*) Remount the filesystem read-only on an error.
errors=panic Panic and halt the machine if an error occurs. errors=panic Panic and halt the machine if an error occurs.
cp=n Specify the checkpoint-number of the snapshot to be cp=n Specify the checkpoint-number of the snapshot to be
mounted. Checkpoints and snapshots are listed by lscp mounted. Checkpoints and snapshots are listed by lscp
......
...@@ -470,10 +470,10 @@ static int nilfs_show_options(struct seq_file *seq, struct vfsmount *vfs) ...@@ -470,10 +470,10 @@ static int nilfs_show_options(struct seq_file *seq, struct vfsmount *vfs)
if (nilfs_test_opt(sbi, SNAPSHOT)) if (nilfs_test_opt(sbi, SNAPSHOT))
seq_printf(seq, ",cp=%llu", seq_printf(seq, ",cp=%llu",
(unsigned long long int)sbi->s_snapshot_cno); (unsigned long long int)sbi->s_snapshot_cno);
if (nilfs_test_opt(sbi, ERRORS_RO))
seq_printf(seq, ",errors=remount-ro");
if (nilfs_test_opt(sbi, ERRORS_PANIC)) if (nilfs_test_opt(sbi, ERRORS_PANIC))
seq_printf(seq, ",errors=panic"); seq_printf(seq, ",errors=panic");
if (nilfs_test_opt(sbi, ERRORS_CONT))
seq_printf(seq, ",errors=continue");
if (nilfs_test_opt(sbi, STRICT_ORDER)) if (nilfs_test_opt(sbi, STRICT_ORDER))
seq_printf(seq, ",order=strict"); seq_printf(seq, ",order=strict");
if (nilfs_test_opt(sbi, NORECOVERY)) if (nilfs_test_opt(sbi, NORECOVERY))
...@@ -631,7 +631,7 @@ nilfs_set_default_options(struct nilfs_sb_info *sbi, ...@@ -631,7 +631,7 @@ nilfs_set_default_options(struct nilfs_sb_info *sbi,
struct nilfs_super_block *sbp) struct nilfs_super_block *sbp)
{ {
sbi->s_mount_opt = sbi->s_mount_opt =
NILFS_MOUNT_ERRORS_CONT | NILFS_MOUNT_BARRIER; NILFS_MOUNT_ERRORS_RO | NILFS_MOUNT_BARRIER;
} }
static int nilfs_setup_super(struct nilfs_sb_info *sbi) static int nilfs_setup_super(struct nilfs_sb_info *sbi)
......
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