From: Christoph Hellwig Date: Wed, 22 Oct 2025 08:52:05 +0000 (+0200) Subject: mkfs: improve the error message in adjust_nr_zones X-Git-Tag: v6.18.0~86 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=42fffb1475e384c686d91a594a4e6afd18dc187d;p=thirdparty%2Fxfsprogs-dev.git mkfs: improve the error message in adjust_nr_zones Print the zone counts to help the user to understand the problem. Signed-off-by: Christoph Hellwig Reviewed-by: Andrey Albershteyn --- diff --git a/mkfs/xfs_mkfs.c b/mkfs/xfs_mkfs.c index e66f71b9..cb7c20e3 100644 --- a/mkfs/xfs_mkfs.c +++ b/mkfs/xfs_mkfs.c @@ -4552,11 +4552,11 @@ adjust_nr_zones( if (!cli->rgcount) cfg->rgcount += XFS_RESERVED_ZONES; if (cfg->rgcount > max_zones) { - cfg->rgcount = max_zones; fprintf(stderr, -_("Warning: not enough zones for backing requested rt size due to\n" +_("Warning: not enough zones (%lu/%u) for backing requested rt size due to\n" "over-provisioning needs, writable size will be less than %s\n"), - cli->rtsize); + cfg->rgcount, max_zones, cli->rtsize); + cfg->rgcount = max_zones; } new_rtblocks = (cfg->rgcount * cfg->rgsize); slack = (new_rtblocks - cfg->rtblocks) % cfg->rgsize;