Lines Matching full:le

44 static uint16_t *zap_leaf_rehash_entry(zap_leaf_t *l, struct zap_leaf_entry *le,
118 struct zap_leaf_entry *le; in zap_leaf_byteswap() local
122 le = &lc->l_entry; in zap_leaf_byteswap()
124 le->le_type = BSWAP_8(le->le_type); in zap_leaf_byteswap()
125 le->le_value_intlen = BSWAP_8(le->le_value_intlen); in zap_leaf_byteswap()
126 le->le_next = BSWAP_16(le->le_next); in zap_leaf_byteswap()
127 le->le_name_chunk = BSWAP_16(le->le_name_chunk); in zap_leaf_byteswap()
128 le->le_name_numints = BSWAP_16(le->le_name_numints); in zap_leaf_byteswap()
129 le->le_value_chunk = BSWAP_16(le->le_value_chunk); in zap_leaf_byteswap()
130 le->le_value_numints = BSWAP_16(le->le_value_numints); in zap_leaf_byteswap()
131 le->le_cd = BSWAP_32(le->le_cd); in zap_leaf_byteswap()
132 le->le_hash = BSWAP_64(le->le_hash); in zap_leaf_byteswap()
426 struct zap_leaf_entry *le; in zap_leaf_lookup() local
431 *chunkp != CHAIN_END; chunkp = &le->le_next) { in zap_leaf_lookup()
433 le = ZAP_LEAF_ENTRY(l, chunk); in zap_leaf_lookup()
436 ASSERT3U(le->le_type, ==, ZAP_CHUNK_ENTRY); in zap_leaf_lookup()
438 if (le->le_hash != zn->zn_hash) in zap_leaf_lookup()
448 if (zap_leaf_array_match(l, zn, le->le_name_chunk, in zap_leaf_lookup()
449 le->le_name_numints)) { in zap_leaf_lookup()
450 zeh->zeh_num_integers = le->le_value_numints; in zap_leaf_lookup()
451 zeh->zeh_integer_size = le->le_value_intlen; in zap_leaf_lookup()
452 zeh->zeh_cd = le->le_cd; in zap_leaf_lookup()
453 zeh->zeh_hash = le->le_hash; in zap_leaf_lookup()
474 struct zap_leaf_entry *le; in zap_leaf_lookup_closest() local
480 chunk != CHAIN_END; chunk = le->le_next) { in zap_leaf_lookup_closest()
481 le = ZAP_LEAF_ENTRY(l, chunk); in zap_leaf_lookup_closest()
484 ASSERT3U(le->le_type, ==, ZAP_CHUNK_ENTRY); in zap_leaf_lookup_closest()
486 if (HCD_GTEQ(le->le_hash, le->le_cd, h, cd) && in zap_leaf_lookup_closest()
487 HCD_GTEQ(besth, bestcd, le->le_hash, le->le_cd)) { in zap_leaf_lookup_closest()
490 besth = le->le_hash; in zap_leaf_lookup_closest()
491 bestcd = le->le_cd; in zap_leaf_lookup_closest()
493 zeh->zeh_num_integers = le->le_value_numints; in zap_leaf_lookup_closest()
494 zeh->zeh_integer_size = le->le_value_intlen; in zap_leaf_lookup_closest()
495 zeh->zeh_cd = le->le_cd; in zap_leaf_lookup_closest()
496 zeh->zeh_hash = le->le_hash; in zap_leaf_lookup_closest()
511 struct zap_leaf_entry *le = in zap_entry_read() local
513 ASSERT3U(le->le_type, ==, ZAP_CHUNK_ENTRY); in zap_entry_read()
515 if (le->le_value_intlen > integer_size) in zap_entry_read()
518 zap_leaf_array_read(zeh->zeh_leaf, le->le_value_chunk, in zap_entry_read()
519 le->le_value_intlen, le->le_value_numints, in zap_entry_read()
532 struct zap_leaf_entry *le = in zap_entry_read_name() local
534 ASSERT3U(le->le_type, ==, ZAP_CHUNK_ENTRY); in zap_entry_read_name()
537 zap_leaf_array_read(zeh->zeh_leaf, le->le_name_chunk, 8, in zap_entry_read_name()
538 le->le_name_numints, 8, buflen / 8, buf); in zap_entry_read_name()
540 zap_leaf_array_read(zeh->zeh_leaf, le->le_name_chunk, 1, in zap_entry_read_name()
541 le->le_name_numints, 1, buflen, buf); in zap_entry_read_name()
543 if (le->le_name_numints > buflen) in zap_entry_read_name()
553 struct zap_leaf_entry *le = ZAP_LEAF_ENTRY(l, *zeh->zeh_chunkp); in zap_entry_update() local
556 ZAP_LEAF_ARRAY_NCHUNKS(le->le_value_numints * le->le_value_intlen); in zap_entry_update()
561 zap_leaf_array_free(l, le->le_value_chunk); in zap_entry_update()
562 le->le_value_chunk = in zap_entry_update()
564 le->le_value_numints = num_integers; in zap_entry_update()
565 le->le_value_intlen = integer_size; in zap_entry_update()
577 struct zap_leaf_entry *le = ZAP_LEAF_ENTRY(l, entry_chunk); in zap_entry_remove() local
578 ASSERT3U(le->le_type, ==, ZAP_CHUNK_ENTRY); in zap_entry_remove()
580 *zeh->zeh_chunkp = le->le_next; in zap_entry_remove()
583 zap_leaf_array_free(l, le->le_value_chunk); in zap_entry_remove()
584 zap_leaf_array_free(l, le->le_name_chunk); in zap_entry_remove()
596 struct zap_leaf_entry *le; in zap_entry_create() local
612 chunk != CHAIN_END; chunk = le->le_next) { in zap_entry_create()
613 le = ZAP_LEAF_ENTRY(l, chunk); in zap_entry_create()
614 if (le->le_cd > cd) in zap_entry_create()
616 if (le->le_hash == h) { in zap_entry_create()
617 ASSERT3U(cd, ==, le->le_cd); in zap_entry_create()
625 chunk != CHAIN_END; chunk = le->le_next) { in zap_entry_create()
626 le = ZAP_LEAF_ENTRY(l, chunk); in zap_entry_create()
627 if (le->le_hash == h && in zap_entry_create()
628 le->le_cd == cd) { in zap_entry_create()
649 le = ZAP_LEAF_ENTRY(l, chunk); in zap_entry_create()
650 le->le_type = ZAP_CHUNK_ENTRY; in zap_entry_create()
651 le->le_name_chunk = zap_leaf_array_create(l, zn->zn_key_orig, in zap_entry_create()
653 le->le_name_numints = zn->zn_key_orig_numints; in zap_entry_create()
654 le->le_value_chunk = in zap_entry_create()
656 le->le_value_numints = num_integers; in zap_entry_create()
657 le->le_value_intlen = integer_size; in zap_entry_create()
658 le->le_hash = h; in zap_entry_create()
659 le->le_cd = cd; in zap_entry_create()
663 uint16_t *chunkp = zap_leaf_rehash_entry(l, le, chunk); in zap_entry_create()
669 zeh->zeh_integer_size = le->le_value_intlen; in zap_entry_create()
670 zeh->zeh_cd = le->le_cd; in zap_entry_create()
671 zeh->zeh_hash = le->le_hash; in zap_entry_create()
691 struct zap_leaf_entry *le; in zap_entry_normalization_conflict() local
698 chunk != CHAIN_END; chunk = le->le_next) { in zap_entry_normalization_conflict()
699 le = ZAP_LEAF_ENTRY(zeh->zeh_leaf, chunk); in zap_entry_normalization_conflict()
700 if (le->le_hash != zeh->zeh_hash) in zap_entry_normalization_conflict()
702 if (le->le_cd == zeh->zeh_cd) in zap_entry_normalization_conflict()
710 le->le_name_chunk, le->le_name_numints)) { in zap_entry_normalization_conflict()
726 zap_leaf_rehash_entry(zap_leaf_t *l, struct zap_leaf_entry *le, uint16_t entry) in zap_leaf_rehash_entry() argument
736 for (chunkp = LEAF_HASH_ENTPTR(l, le->le_hash); in zap_leaf_rehash_entry()
739 if (le2->le_cd > le->le_cd) in zap_leaf_rehash_entry()
743 le->le_next = *chunkp; in zap_leaf_rehash_entry()
751 struct zap_leaf_entry *le = ZAP_LEAF_ENTRY(l, entry); in zap_leaf_transfer_entry() local
752 ASSERT3U(le->le_type, ==, ZAP_CHUNK_ENTRY); in zap_leaf_transfer_entry()
756 *nle = *le; /* structure assignment */ in zap_leaf_transfer_entry()
760 nle->le_name_chunk = zap_leaf_array_copy(l, le->le_name_chunk, nl); in zap_leaf_transfer_entry()
761 nle->le_value_chunk = zap_leaf_array_copy(l, le->le_value_chunk, nl); in zap_leaf_transfer_entry()
764 zap_leaf_array_free(l, le->le_value_chunk); in zap_leaf_transfer_entry()
765 zap_leaf_array_free(l, le->le_name_chunk); in zap_leaf_transfer_entry()
805 struct zap_leaf_entry *le = ZAP_LEAF_ENTRY(l, i); in zap_leaf_split() local
806 if (le->le_type != ZAP_CHUNK_ENTRY) in zap_leaf_split()
809 if (le->le_hash & (1ULL << bit)) in zap_leaf_split()
812 (void) zap_leaf_rehash_entry(l, le, i); in zap_leaf_split()
840 struct zap_leaf_entry *le = in zap_leaf_stats() local
843 n = 1 + ZAP_LEAF_ARRAY_NCHUNKS(le->le_name_numints) + in zap_leaf_stats()
844 ZAP_LEAF_ARRAY_NCHUNKS(le->le_value_numints * in zap_leaf_stats()
845 le->le_value_intlen); in zap_leaf_stats()
849 chunk = le->le_next; in zap_leaf_stats()