]> www.infradead.org Git - users/hch/xfsprogs.git/commitdiff
xfs_mkfs: default to rtinherit=1 for zoned file systems
authorChristoph Hellwig <hch@lst.de>
Tue, 8 Apr 2025 07:24:59 +0000 (09:24 +0200)
committerChristoph Hellwig <hch@lst.de>
Mon, 14 Apr 2025 05:36:00 +0000 (07:36 +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>
inherit

mkfs/xfs_mkfs.c

index 5cd100c87f43dd6d1936d433f980e08d89b98a66..e6adb345551e167517dad9f5107f5ff86005cbc8 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,