]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs_mkfs: default to rtinherit=1 for zoned file systems
authorChristoph Hellwig <hch@lst.de>
Mon, 14 Apr 2025 05:36:16 +0000 (07:36 +0200)
committerAndrey Albershteyn <aalbersh@kernel.org>
Tue, 29 Apr 2025 16:10:06 +0000 (18:10 +0200)
Zone file systems are intended to use sequential write required zones
(or areas treated as such) for the main data store. And usually use the
data device only for metadata that requires random writes.

rtinherit=1 is the way to achieve that, so enabled it by default, but
still allow the user to override it if needed.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
[aalbersh remove accidental "inherit" word in commit desc.]

mkfs/xfs_mkfs.c

index 8768fbb12cf1d07cb8f3ebf8b8595a191c157f28..5882ee4844a5045653670161cb6eb953fbcd9a1a 100644 (file)
@@ -2966,6 +2966,13 @@ _("rt extent size not supported on realtime devices with zoned mode\n"));
                        }
                        cli->rtextsize = 0;
                }
+
+               /*
+                * Set the rtinherit by default for zoned file systems as they
+                * usually use the data device purely as a metadata container.
+                */
+               if (!cli_opt_set(&dopts, D_RTINHERIT))
+                       cli->fsx.fsx_xflags |= FS_XFLAG_RTINHERIT;
        } else {
                if (cli->rtstart) {
                        fprintf(stderr,