]> www.infradead.org Git - users/hch/xfsprogs.git/commitdiff
mkfs: add headers to realtime summary blocks
authorDarrick J. Wong <djwong@kernel.org>
Mon, 19 Sep 2022 18:40:52 +0000 (11:40 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Wed, 22 Nov 2023 23:03:35 +0000 (15:03 -0800)
When the rtgroups feature is enabled, format rtsummary blocks with the
appropriate block headers.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
mkfs/proto.c

index f5b7859f9a966f10f953d50cf42dbe7bf1f9871d..b89b114d0d68717c211fbcb9a02ae20b30806d0f 100644 (file)
@@ -991,6 +991,14 @@ rtsummary_init(
        if (error)
                fail(_("Block allocation of the realtime summary inode failed"),
                                error);
+
+       if (xfs_has_rtgroups(mp)) {
+               error = init_rtblock_headers(mp->m_rsumip,
+                               XFS_B_TO_FSB(mp, mp->m_rsumsize),
+                               &xfs_rtsummary_buf_ops, XFS_RTSUMMARY_MAGIC);
+               if (error)
+                       fail(_("Initialization of rtsummary failed"), error);
+       }
 }
 
 /*