FreeBSD/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/space_reftree.c
/*
 * Convert (or add) a range tree into a reference tree.
 */
Convert (or add) a range tree into a reference tree.
Convert ( or add ) a range tree into a reference tree .
void
space_reftree_add_map(avl_tree_t *t, range_tree_t *rt, int64_t refcnt)
{
	range_seg_t *rs;
	ASSERT(MUTEX_HELD(rt->rt_lock));
	for (rs = avl_first(&rt->rt_root); rs; rs = AVL_NEXT(&rt->rt_root, rs))
		space_reftree_add_seg(t, rs->rs_start, rs->rs_end, refcnt);
}
void space_reftree_add_map ( avl_tree_t * t , range_tree_t * rt , int64_t refcnt ) { range_seg_t * rs ; ASSERT ( MUTEX_HELD ( rt -> rt_lock ) ) ; for ( rs = avl_first ( & rt -> rt_root ) ; rs ; rs = AVL_NEXT ( & rt -> rt_root , rs ) ) space_reftree_add_seg ( t , rs -> rs_start , rs -> rs_end , refcnt ) ; }
Convert (or add) a range tree into a reference tree.
Convert ( or add ) a range tree into a reference tree .