aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Sandeen <sandeen@redhat.com>2017-05-02 11:12:53 -0500
committerEric Sandeen <sandeen@redhat.com>2017-05-02 11:12:53 -0500
commit23069a9353eb8af30f3427feed6c92380d025a53 (patch)
tree058498a7e20a824463f9a44675f8bbbcfece68c7
parent4a7aa05a1069e1671c3b58d25a0874f83be5c459 (diff)
downloadxfsprogs-dev-23069a9353eb8af30f3427feed6c92380d025a53.tar.gz
mkfs.xfs: Assign proper defaults to rmapbt and reflink flags
The "defaultval" field in the options structure was a bit confusing, so when the rmapbt & reflink options got added, the desire was to keep them off by default, and "defaultval = 0" got set. However, the purpose of this field is to define the default value when the flag is specified with no associated value, i.e. -m rmapbt vs. -m rmapbt=0 or -m rmapbt=1 Today, the resulting behavior is unexpected, and different from any other mkfs flags; specifying "-m rmapbt,reflink" results in a filesystem /without/ those features. Fix these to be consistent with every other boolean flag in the mkfs options, so that specifying the flag with no value will enable the feature. Signed-off-by: Eric Sandeen <sandeen@redhat.com> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
-rw-r--r--mkfs/xfs_mkfs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mkfs/xfs_mkfs.c b/mkfs/xfs_mkfs.c
index 6fedc05c2f..930f3d2aad 100644
--- a/mkfs/xfs_mkfs.c
+++ b/mkfs/xfs_mkfs.c
@@ -697,13 +697,13 @@ struct opt_params mopts = {
.conflicts = { LAST_CONFLICT },
.minval = 0,
.maxval = 1,
- .defaultval = 0,
+ .defaultval = 1,
},
{ .index = M_REFLINK,
.conflicts = { LAST_CONFLICT },
.minval = 0,
.maxval = 1,
- .defaultval = 0,
+ .defaultval = 1,
},
},
};