diff options
Diffstat (limited to 'fs/ext4/super.c')
-rw-r--r-- | fs/ext4/super.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/fs/ext4/super.c b/fs/ext4/super.c index 79bd3989e84f..014677b8e224 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c | |||
@@ -778,6 +778,9 @@ static int ext4_show_options(struct seq_file *seq, struct vfsmount *vfs) | |||
778 | seq_printf(seq, ",inode_readahead_blks=%u", | 778 | seq_printf(seq, ",inode_readahead_blks=%u", |
779 | sbi->s_inode_readahead_blks); | 779 | sbi->s_inode_readahead_blks); |
780 | 780 | ||
781 | if (test_opt(sb, DATA_ERR_ABORT)) | ||
782 | seq_puts(seq, ",data_err=abort"); | ||
783 | |||
781 | ext4_show_quota_options(seq, sb); | 784 | ext4_show_quota_options(seq, sb); |
782 | return 0; | 785 | return 0; |
783 | } | 786 | } |
@@ -907,6 +910,7 @@ enum { | |||
907 | Opt_commit, Opt_journal_update, Opt_journal_inum, Opt_journal_dev, | 910 | Opt_commit, Opt_journal_update, Opt_journal_inum, Opt_journal_dev, |
908 | Opt_journal_checksum, Opt_journal_async_commit, | 911 | Opt_journal_checksum, Opt_journal_async_commit, |
909 | Opt_abort, Opt_data_journal, Opt_data_ordered, Opt_data_writeback, | 912 | Opt_abort, Opt_data_journal, Opt_data_ordered, Opt_data_writeback, |
913 | Opt_data_err_abort, Opt_data_err_ignore, | ||
910 | Opt_usrjquota, Opt_grpjquota, Opt_offusrjquota, Opt_offgrpjquota, | 914 | Opt_usrjquota, Opt_grpjquota, Opt_offusrjquota, Opt_offgrpjquota, |
911 | Opt_jqfmt_vfsold, Opt_jqfmt_vfsv0, Opt_quota, Opt_noquota, | 915 | Opt_jqfmt_vfsold, Opt_jqfmt_vfsv0, Opt_quota, Opt_noquota, |
912 | Opt_ignore, Opt_barrier, Opt_err, Opt_resize, Opt_usrquota, | 916 | Opt_ignore, Opt_barrier, Opt_err, Opt_resize, Opt_usrquota, |
@@ -953,6 +957,8 @@ static match_table_t tokens = { | |||
953 | {Opt_data_journal, "data=journal"}, | 957 | {Opt_data_journal, "data=journal"}, |
954 | {Opt_data_ordered, "data=ordered"}, | 958 | {Opt_data_ordered, "data=ordered"}, |
955 | {Opt_data_writeback, "data=writeback"}, | 959 | {Opt_data_writeback, "data=writeback"}, |
960 | {Opt_data_err_abort, "data_err=abort"}, | ||
961 | {Opt_data_err_ignore, "data_err=ignore"}, | ||
956 | {Opt_offusrjquota, "usrjquota="}, | 962 | {Opt_offusrjquota, "usrjquota="}, |
957 | {Opt_usrjquota, "usrjquota=%s"}, | 963 | {Opt_usrjquota, "usrjquota=%s"}, |
958 | {Opt_offgrpjquota, "grpjquota="}, | 964 | {Opt_offgrpjquota, "grpjquota="}, |
@@ -1187,6 +1193,12 @@ static int parse_options(char *options, struct super_block *sb, | |||
1187 | sbi->s_mount_opt |= data_opt; | 1193 | sbi->s_mount_opt |= data_opt; |
1188 | } | 1194 | } |
1189 | break; | 1195 | break; |
1196 | case Opt_data_err_abort: | ||
1197 | set_opt(sbi->s_mount_opt, DATA_ERR_ABORT); | ||
1198 | break; | ||
1199 | case Opt_data_err_ignore: | ||
1200 | clear_opt(sbi->s_mount_opt, DATA_ERR_ABORT); | ||
1201 | break; | ||
1190 | #ifdef CONFIG_QUOTA | 1202 | #ifdef CONFIG_QUOTA |
1191 | case Opt_usrjquota: | 1203 | case Opt_usrjquota: |
1192 | qtype = USRQUOTA; | 1204 | qtype = USRQUOTA; |
@@ -2535,6 +2547,10 @@ static void ext4_init_journal_params(struct super_block *sb, journal_t *journal) | |||
2535 | journal->j_flags |= JBD2_BARRIER; | 2547 | journal->j_flags |= JBD2_BARRIER; |
2536 | else | 2548 | else |
2537 | journal->j_flags &= ~JBD2_BARRIER; | 2549 | journal->j_flags &= ~JBD2_BARRIER; |
2550 | if (test_opt(sb, DATA_ERR_ABORT)) | ||
2551 | journal->j_flags |= JBD2_ABORT_ON_SYNCDATA_ERR; | ||
2552 | else | ||
2553 | journal->j_flags &= ~JBD2_ABORT_ON_SYNCDATA_ERR; | ||
2538 | spin_unlock(&journal->j_state_lock); | 2554 | spin_unlock(&journal->j_state_lock); |
2539 | } | 2555 | } |
2540 | 2556 | ||