| 150 | } |
| 151 | |
| 152 | static inline mirror_map_t * |
| 153 | vdev_mirror_map_alloc(int children, boolean_t resilvering, boolean_t root) |
| 154 | { |
| 155 | mirror_map_t *mm; |
| 156 | |
| 157 | mm = kmem_zalloc(vdev_mirror_map_size(children), KM_SLEEP); |
| 158 | mm->mm_children = children; |
| 159 | mm->mm_resilvering = resilvering; |
| 160 | mm->mm_root = root; |
| 161 | mm->mm_preferred = (int *)((uintptr_t)mm + |
| 162 | offsetof(mirror_map_t, mm_child[children])); |
| 163 | |
| 164 | return (mm); |
| 165 | } |
| 166 | |
| 167 | static void |
| 168 | vdev_mirror_map_free(zio_t *zio) |
no test coverage detected