Home Home > GIT Browse > openSUSE-15.1
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Thumshirn <jthumshirn@suse.de>2018-05-28 09:54:50 +0200
committerJohannes Thumshirn <jthumshirn@suse.de>2018-05-28 09:54:50 +0200
commit8a1b731436b73287ea39cbc21e5af7a070203c45 (patch)
tree7c843996c41fbfedffe2c48bada0a0f5ad1ac2d2
parent7806eaccbb50a91d3a0733f8156ab982ec42e3b4 (diff)
parent2bcd2753255ab1ef8790eedc213812d5ddc10bb2 (diff)
Pull XFS fix from Luis Rodriguez
-rw-r--r--patches.suse/xfs-add-option-to-mount-with-barrier-0-or-barrier-1.patch96
-rw-r--r--series.conf1
2 files changed, 97 insertions, 0 deletions
diff --git a/patches.suse/xfs-add-option-to-mount-with-barrier-0-or-barrier-1.patch b/patches.suse/xfs-add-option-to-mount-with-barrier-0-or-barrier-1.patch
new file mode 100644
index 0000000000..b7839f4781
--- /dev/null
+++ b/patches.suse/xfs-add-option-to-mount-with-barrier-0-or-barrier-1.patch
@@ -0,0 +1,96 @@
+From c858a0817715a5ce43928806ad6a5e41c0dcb851 Mon Sep 17 00:00:00 2001
+From: "Luis R. Rodriguez" <mcgrof@suse.com>
+Date: Fri, 25 May 2018 15:05:24 -0700
+Subject: [PATCH] xfs: add option to mount with barrier=0 or barrier=1
+Patch-mainline: Never, SLE-specific
+References: bsc#1093839
+
+Commit 2e74af0e118 ("xfs: convert mount option parsing to tokens")
+used the generic kernel tokenizer for mount options instead of open
+coding them. In doing so a few mount options lost the ability to
+suppor the option for setting value to 1 or 0 when they were intended
+to just be setters.
+
+We have old userspace tools which still use the barrier optiona as follows:
+
+ # mount -t xfs -o barrier=0 /dev/loop16 /mnt
+
+Note that commit 4cf4573d899 ("xfs: deprecate barrier/nobarrier mount
+option") clarifies that we now always always perform integrity operations now
+and so the barrier options don't do anything anymore.
+
+We just provide backward compatibility.
+
+Signed-off-by: Luis R. Rodriguez <mcgrof@suse.com>
+---
+ fs/xfs/xfs_super.c | 12 ++++++++++++
+ 1 file changed, 12 insertions(+)
+
+diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c
+index 6fd948774f2c..d20552fac671 100644
+--- a/fs/xfs/xfs_super.c
++++ b/fs/xfs/xfs_super.c
+@@ -82,6 +82,7 @@ enum {
+ Opt_wsync, Opt_noalign, Opt_swalloc, Opt_sunit, Opt_swidth, Opt_nouuid,
+ Opt_mtpt, Opt_grpid, Opt_nogrpid, Opt_bsdgroups, Opt_sysvgroups,
+ Opt_allocsize, Opt_norecovery, Opt_barrier, Opt_nobarrier,
++ Opt_barrierl,
+ Opt_inode64, Opt_inode32, Opt_ikeep, Opt_noikeep,
+ Opt_largeio, Opt_nolargeio, Opt_attr2, Opt_noattr2, Opt_filestreams,
+ Opt_quota, Opt_noquota, Opt_usrquota, Opt_grpquota, Opt_prjquota,
+@@ -141,6 +142,7 @@ static const match_table_t tokens = {
+ {Opt_barrier, "barrier"}, /* use writer barriers for log write and
+ * unwritten extent conversion */
+ {Opt_nobarrier, "nobarrier"}, /* .. disable */
++ {Opt_barrierl, "barrier=%u"}, /* legacy support for old interface */
+
+ {Opt_err, NULL},
+ };
+@@ -201,6 +203,7 @@ xfs_parseargs(
+ int dswidth = 0;
+ int iosize = 0;
+ uint8_t iosizelog = 0;
++ int barrierl = 0;
+
+ /*
+ * set up the mount name first so all the errors will refer to the
+@@ -384,6 +387,15 @@ xfs_parseargs(
+ xfs_warn(mp, "%s option is deprecated, ignoring.", p);
+ mp->m_flags &= ~XFS_MOUNT_BARRIER;
+ break;
++ case Opt_barrierl:
++ if (match_int(args, &barrierl))
++ return -EINVAL;
++ xfs_warn(mp, "%s option is deprecated, ignoring.", p);
++ if (barrierl)
++ mp->m_flags |= XFS_MOUNT_BARRIER;
++ else
++ mp->m_flags &= ~XFS_MOUNT_BARRIER;
++ break;
+ default:
+ xfs_warn(mp, "unknown mount option [%s].", p);
+ return -EINVAL;
+@@ -1269,6 +1269,7 @@
+ substring_t args[MAX_OPT_ARGS];
+ char *p;
+ int error;
++ int barrierl = 0;
+
+ /* First, check for complete junk; i.e. invalid options */
+ error = xfs_test_remount_options(sb, mp, options);
+@@ -1292,6 +1293,15 @@
+ xfs_warn(mp, "%s option is deprecated, ignoring.", p);
+ mp->m_flags &= ~XFS_MOUNT_BARRIER;
+ break;
++ case Opt_barrierl:
++ if (match_int(args, &barrierl))
++ return -EINVAL;
++ xfs_warn(mp, "%s option is deprecated, ignoring.", p);
++ if (barrierl)
++ mp->m_flags |= XFS_MOUNT_BARRIER;
++ else
++ mp->m_flags &= ~XFS_MOUNT_BARRIER;
++ break;
+ case Opt_inode64:
+ mp->m_flags &= ~XFS_MOUNT_SMALL_INUMS;
+ mp->m_maxagi = xfs_set_inode_alloc(mp, sbp->sb_agcount);
diff --git a/series.conf b/series.conf
index 968f3d6597..466df6d176 100644
--- a/series.conf
+++ b/series.conf
@@ -12128,6 +12128,7 @@
patches.suse/squashfs-3.4.patch
patches.suse/xfs-unsupported-features.patch
+ patches.suse/xfs-add-option-to-mount-with-barrier-0-or-barrier-1.patch
patches.suse/ext4-unsupported-features.patch
patches.suse/btrfs-8888-add-allow_unsupported-module-parameter.patch