FreeBSD/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_dir.c
/*
 * zfs_match_find() is used by zfs_dirent_lookup() to peform zap lookups
 * of names after deciding which is the appropriate lookup interface.
 */
zfs_match_find() is used by zfs_dirent_lookup() to peform zap lookups
of names after deciding which is the appropriate lookup interface.
zfs_match_find () is used by zfs_dirent_lookup () to peform zap lookups of names after deciding which is the appropriate lookup interface .
static int
zfs_match_find(zfsvfs_t *zfsvfs, znode_t *dzp, const char *name,
    boolean_t exact, uint64_t *zoid)
{
	int error;
	if (zfsvfs->z_norm) {
		matchtype_t mt = exact? MT_EXACT : MT_FIRST;
		error = zap_lookup_norm(zfsvfs->z_os, dzp->z_id, name, 8, 1,
		    zoid, mt, NULL, 0, NULL);
	} else {
		error = zap_lookup(zfsvfs->z_os, dzp->z_id, name, 8, 1, zoid);
	}
	*zoid = ZFS_DIRENT_OBJ(*zoid);
	return (error);
}
static int zfs_match_find ( zfsvfs_t * zfsvfs , znode_t * dzp , const char * name , boolean_t exact , uint64_t * zoid ) { int error ; if ( zfsvfs -> z_norm ) { matchtype_t mt = exact ? MT_EXACT : MT_FIRST ; error = zap_lookup_norm ( zfsvfs -> z_os , dzp -> z_id , name , 8 , 1 , zoid , mt , NULL , 0 , NULL ) ; } else { error = zap_lookup ( zfsvfs -> z_os , dzp -> z_id , name , 8 , 1 , zoid ) ; } * zoid = ZFS_DIRENT_OBJ ( * zoid ) ; return ( error ) ; }
zfs_match_find() is used by zfs_dirent_lookup() to peform zap lookups
 of names after deciding which is the appropriate lookup interface.
zfs_match_find () is used by zfs_dirent_lookup () to peform zap lookups of names after deciding which is the appropriate lookup interface .
/*
		 * In the non-mixed case we only expect there would ever
		 * be one match, but we need to use the normalizing lookup.
		 */