| 712 | } |
| 713 | |
| 714 | static uint16_t |
| 715 | zap_leaf_transfer_array(zap_leaf_t *l, uint16_t chunk, zap_leaf_t *nl) |
| 716 | { |
| 717 | uint16_t new_chunk; |
| 718 | uint16_t *nchunkp = &new_chunk; |
| 719 | |
| 720 | while (chunk != CHAIN_END) { |
| 721 | uint16_t nchunk = zap_leaf_chunk_alloc(nl); |
| 722 | struct zap_leaf_array *nla = |
| 723 | &ZAP_LEAF_CHUNK(nl, nchunk).l_array; |
| 724 | struct zap_leaf_array *la = |
| 725 | &ZAP_LEAF_CHUNK(l, chunk).l_array; |
| 726 | int nextchunk = la->la_next; |
| 727 | |
| 728 | ASSERT3U(chunk, <, ZAP_LEAF_NUMCHUNKS(l)); |
| 729 | ASSERT3U(nchunk, <, ZAP_LEAF_NUMCHUNKS(l)); |
| 730 | |
| 731 | *nla = *la; /* structure assignment */ |
| 732 | |
| 733 | zap_leaf_chunk_free(l, chunk); |
| 734 | chunk = nextchunk; |
| 735 | *nchunkp = nchunk; |
| 736 | nchunkp = &nla->la_next; |
| 737 | } |
| 738 | *nchunkp = CHAIN_END; |
| 739 | return (new_chunk); |
| 740 | } |
| 741 | |
| 742 | static void |
| 743 | zap_leaf_transfer_entry(zap_leaf_t *l, int entry, zap_leaf_t *nl) |
no test coverage detected