From: Darrick J. Wong Date: Tue, 20 Jan 2026 17:51:19 +0000 (-0800) Subject: mkfs: quiet down warning about insufficient write zones X-Git-Tag: v6.19.0~28 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=026ebbb7ef9da00b777e3cdd8290e0c119a6cfea;p=xfsprogs-dev.git mkfs: quiet down warning about insufficient write zones xfs/067 fails with the following weird mkfs message: --- tests/xfs/067.out 2025-07-15 14:41:40.191273467 -0700 +++ /run/fstests/logs/xfs/067.out.bad 2026-01-06 16:59:11.907677987 -0800 @@ -1,4 +1,8 @@ QA output created by 067 +Warning: not enough zones (134/133) for backing requested rt size due to +over-provisioning needs, writable size will be less than (null) +Warning: not enough zones (134/133) for backing requested rt size due to +over-provisioning needs, writable size will be less than (null) In this case, MKFS_OPTIONS is set to: "-rrtdev=/dev/sdb4 -m metadir=1,autofsck=1,uquota,gquota,pquota -d rtinherit=1 -r zoned=1 /dev/sda4" In other words, we didn't pass an explicit rt volume size to mkfs, so the message is a bit bogus. Let's skip printing the message when the user did not provide an explicit rtsize parameter. Cc: linux-xfs@vger.kernel.org # v6.18.0 Fixes: b5d372d96db1ad ("mkfs: adjust_nr_zones for zoned file system on conventional devices") Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig --- diff --git a/mkfs/xfs_mkfs.c b/mkfs/xfs_mkfs.c index a90160b2..f539c91d 100644 --- a/mkfs/xfs_mkfs.c +++ b/mkfs/xfs_mkfs.c @@ -4579,10 +4579,11 @@ adjust_nr_zones( cfg->rgsize; if (cfg->rgcount > max_zones) { - fprintf(stderr, + if (cli->rtsize) + fprintf(stderr, _("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"), - cfg->rgcount, max_zones, cli->rtsize); + cfg->rgcount, max_zones, cli->rtsize); cfg->rgcount = max_zones; } new_rtblocks = (cfg->rgcount * cfg->rgsize);