From: Darrick J. Wong Date: Tue, 1 Jul 2025 17:45:14 +0000 (-0700) Subject: mkfs: don't complain about overly large auto-detected log stripe units X-Git-Tag: v6.16.0~12 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=875e57e81ce4293c02d8490bd2fcae8c6de6445a;p=thirdparty%2Fxfsprogs-dev.git mkfs: don't complain about overly large auto-detected log stripe units If mkfs declines to apply what it thinks is an overly large data device stripe unit to the log device, it should only log a message about that if the lsunit parameter was actually supplied by the caller. It should not do that when the lsunit was autodetected from the block devices. The cli parameters are zero-initialized in main and always have been. Cc: # v4.15.0 Fixes: 2f44b1b0e5adc4 ("mkfs: rework stripe calculations") Signed-off-by: "Darrick J. Wong" Reviewed-by: John Garry --- diff --git a/mkfs/xfs_mkfs.c b/mkfs/xfs_mkfs.c index 812241c4..8b946f3e 100644 --- a/mkfs/xfs_mkfs.c +++ b/mkfs/xfs_mkfs.c @@ -3629,7 +3629,7 @@ _("log stripe unit (%d) must be a multiple of the block size (%d)\n"), if (cfg->sb_feat.log_version == 2 && cfg->lsunit * cfg->blocksize > 256 * 1024) { /* Warn only if specified on commandline */ - if (cli->lsu || cli->lsunit != -1) { + if (cli->lsu || cli->lsunit) { fprintf(stderr, _("log stripe unit (%d bytes) is too large (maximum is 256KiB)\n" "log stripe unit adjusted to 32KiB\n"),