Home Home > GIT Browse > SLE12-SP3-AZURE
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Marek <mmarek@suse.cz>2016-03-30 11:15:05 +0200
committerMichal Marek <mmarek@suse.cz>2016-03-30 11:15:05 +0200
commit4e11b552f23a15103aabd3fd50866f5ef19eff15 (patch)
tree5a3ba75be1ca987cb04ee0d433f0a280938079df
parent730c5a0718425fef127ca5a1fd79ec5f9905c1d4 (diff)
parentc5d48f9e69456030b71edd0517ba1aaaa7cb5543 (diff)
Merge branch 'users/alnovak/SLE12-SP2/for-next' into SLE12-SP2rpm-4.4.6-30
Pull ext4 fix from Aleš Novák (bsc#969735).
-rw-r--r--patches.fixes/ext4-fix-print-mountopt-data_err-abort-correctly.patch60
-rw-r--r--series.conf1
2 files changed, 61 insertions, 0 deletions
diff --git a/patches.fixes/ext4-fix-print-mountopt-data_err-abort-correctly.patch b/patches.fixes/ext4-fix-print-mountopt-data_err-abort-correctly.patch
new file mode 100644
index 0000000000..982c6a1dd6
--- /dev/null
+++ b/patches.fixes/ext4-fix-print-mountopt-data_err-abort-correctly.patch
@@ -0,0 +1,60 @@
+From 8dace50c38017df0948f46275ff605932b375783 Mon Sep 17 00:00:00 2001
+From: Ales Novak <alnovak@suse.cz>
+Date: Wed, 9 Mar 2016 11:45:41 +0100
+References: bsc#969735
+Patch-mainline: v4.5-rc2
+Git-commit: 7915a861c01839a05eb7346023741742c4d2135e
+Subject: [PATCH] fix: print ext4 mountopt data_err=abort correctly
+
+If data_err=abort option is specified for an ext3/ext4 mount,
+/proc/mounts does show it as "(null)". This is caused by token2str()
+returning NULL for Opt_data_err_abort (due to its pattern containing
+'=').
+
+This is perhaps more logical solution than the previously submitted,
+handling these 'data_err=' options in other way than MOPT_SET.
+
+Signed-off-by: Ales Novak <alnovak@suse.cz>
+---
+ fs/ext4/super.c | 10 ++++++++--
+ 1 file changed, 8 insertions(+), 2 deletions(-)
+
+diff --git a/fs/ext4/super.c b/fs/ext4/super.c
+index a7b6aaa..b78c4e1 100644
+--- a/fs/ext4/super.c
++++ b/fs/ext4/super.c
+@@ -1394,9 +1394,9 @@ static const struct mount_opts {
+ {Opt_err_ro, EXT4_MOUNT_ERRORS_RO, MOPT_SET | MOPT_CLEAR_ERR},
+ {Opt_err_cont, EXT4_MOUNT_ERRORS_CONT, MOPT_SET | MOPT_CLEAR_ERR},
+ {Opt_data_err_abort, EXT4_MOUNT_DATA_ERR_ABORT,
+- MOPT_NO_EXT2 | MOPT_SET},
++ MOPT_NO_EXT2},
+ {Opt_data_err_ignore, EXT4_MOUNT_DATA_ERR_ABORT,
+- MOPT_NO_EXT2 | MOPT_CLEAR},
++ MOPT_NO_EXT2},
+ {Opt_barrier, EXT4_MOUNT_BARRIER, MOPT_SET},
+ {Opt_nobarrier, EXT4_MOUNT_BARRIER, MOPT_CLEAR},
+ {Opt_noauto_da_alloc, EXT4_MOUNT_NO_AUTO_DA_ALLOC, MOPT_SET},
+@@ -1674,6 +1674,10 @@ static int handle_mount_opt(struct super_block *sb, char *opt, int token,
+ ext4_msg(sb, KERN_INFO, "dax option not supported");
+ return -1;
+ #endif
++ } else if (token == Opt_data_err_abort) {
++ sbi->s_mount_opt |= m->mount_opt;
++ } else if (token == Opt_data_err_ignore) {
++ sbi->s_mount_opt &= ~m->mount_opt;
+ } else {
+ if (!args->from)
+ arg = 1;
+@@ -1883,6 +1887,8 @@ static int _ext4_show_options(struct seq_file *seq, struct super_block *sb,
+ SEQ_OPTS_PRINT("init_itable=%u", sbi->s_li_wait_mult);
+ if (nodefs || sbi->s_max_dir_size_kb)
+ SEQ_OPTS_PRINT("max_dir_size_kb=%u", sbi->s_max_dir_size_kb);
++ if (test_opt(sb, DATA_ERR_ABORT))
++ SEQ_OPTS_PUTS("data_err=abort");
+
+ ext4_show_quota_options(seq, sb);
+ return 0;
+--
+2.7.0
+
diff --git a/series.conf b/series.conf
index 25ba87bcc4..9c5bde7b16 100644
--- a/series.conf
+++ b/series.conf
@@ -849,6 +849,7 @@
patches.fixes/ext4-factor-out-determining-of-hole-size.patch
patches.fixes/ext4-return-hole-from-ext4_map_blocks.patch
patches.fixes/ext4-more-efficient-SEEK_DATA-implementation.patch
+ patches.fixes/ext4-fix-print-mountopt-data_err-abort-correctly.patch
########################################################
# btrfs