]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
mkfs: fix -l su minval
authorJan Tulak <jtulak@redhat.com>
Tue, 21 Jun 2016 02:52:22 +0000 (12:52 +1000)
committerDave Chinner <david@fromorbit.com>
Tue, 21 Jun 2016 02:52:22 +0000 (12:52 +1000)
-l su should be in range BBTOB(1) <= L_SU <= XLOG_MAX_RECORD_BSIZE,
because the upper limit is imposed by kernel on iclogbuf: stripe
unit can't be bigger than the log buffer, but the log buffer can
span multiple stripe units. L_SUNIT is changed in the same way.

Signed-off-by: Jan Tulak <jtulak@redhat.com>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
mkfs/xfs_mkfs.c

index 1593ee893f922f719219fd820137b526848630dc..ce1ade25780e76f78d62873d1a10d40f3abe4455 100644 (file)
@@ -452,7 +452,7 @@ struct opt_params lopts = {
                { .index = L_SUNIT,
                  .conflicts = { L_SU,
                                 LAST_CONFLICT },
-                 .minval = BTOBB(XLOG_MIN_RECORD_BSIZE),
+                 .minval = 1,
                  .maxval = BTOBB(XLOG_MAX_RECORD_BSIZE),
                  .defaultval = SUBOPT_NEEDS_VAL,
                },
@@ -460,7 +460,7 @@ struct opt_params lopts = {
                  .conflicts = { L_SUNIT,
                                 LAST_CONFLICT },
                  .convert = true,
-                 .minval = XLOG_MIN_RECORD_BSIZE,
+                 .minval = BBTOB(1),
                  .maxval = XLOG_MAX_RECORD_BSIZE,
                  .defaultval = SUBOPT_NEEDS_VAL,
                },