Lines Matching refs:zl
2457 fzap_name_equal(const zap_leaf_t *zl, const zap_leaf_chunk_t *zc, in fzap_name_equal() argument
2466 nc = &ZAP_LEAF_CHUNK(zl, zc->l_entry.le_name_chunk); in fzap_name_equal()
2478 nc = &ZAP_LEAF_CHUNK(zl, nc->l_array.la_next); in fzap_name_equal()
2488 fzap_leaf_value(const zap_leaf_t *zl, const zap_leaf_chunk_t *zc) in fzap_leaf_value() argument
2495 vc = &ZAP_LEAF_CHUNK(zl, zc->l_entry.le_value_chunk); in fzap_leaf_value()
2526 fzap_leaf_array(const zap_leaf_t *zl, const zap_leaf_chunk_t *zc, in fzap_leaf_array() argument
2538 *u64 = fzap_leaf_value(zl, zc); in fzap_leaf_array()
2543 struct zap_leaf_array *la = &ZAP_LEAF_CHUNK(zl, chunk).l_array; in fzap_leaf_array()
2546 ASSERT3U(chunk, <, ZAP_LEAF_NUMCHUNKS(zl)); in fzap_leaf_array()
2670 zap_leaf_lookup(zap_leaf_t *zl, uint64_t hash, const char *name, in zap_leaf_lookup() argument
2680 if (zl->l_phys->l_hdr.lh_prefix_len > 0 && in zap_leaf_lookup()
2681 zl->l_phys->l_hdr.lh_prefix != in zap_leaf_lookup()
2682 hash >> (64 - zl->l_phys->l_hdr.lh_prefix_len)) in zap_leaf_lookup()
2686 for (chunkp = LEAF_HASH_ENTPTR(zl, hash); in zap_leaf_lookup()
2691 le = ZAP_LEAF_ENTRY(zl, chunk); in zap_leaf_lookup()
2694 zc = &ZAP_LEAF_CHUNK(zl, chunk); in zap_leaf_lookup()
2695 if (fzap_name_equal(zl, zc, name)) { in zap_leaf_lookup()
2699 fzap_leaf_array(zl, zc, integer_size, in zap_leaf_lookup()
2719 zap_leaf_t *zl; in fzap_lookup() local
2735 rc = zap_deref_leaf(&z, hash, &zl); in fzap_lookup()
2739 rc = zap_leaf_lookup(zl, hash, name, integer_size, num_integers, value); in fzap_lookup()
2741 zap_leaf_free(zl); in fzap_lookup()
2831 zap_leaf_t zl; in fzap_list() local
2832 zl.l_bs = z.zap_block_shift; in fzap_list()
2833 zl.l_phys = malloc(bsize); in fzap_list()
2834 if (zl.l_phys == NULL) in fzap_list()
2838 off_t off = ((off_t)(i + 1)) << zl.l_bs; in fzap_list()
2842 if (dnode_read(spa, dnode, off, zl.l_phys, bsize)) { in fzap_list()
2843 free(zl.l_phys); in fzap_list()
2847 for (j = 0; j < ZAP_LEAF_NUMCHUNKS(&zl); j++) { in fzap_list()
2851 zc = &ZAP_LEAF_CHUNK(&zl, j); in fzap_list()
2861 nc = &ZAP_LEAF_CHUNK(&zl, zc->l_entry.le_name_chunk); in fzap_list()
2871 nc = &ZAP_LEAF_CHUNK(&zl, nc->l_array.la_next); in fzap_list()
2878 value = fzap_leaf_value(&zl, zc); in fzap_list()
2883 free(zl.l_phys); in fzap_list()
2889 free(zl.l_phys); in fzap_list()
2964 fzap_name_copy(const zap_leaf_t *zl, const zap_leaf_chunk_t *zc, char *name) in fzap_name_copy() argument
2972 nc = &ZAP_LEAF_CHUNK(zl, zc->l_entry.le_name_chunk); in fzap_name_copy()
2982 nc = &ZAP_LEAF_CHUNK(zl, nc->l_array.la_next); in fzap_name_copy()
3007 zap_leaf_t zl; in fzap_rlookup() local
3008 zl.l_bs = z.zap_block_shift; in fzap_rlookup()
3009 zl.l_phys = malloc(bsize); in fzap_rlookup()
3010 if (zl.l_phys == NULL) in fzap_rlookup()
3014 off_t off = ((off_t)(i + 1)) << zl.l_bs; in fzap_rlookup()
3016 rc = dnode_read(spa, dnode, off, zl.l_phys, bsize); in fzap_rlookup()
3020 for (j = 0; j < ZAP_LEAF_NUMCHUNKS(&zl); j++) { in fzap_rlookup()
3023 zc = &ZAP_LEAF_CHUNK(&zl, j); in fzap_rlookup()
3030 if (fzap_leaf_value(&zl, zc) == value) { in fzap_rlookup()
3031 fzap_name_copy(&zl, zc, name); in fzap_rlookup()
3039 free(zl.l_phys); in fzap_rlookup()