FreeBSD/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/range_tree.c
/*
 * Ensure that this range is not in the tree, regardless of whether
 * it is currently in the tree.
 */
Ensure that this range is not in the tree, regardless of whether
it is currently in the tree.
Ensure that this range is not in the tree regardless of whether it is currently in the tree .
void
range_tree_clear(range_tree_t *rt, uint64_t start, uint64_t size)
{
	range_seg_t *rs;
	while ((rs = range_tree_find_impl(rt, start, size)) != NULL) {
		uint64_t free_start = MAX(rs->rs_start, start);
		uint64_t free_end = MIN(rs->rs_end, start + size);
		range_tree_remove(rt, free_start, free_end - free_start);
	}
}
void range_tree_clear ( range_tree_t * rt , uint64_t start , uint64_t size ) { range_seg_t * rs ; while ( ( rs = range_tree_find_impl ( rt , start , size ) ) != NULL ) { uint64_t free_start = MAX ( rs -> rs_start , start ) ; uint64_t free_end = MIN ( rs -> rs_end , start + size ) ; range_tree_remove ( rt , free_start , free_end - free_start ) ; } }
Ensure that this range is not in the tree, regardless of whether
 it is currently in the tree.
Ensure that this range is not in the tree regardless of whether it is currently in the tree .