]> git-server-git.apps.pok.os.sepia.ceph.com Git - xfsprogs-dev.git/commitdiff
mkfs: quiet down warning about insufficient write zones
authorDarrick J. Wong <djwong@kernel.org>
Tue, 20 Jan 2026 17:51:19 +0000 (09:51 -0800)
committerAndrey Albershteyn <aalbersh@kernel.org>
Tue, 27 Jan 2026 16:59:35 +0000 (17:59 +0100)
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 <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
mkfs/xfs_mkfs.c

index a90160b26065b785a51709acc7332f94000e5dd0..f539c91db251fdcb61c5bcccbec4a595c61fadd1 100644 (file)
@@ -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);