Use the rmapbt to find inode chunks, query the chunks to compute hole and free masks, and with that information rebuild the inobt and finobt. Signed-off-by: Darrick J. Wong <darrick.wong@xxxxxxxxxx> --- libxfs/xfs_ialloc.c | 2 +- libxfs/xfs_ialloc.h | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/libxfs/xfs_ialloc.c b/libxfs/xfs_ialloc.c index 3d02a16..923214a 100644 --- a/libxfs/xfs_ialloc.c +++ b/libxfs/xfs_ialloc.c @@ -141,7 +141,7 @@ xfs_inobt_get_rec( /* * Insert a single inobt record. Cursor must already point to desired location. */ -STATIC int +int xfs_inobt_insert_rec( struct xfs_btree_cur *cur, __uint16_t holemask, diff --git a/libxfs/xfs_ialloc.h b/libxfs/xfs_ialloc.h index f20d958..afcb250 100644 --- a/libxfs/xfs_ialloc.h +++ b/libxfs/xfs_ialloc.h @@ -175,5 +175,8 @@ int xfs_ialloc_has_inodes_at_extent(struct xfs_btree_cur *cur, xfs_agblock_t bno, xfs_extlen_t len, bool *exists); int xfs_ialloc_has_inode_record(struct xfs_btree_cur *cur, xfs_agino_t low, xfs_agino_t high, bool *exists); +int xfs_inobt_insert_rec(struct xfs_btree_cur *cur, __uint16_t holemask, + __uint8_t count, __int32_t freecount, xfs_inofree_t free, + int *stat); #endif /* __XFS_IALLOC_H__ */ -- To unsubscribe from this list: send the line "unsubscribe linux-xfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html