aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Chinner <dchinner@redhat.com>2017-12-06 17:14:27 -0600
committerEric Sandeen <sandeen@redhat.com>2017-12-06 17:14:27 -0600
commit594932fbf720da416d69d81e6f6d3c29435f122d (patch)
tree9f25fbd3d6278feffb06c279cb0c230f3142bdd4
parent70c1cceb9b138afc51503999ed4eb6a6772ce450 (diff)
downloadxfsprogs-dev-594932fbf720da416d69d81e6f6d3c29435f122d.tar.gz
mkfs: disallow specifying the sector size of internal log
If the log is on the data device (i.e. internal) then it should match the sector size the data device is using. If they don't match, then one or the other doesn't have atomic sector writes and we could have crash consistency problems. Not to mention that it's simply wrong to have two different sector sizes for the same device. Hence enforce the requirement that an internal log device always has the same sector size as the data device. Signed-Off-By: Dave Chinner <dchinner@redhat.com> Reviewed-by: Eric Sandeen <sandeen@redhat.com> Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
-rw-r--r--mkfs/xfs_mkfs.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/mkfs/xfs_mkfs.c b/mkfs/xfs_mkfs.c
index cade04cc39..b3d8a51107 100644
--- a/mkfs/xfs_mkfs.c
+++ b/mkfs/xfs_mkfs.c
@@ -436,6 +436,8 @@ struct opt_params lopts = {
{ .index = L_INTERNAL,
.conflicts = { L_FILE,
L_DEV,
+ L_SECTLOG,
+ L_SECTSIZE,
LAST_CONFLICT },
.minval = 0,
.maxval = 1,
@@ -477,6 +479,7 @@ struct opt_params lopts = {
},
{ .index = L_SECTLOG,
.conflicts = { L_SECTSIZE,
+ L_INTERNAL,
LAST_CONFLICT },
.minval = XFS_MIN_SECTORSIZE_LOG,
.maxval = XFS_MAX_SECTORSIZE_LOG,
@@ -484,6 +487,7 @@ struct opt_params lopts = {
},
{ .index = L_SECTSIZE,
.conflicts = { L_SECTLOG,
+ L_INTERNAL,
LAST_CONFLICT },
.convert = true,
.is_power_2 = true,