/* Count leaf blocks given a range of extent records originally in btree format.  */
STATIC void xfs_bmap_disk_count_leaves(struct xfs_mount *mp, struct xfs_btree_block *block, int numrecs, int *count)
/* Count leaf blocks given a range of extent records originally in btree format.  */
STATIC void xfs_bmap_disk_count_leaves(struct xfs_mount *mp, struct xfs_btree_block *block, int numrecs, int *count)
{
	int		b;
	xfs_bmbt_rec_t	*frp;
	for (b = 1; b <= numrecs; b++) {
		frp = XFS_BMBT_REC_ADDR(mp, block, b);
		*count += xfs_bmbt_disk_get_blockcount(frp);
	}
}