xfs_inobt_ptr_t *pp;
int i;
int numrecs;
+ int finobt = *(int *) arg;
numrecs = be16_to_cpu(block->bb_numrecs);
typtab[btype].name, agno, agbno);
numrecs = mp->m_inobt_mxr[0];
}
+
+ /*
+ * Only copy the btree blocks for the finobt. The inobt scan
+ * copies the inode chunks.
+ */
+ if (finobt)
+ return 1;
+
rp = XFS_INOBT_REC_ADDR(mp, block, 1);
for (i = 0; i < numrecs; i++, rp++) {
if (!copy_inode_chunk(agno, rp))
{
xfs_agblock_t root;
int levels;
+ int finobt = 0;
root = be32_to_cpu(agi->agi_root);
levels = be32_to_cpu(agi->agi_level);
return 1;
}
- return scan_btree(agno, root, levels, TYP_INOBT, agi, scanfunc_ino);
+ if (!scan_btree(agno, root, levels, TYP_INOBT, &finobt, scanfunc_ino))
+ return 0;
+
+ if (xfs_sb_version_hasfinobt(&mp->m_sb)) {
+ root = be32_to_cpu(agi->agi_free_root);
+ levels = be32_to_cpu(agi->agi_free_level);
+
+ finobt = 1;
+ if (!scan_btree(agno, root, levels, TYP_INOBT, &finobt,
+ scanfunc_ino))
+ return 0;
+ }
+
+ return 1;
}
static int