diff mbox series

[44/45] mkfs: add headers to realtime summary blocks

Message ID 167243878938.731133.3080262804421732994.stgit@magnolia (mailing list archive)
State Superseded, archived
Headers show
Series libxfs: shard the realtime section | expand

Commit Message

Darrick J. Wong Dec. 30, 2022, 10:19 p.m. UTC
From: Darrick J. Wong <djwong@kernel.org>

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 |    8 ++++++++
 1 file changed, 8 insertions(+)
diff mbox series

Patch

diff --git a/mkfs/proto.c b/mkfs/proto.c
index daf0d419bce..846b48ec789 100644
--- a/mkfs/proto.c
+++ b/mkfs/proto.c
@@ -953,6 +953,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);
+	}
 }
 
 /*