/* Count leaf blocks given a range of extent records.  */
STATIC void xfs_bmap_count_leaves(xfs_ifork_t *ifp, xfs_extnum_t idx, int numrecs, int *count)
/* Count leaf blocks given a range of extent records.  */
STATIC void xfs_bmap_count_leaves(xfs_ifork_t *ifp, xfs_extnum_t idx, int numrecs, int *count)
{
	int		b;
	for (b = 0; b < numrecs; b++) {
		xfs_bmbt_rec_host_t *frp = xfs_iext_get_ext(ifp, idx + b);
		*count += xfs_bmbt_get_blockcount(frp);
	}
}