[PATCH 37/51] xfs_mkfs: initialize extra fields during mkfs

Darrick J. Wong
2015-10-07T05:09:19Z

mkfs/xfs_mkfs.c | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/mkfs/xfs_mkfs.c b/mkfs/xfs_mkfs.c
index b496349..573774c 100644
--- a/mkfs/xfs_mkfs.c
+++ b/mkfs/xfs_mkfs.c
@@ -2974,6 +2974,7 @@ _("size %s specified for log subvolume is too large, maximum is %lld blocks\n"),
rrec->rm_startblock = 0;
rrec->rm_blockcount = cpu_to_be32(XFS_BNO_BLOCK(mp));
rrec->rm_owner = cpu_to_be64(XFS_RMAP_OWN_FS);
+ rrec->rm_offset = 0;
be16_add_cpu(&block->bb_numrecs, 1);

/* account freespace btree root blocks */
@@ -2981,6 +2982,7 @@ _("size %s specified for log subvolume is too large, maximum is %lld blocks\n"),
rrec->rm_startblock = cpu_to_be32(XFS_BNO_BLOCK(mp));
rrec->rm_blockcount = cpu_to_be32(2);
rrec->rm_owner = cpu_to_be64(XFS_RMAP_OWN_AG);
+ rrec->rm_offset = 0;
be16_add_cpu(&block->bb_numrecs, 1);

/* account inode btree root blocks */
@@ -2989,6 +2991,7 @@ _("size %s specified for log subvolume is too large, maximum is %lld blocks\n"),
rrec->rm_blockcount = cpu_to_be32(XFS_RMAP_BLOCK(mp) -
XFS_IBT_BLOCK(mp));
rrec->rm_owner = cpu_to_be64(XFS_RMAP_OWN_INOBT);
+ rrec->rm_offset = 0;
be16_add_cpu(&block->bb_numrecs, 1);

/* account for rmap btree root */
@@ -2996,6 +2999,7 @@ _("size %s specified for log subvolume is too large, maximum is %lld blocks\n"),
rrec->rm_startblock = cpu_to_be32(XFS_RMAP_BLOCK(mp));
rrec->rm_blockcount = cpu_to_be32(1);
rrec->rm_owner = cpu_to_be64(XFS_RMAP_OWN_AG);
+ rrec->rm_offset = 0;
be16_add_cpu(&block->bb_numrecs, 1);

/* account for the log space */
@@ -3005,6 +3009,7 @@ _("size %s specified for log subvolume is too large, maximum is %lld blocks\n"),
XFS_FSB_TO_AGBNO(mp, logstart));
rrec->rm_blockcount = cpu_to_be32(logblocks);
rrec->rm_owner = cpu_to_be64(XFS_RMAP_OWN_LOG);
+ rrec->rm_offset = 0;
be16_add_cpu(&block->bb_numrecs, 1);