FreeBSD/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap_micro.c
/*
 * zn may be NULL; if not specified, it will be computed if needed.
 * See also the comment above zap_entry_normalization_conflict().
 */
zn may be NULL; if not specified, it will be computed if needed.
See also the comment above zap_entry_normalization_conflict().
zn may be NULL ; if not specified it will be computed if needed . See also the comment above zap_entry_normalization_conflict () .
static boolean_t
mzap_normalization_conflict(zap_t *zap, zap_name_t *zn, mzap_ent_t *mze)
{
	mzap_ent_t *other;
	int direction = AVL_BEFORE;
	boolean_t allocdzn = B_FALSE;
	if (zap->zap_normflags == 0)
		return (B_FALSE);
again:
	for (other = avl_walk(&zap->zap_m.zap_avl, mze, direction);
	    other && other->mze_hash == mze->mze_hash;
	    other = avl_walk(&zap->zap_m.zap_avl, other, direction)) {
		if (zn == NULL) {
			zn = zap_name_alloc(zap, MZE_PHYS(zap, mze)->mze_name,
			    MT_FIRST);
			allocdzn = B_TRUE;
		}
		if (zap_match(zn, MZE_PHYS(zap, other)->mze_name)) {
			if (allocdzn)
				zap_name_free(zn);
			return (B_TRUE);
		}
	}
	if (direction == AVL_BEFORE) {
		direction = AVL_AFTER;
		goto again;
	}
	if (allocdzn)
		zap_name_free(zn);
	return (B_FALSE);
}
static boolean_t mzap_normalization_conflict ( zap_t * zap , zap_name_t * zn , mzap_ent_t * mze ) { mzap_ent_t * other ; int direction = AVL_BEFORE ; boolean_t allocdzn = B_FALSE ; if ( zap -> zap_normflags == 0 ) return ( B_FALSE ) ; again : for ( other = avl_walk ( & zap -> zap_m . zap_avl , mze , direction ) ; other && other -> mze_hash == mze -> mze_hash ; other = avl_walk ( & zap -> zap_m . zap_avl , other , direction ) ) { if ( zn == NULL ) { zn = zap_name_alloc ( zap , MZE_PHYS ( zap , mze ) -> mze_name , MT_FIRST ) ; allocdzn = B_TRUE ; } if ( zap_match ( zn , MZE_PHYS ( zap , other ) -> mze_name ) ) { if ( allocdzn ) zap_name_free ( zn ) ; return ( B_TRUE ) ; } } if ( direction == AVL_BEFORE ) { direction = AVL_AFTER ; goto again ; } if ( allocdzn ) zap_name_free ( zn ) ; return ( B_FALSE ) ; }
zn may be NULL; if not specified, it will be computed if needed.
zn may be NULL ; if not specified it will be computed if needed .