In keep_fsinos, mark the root of the metadata directory tree as inuse.
The realtime bitmap and summary files still come after the root
directories, so this is a fairly simple change to the loop test.
Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
keep_fsinos(xfs_mount_t *mp)
{
ino_tree_node_t *irec;
- int i;
+ unsigned int inuse = xfs_rootrec_inodes_inuse(mp), i;
irec = find_inode_rec(mp, XFS_INO_TO_AGNO(mp, mp->m_sb.sb_rootino),
XFS_INO_TO_AGINO(mp, mp->m_sb.sb_rootino));
- for (i = 0; i < 3; i++)
+ for (i = 0; i < inuse; i++) {
set_inode_used(irec, i);
+
+ /* Everything after the root dir is metadata */
+ if (i)
+ set_inode_is_meta(irec, i);
+ }
}
static void