| 740 | } |
| 741 | |
| 742 | static void |
| 743 | zap_leaf_transfer_entry(zap_leaf_t *l, int entry, zap_leaf_t *nl) |
| 744 | { |
| 745 | struct zap_leaf_entry *le = ZAP_LEAF_ENTRY(l, entry); |
| 746 | ASSERT3U(le->le_type, ==, ZAP_CHUNK_ENTRY); |
| 747 | |
| 748 | uint16_t chunk = zap_leaf_chunk_alloc(nl); |
| 749 | struct zap_leaf_entry *nle = ZAP_LEAF_ENTRY(nl, chunk); |
| 750 | *nle = *le; /* structure assignment */ |
| 751 | |
| 752 | (void) zap_leaf_rehash_entry(nl, chunk); |
| 753 | |
| 754 | nle->le_name_chunk = zap_leaf_transfer_array(l, le->le_name_chunk, nl); |
| 755 | nle->le_value_chunk = |
| 756 | zap_leaf_transfer_array(l, le->le_value_chunk, nl); |
| 757 | |
| 758 | zap_leaf_chunk_free(l, entry); |
| 759 | |
| 760 | zap_leaf_phys(l)->l_hdr.lh_nentries--; |
| 761 | zap_leaf_phys(nl)->l_hdr.lh_nentries++; |
| 762 | } |
| 763 | |
| 764 | /* |
| 765 | * Transfer the entries whose hash prefix ends in 1 to the new leaf. |
no test coverage detected