]> 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>
Tue, 8 Apr 2025 07:28:18 +0000 (09:28 +0200)
Zone file systems are intended to use sequential write required zones
(or areas treated as such) for data, and the main data device only for
metadata.  rtinherit=1 is the way to achieve that, so enabled it by
default.

Signed-off-by: Christoph Hellwig <hch@lst.de>
mkfs/xfs_mkfs.c

index b7057c4ff72baeb697042fddec6df11c51c00e82..e470a11f6c7159543d3ad7bf634301a8200bae57 100644 (file)
@@ -2957,6 +2957,13 @@ _("rt extent size not supported on realtime devices with zoned mode\n"));
                        }
                        cli->rtextsize = 0;
                }
+
+               /*
+                * Force the rtinherit flag on the root inode for zoned file
+                * systems as they use the data device only as a metadata
+                * container.
+                */
+               cli->fsx.fsx_xflags |= FS_XFLAG_RTINHERIT;
        } else {
                if (cli->rtstart) {
                        fprintf(stderr,