/* This is called to update the er_extoff field in the indirection array when extents have been added or removed from one of the extent lists. erp_idx contains the irec index to begin updating at and ext_diff contains the number of extents that were added or removed.  */
void xfs_iext_irec_update_extoffs(xfs_ifork_t *ifp, int erp_idx, int ext_diff)
/* This is called to update the er_extoff field in the indirection array when extents have been added or removed from one of the extent lists. erp_idx contains the irec index to begin updating at and ext_diff contains the number of extents that were added or removed.  */
void xfs_iext_irec_update_extoffs(xfs_ifork_t *ifp, int erp_idx, int ext_diff)
{
	int		i;
	int		nlists;
	ASSERT(ifp->if_flags & XFS_IFEXTIREC);
	nlists = ifp->if_real_bytes / XFS_IEXT_BUFSZ;
	for (i = erp_idx; i < nlists; i++) {
		ifp->if_u1.if_ext_irec[i].er_extoff += ext_diff;
	}
}