Lines Matching refs:mze
297 mzap_ent_t *mze = kmem_alloc(sizeof (mzap_ent_t), KM_SLEEP); in mze_insert() local
298 mze->mze_chunkid = chunkid; in mze_insert()
299 mze->mze_hash = hash; in mze_insert()
300 mze->mze_cd = MZE_PHYS(zap, mze)->mze_cd; in mze_insert()
301 ASSERT(MZE_PHYS(zap, mze)->mze_name[0] != 0); in mze_insert()
302 avl_add(&zap->zap_m.zap_avl, mze); in mze_insert()
309 mzap_ent_t *mze; in mze_find() local
319 mze = avl_find(avl, &mze_tofind, &idx); in mze_find()
320 if (mze == NULL) in mze_find()
321 mze = avl_nearest(avl, idx, AVL_AFTER); in mze_find()
322 for (; mze && mze->mze_hash == zn->zn_hash; mze = AVL_NEXT(avl, mze)) { in mze_find()
323 ASSERT3U(mze->mze_cd, ==, MZE_PHYS(zn->zn_zap, mze)->mze_cd); in mze_find()
324 if (zap_match(zn, MZE_PHYS(zn->zn_zap, mze)->mze_name)) in mze_find()
325 return (mze); in mze_find()
345 for (mzap_ent_t *mze = avl_find(avl, &mze_tofind, &idx); in mze_find_unused_cd() local
346 mze && mze->mze_hash == hash; mze = AVL_NEXT(avl, mze)) { in mze_find_unused_cd()
347 if (mze->mze_cd != cd) in mze_find_unused_cd()
356 mze_remove(zap_t *zap, mzap_ent_t *mze) in mze_remove() argument
361 avl_remove(&zap->zap_m.zap_avl, mze); in mze_remove()
362 kmem_free(mze, sizeof (mzap_ent_t)); in mze_remove()
368 mzap_ent_t *mze; in mze_destroy() local
371 while (mze = avl_destroy_nodes(&zap->zap_m.zap_avl, &avlcookie)) in mze_destroy()
372 kmem_free(mze, sizeof (mzap_ent_t)); in mze_destroy()
423 mzap_ent_phys_t *mze = in mzap_open() local
425 if (mze->mze_name[0]) { in mzap_open()
429 zn = zap_name_alloc(zap, mze->mze_name, 0); in mzap_open()
627 mzap_ent_phys_t *mze = &mzp->mz_chunk[i]; in mzap_upgrade() local
628 if (mze->mze_name[0] == 0) in mzap_upgrade()
631 mze->mze_name, mze->mze_value); in mzap_upgrade()
632 zap_name_t *zn = zap_name_alloc(zap, mze->mze_name, 0); in mzap_upgrade()
633 err = fzap_add_cd(zn, 8, 1, &mze->mze_value, mze->mze_cd, in mzap_upgrade()
843 mzap_normalization_conflict(zap_t *zap, zap_name_t *zn, mzap_ent_t *mze) in mzap_normalization_conflict() argument
852 for (mzap_ent_t *other = avl_walk(&zap->zap_m.zap_avl, mze, direction); in mzap_normalization_conflict()
853 other && other->mze_hash == mze->mze_hash; in mzap_normalization_conflict()
857 zn = zap_name_alloc(zap, MZE_PHYS(zap, mze)->mze_name, in mzap_normalization_conflict()
906 mzap_ent_t *mze = mze_find(zn); in zap_lookup_impl() local
907 if (mze == NULL) { in zap_lookup_impl()
916 MZE_PHYS(zap, mze)->mze_value; in zap_lookup_impl()
918 MZE_PHYS(zap, mze)->mze_name, rn_len); in zap_lookup_impl()
921 zn, mze); in zap_lookup_impl()
1047 mzap_ent_t *mze = mze_find(zn); in zap_length() local
1048 if (mze == NULL) { in zap_length()
1093 mzap_ent_phys_t *mze = &zap_m_phys(zap)->mz_chunk[i]; in mzap_addent() local
1094 ASSERT(strcmp(zn->zn_key_orig, mze->mze_name) != 0); in mzap_addent()
1104 mzap_ent_phys_t *mze = &zap_m_phys(zap)->mz_chunk[i]; in mzap_addent() local
1105 if (mze->mze_name[0] == 0) { in mzap_addent()
1106 mze->mze_value = value; in mzap_addent()
1107 mze->mze_cd = cd; in mzap_addent()
1108 (void) strcpy(mze->mze_name, zn->zn_key_orig); in mzap_addent()
1260 mzap_ent_t *mze = mze_find(zn); in zap_update() local
1261 if (mze != NULL) { in zap_update()
1262 ASSERT3U(MZE_PHYS(zap, mze)->mze_value, ==, oldval); in zap_update()
1263 MZE_PHYS(zap, mze)->mze_value = *intval; in zap_update()
1317 mzap_ent_t *mze = mze_find(zn); in zap_remove_impl() local
1318 if (mze == NULL) { in zap_remove_impl()
1322 bzero(&zap_m_phys(zap)->mz_chunk[mze->mze_chunkid], in zap_remove_impl()
1324 mze_remove(zap, mze); in zap_remove_impl()
1501 mzap_ent_t *mze = in zap_cursor_retrieve() local
1503 if (mze == NULL) { in zap_cursor_retrieve()
1504 mze = avl_nearest(&zc->zc_zap->zap_m.zap_avl, in zap_cursor_retrieve()
1507 if (mze) { in zap_cursor_retrieve()
1508 mzap_ent_phys_t *mzep = MZE_PHYS(zc->zc_zap, mze); in zap_cursor_retrieve()
1509 ASSERT3U(mze->mze_cd, ==, mzep->mze_cd); in zap_cursor_retrieve()
1511 mzap_normalization_conflict(zc->zc_zap, NULL, mze); in zap_cursor_retrieve()
1516 zc->zc_hash = mze->mze_hash; in zap_cursor_retrieve()
1517 zc->zc_cd = mze->mze_cd; in zap_cursor_retrieve()