Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuis R. Rodriguez <mcgrof@suse.com>2018-05-25 15:12:40 -0700
committerLuis R. Rodriguez <mcgrof@suse.com>2018-05-25 16:49:18 -0700
commit116182c124ecda54d78adcf3c79f27d18f233043 (patch)
tree805a9e1854788c8fa60b31a384adf84204e29237
parentb5dea6e987f73dcfb8bfada4fe96dc3dcfb6ab6c (diff)
xfs: add option to mount with barrier=0 or barrier=1 (bsc#1093839).
-rw-r--r--fs/xfs/xfs_super.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c
index 6fd948774f2c..d24abdf1eb39 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;
@@ -1257,6 +1269,7 @@ xfs_fs_remount(
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);
@@ -1280,6 +1293,15 @@ xfs_fs_remount(
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);