Lines Matching +full:12 +full:vdc

88  *  ^  | 2 | 6 | 1 | 11| 4 | 0 | 7 | 10| 8 | 9 | 13| 5 | 12| 3 | device map 0
93 * | | 9 10 11 12 13 14 15 16 17| 45 46 47| | o
111 * | 9 | 11| 12| 2 | 4 | 1 | 3 | 0 | 10| 13| 8 | 5 | 6 | 7 | device map 1
119 * | 3 | 5 | 10| 8 | 6 | 11| 12| 0 | 2 | 4 | 7 | 1 | 9 | 13| device map 2
179 { 12, 256, 0x8847e41a1a9f5671, 0x00000010a0c63c8e }, /* 1.097 */
558 vdev_draid_get_perm(vdev_draid_config_t *vdc, uint64_t pindex, in vdev_draid_get_perm() argument
561 uint64_t ncols = vdc->vdc_children; in vdev_draid_get_perm()
562 uint64_t poff = pindex % (vdc->vdc_nperms * ncols); in vdev_draid_get_perm()
564 *base = vdc->vdc_perms + (poff / ncols) * ncols; in vdev_draid_get_perm()
569 vdev_draid_permute_id(vdev_draid_config_t *vdc, in vdev_draid_permute_id() argument
572 return ((base[index] + iter) % vdc->vdc_children); in vdev_draid_permute_id()
583 vdev_draid_config_t *vdc = vd->vdev_tsd; in vdev_draid_asize() local
588 uint64_t rows = ((psize - 1) / (vdc->vdc_ndata << ashift)) + 1; in vdev_draid_asize()
589 uint64_t asize = (rows * vdc->vdc_groupwidth) << ashift; in vdev_draid_asize()
592 ASSERT3U(asize % (vdc->vdc_groupwidth), ==, 0); in vdev_draid_asize()
603 vdev_draid_config_t *vdc = vd->vdev_tsd; in vdev_draid_asize_to_psize() local
605 ASSERT0(asize % vdc->vdc_groupwidth); in vdev_draid_asize_to_psize()
607 return ((asize / vdc->vdc_groupwidth) * vdc->vdc_ndata); in vdev_draid_asize_to_psize()
616 vdev_draid_config_t *vdc = vd->vdev_tsd; in vdev_draid_offset_to_group() local
620 return (offset / vdc->vdc_groupsz); in vdev_draid_offset_to_group()
629 vdev_draid_config_t *vdc = vd->vdev_tsd; in vdev_draid_group_to_offset() local
633 return (group * vdc->vdc_groupsz); in vdev_draid_group_to_offset()
901 vdev_draid_config_t *vdc = vd->vdev_tsd; in vdev_draid_logical_to_physical() local
923 uint64_t groupwidth = vdc->vdc_groupwidth; in vdev_draid_logical_to_physical()
924 uint64_t ngroups = vdc->vdc_ngroups; in vdev_draid_logical_to_physical()
925 uint64_t ndisks = vdc->vdc_ndisks; in vdev_draid_logical_to_physical()
931 uint64_t group = logical_offset / vdc->vdc_groupsz; in vdev_draid_logical_to_physical()
961 vdev_draid_config_t *vdc = vd->vdev_tsd; in vdev_draid_map_alloc_row() local
984 (io_asize >> ashift) % vdc->vdc_groupwidth == 0); in vdev_draid_map_alloc_row()
998 uint64_t ndisks = vdc->vdc_ndisks; in vdev_draid_map_alloc_row()
999 uint64_t groupwidth = vdc->vdc_groupwidth; in vdev_draid_map_alloc_row()
1012 uint64_t q = psize / vdc->vdc_ndata; in vdev_draid_map_alloc_row()
1018 uint64_t r = psize - q * vdc->vdc_ndata; in vdev_draid_map_alloc_row()
1021 uint64_t bc = (r == 0 ? 0 : r + vdc->vdc_nparity); in vdev_draid_map_alloc_row()
1025 uint64_t tot = psize + (vdc->vdc_nparity * (q + (r == 0 ? 0 : 1))); in vdev_draid_map_alloc_row()
1027 ASSERT3U(vdc->vdc_nparity, >, 0); in vdev_draid_map_alloc_row()
1031 rr->rr_firstdatacol = vdc->vdc_nparity; in vdev_draid_map_alloc_row()
1040 vdev_draid_get_perm(vdc, perm, &base, &iter); in vdev_draid_map_alloc_row()
1049 rc->rc_devidx = vdev_draid_permute_id(vdc, base, iter, c); in vdev_draid_map_alloc_row()
1151 vdev_draid_config_t *vdc = vd->vdev_tsd; in vdev_draid_get_astart() local
1155 return (roundup(start, vdc->vdc_groupwidth << vd->vdev_ashift)); in vdev_draid_get_astart()
1166 vdev_draid_config_t *vdc = vd->vdev_tsd; in vdev_draid_min_asize() local
1171 (vd->vdev_min_asize + vdc->vdc_ndisks - 1) / (vdc->vdc_ndisks)); in vdev_draid_min_asize()
1181 vdev_draid_config_t *vdc = vd->vdev_tsd; in vdev_draid_min_alloc() local
1185 return (vdc->vdc_ndata << vd->vdev_ashift); in vdev_draid_min_alloc()
1391 vdev_draid_config_t *vdc = vd->vdev_tsd; in vdev_draid_group_degraded() local
1402 vdev_draid_get_perm(vdc, perm, &base, &iter); in vdev_draid_group_degraded()
1404 for (uint64_t i = 0; i < vdc->vdc_groupwidth; i++) { in vdev_draid_group_degraded()
1405 uint64_t c = (groupstart + i) % vdc->vdc_ndisks; in vdev_draid_group_degraded()
1406 uint64_t cid = vdev_draid_permute_id(vdc, base, iter, c); in vdev_draid_group_degraded()
1431 vdev_draid_config_t *vdc = vd->vdev_tsd; in vdev_draid_group_missing() local
1442 vdev_draid_get_perm(vdc, perm, &base, &iter); in vdev_draid_group_missing()
1444 for (uint64_t i = 0; i < vdc->vdc_groupwidth; i++) { in vdev_draid_group_missing()
1445 uint64_t c = (groupstart + i) % vdc->vdc_ndisks; in vdev_draid_group_missing()
1446 uint64_t cid = vdev_draid_permute_id(vdc, base, iter, c); in vdev_draid_group_missing()
1530 vdev_draid_config_t *vdc = vd->vdev_tsd; in vdev_draid_open() local
1531 uint64_t nparity = vdc->vdc_nparity; in vdev_draid_open()
1583 *asize = (((child_asize * vdc->vdc_ndisks) / vdc->vdc_groupsz) * in vdev_draid_open()
1584 vdc->vdc_groupsz); in vdev_draid_open()
1585 *max_asize = (((child_max_asize * vdc->vdc_ndisks) / vdc->vdc_groupsz) * in vdev_draid_open()
1586 vdc->vdc_groupsz); in vdev_draid_open()
1614 vdev_draid_config_t *vdc = vd->vdev_tsd; in vdev_draid_rebuild_asize() local
1619 uint64_t ndata = vdc->vdc_ndata; in vdev_draid_rebuild_asize()
1624 ASSERT3U(asize % (vdc->vdc_groupwidth << ashift), ==, 0); in vdev_draid_rebuild_asize()
1635 ASSERT3U(chunk_size % (vdc->vdc_groupwidth << ashift), ==, 0); in vdev_draid_rebuild_asize()
1652 vdev_draid_config_t *vdc = vd->vdev_tsd; in vdev_draid_metaslab_init() local
1656 uint64_t sz = vdc->vdc_groupwidth << vd->vdev_ashift; in vdev_draid_metaslab_init()
1684 vdev_draid_config_t *vdc = cvd->vdev_tsd; in vdev_draid_spare_create() local
1685 draid_nspares += vdc->vdc_nspares; in vdev_draid_spare_create()
1717 vdev_draid_config_t *vdc = cvd->vdev_tsd; in vdev_draid_spare_create() local
1718 uint64_t nspares = vdc->vdc_nspares; in vdev_draid_spare_create()
1719 uint64_t nparity = vdc->vdc_nparity; in vdev_draid_spare_create()
2070 vdev_draid_config_t *vdc = vd->vdev_tsd; in vdev_draid_state_change() local
2073 if (faulted > vdc->vdc_nparity) in vdev_draid_state_change()
2089 vdev_draid_config_t *vdc = raidvd->vdev_tsd; in vdev_draid_xlate() local
2134 vdev_draid_get_perm(vdc, perm, &base, &iter); in vdev_draid_xlate()
2142 for (uint64_t i = 0; i < vdc->vdc_groupwidth; i++) { in vdev_draid_xlate()
2143 uint64_t c = (groupstart + i) % vdc->vdc_ndisks; in vdev_draid_xlate()
2151 id = vdev_draid_permute_id(vdc, base, iter, c); in vdev_draid_xlate()
2157 vdc->vdc_groupwidth) + 1) << ashift); in vdev_draid_xlate()
2184 vdev_draid_config_t *vdc = vd->vdev_tsd; in vdev_draid_config_generate() local
2186 fnvlist_add_uint64(nv, ZPOOL_CONFIG_NPARITY, vdc->vdc_nparity); in vdev_draid_config_generate()
2187 fnvlist_add_uint64(nv, ZPOOL_CONFIG_DRAID_NDATA, vdc->vdc_ndata); in vdev_draid_config_generate()
2188 fnvlist_add_uint64(nv, ZPOOL_CONFIG_DRAID_NSPARES, vdc->vdc_nspares); in vdev_draid_config_generate()
2189 fnvlist_add_uint64(nv, ZPOOL_CONFIG_DRAID_NGROUPS, vdc->vdc_ngroups); in vdev_draid_config_generate()
2239 vdev_draid_config_t *vdc; in vdev_draid_init() local
2246 vdc = kmem_zalloc(sizeof (*vdc), KM_SLEEP); in vdev_draid_init()
2247 vdc->vdc_ndata = ndata; in vdev_draid_init()
2248 vdc->vdc_nparity = nparity; in vdev_draid_init()
2249 vdc->vdc_nspares = nspares; in vdev_draid_init()
2250 vdc->vdc_children = children; in vdev_draid_init()
2251 vdc->vdc_ngroups = ngroups; in vdev_draid_init()
2252 vdc->vdc_nperms = map->dm_nperms; in vdev_draid_init()
2254 error = vdev_draid_generate_perms(map, &vdc->vdc_perms); in vdev_draid_init()
2256 kmem_free(vdc, sizeof (*vdc)); in vdev_draid_init()
2263 vdc->vdc_groupwidth = vdc->vdc_ndata + vdc->vdc_nparity; in vdev_draid_init()
2264 vdc->vdc_ndisks = vdc->vdc_children - vdc->vdc_nspares; in vdev_draid_init()
2265 vdc->vdc_groupsz = vdc->vdc_groupwidth * VDEV_DRAID_ROWHEIGHT; in vdev_draid_init()
2266 vdc->vdc_devslicesz = (vdc->vdc_groupsz * vdc->vdc_ngroups) / in vdev_draid_init()
2267 vdc->vdc_ndisks; in vdev_draid_init()
2269 ASSERT3U(vdc->vdc_groupwidth, >=, 2); in vdev_draid_init()
2270 ASSERT3U(vdc->vdc_groupwidth, <=, vdc->vdc_ndisks); in vdev_draid_init()
2271 ASSERT3U(vdc->vdc_groupsz, >=, 2 * VDEV_DRAID_ROWHEIGHT); in vdev_draid_init()
2272 ASSERT3U(vdc->vdc_devslicesz, >=, VDEV_DRAID_ROWHEIGHT); in vdev_draid_init()
2273 ASSERT3U(vdc->vdc_devslicesz % VDEV_DRAID_ROWHEIGHT, ==, 0); in vdev_draid_init()
2274 ASSERT3U((vdc->vdc_groupwidth * vdc->vdc_ngroups) % in vdev_draid_init()
2275 vdc->vdc_ndisks, ==, 0); in vdev_draid_init()
2277 *tsd = vdc; in vdev_draid_init()
2285 vdev_draid_config_t *vdc = vd->vdev_tsd; in vdev_draid_fini() local
2287 vmem_free(vdc->vdc_perms, sizeof (uint8_t) * in vdev_draid_fini()
2288 vdc->vdc_children * vdc->vdc_nperms); in vdev_draid_fini()
2289 kmem_free(vdc, sizeof (*vdc)); in vdev_draid_fini()
2295 vdev_draid_config_t *vdc = vd->vdev_tsd; in vdev_draid_nparity() local
2297 return (vdc->vdc_nparity); in vdev_draid_nparity()
2303 vdev_draid_config_t *vdc = vd->vdev_tsd; in vdev_draid_ndisks() local
2305 return (vdc->vdc_ndisks); in vdev_draid_ndisks()
2349 uint64_t vds_spare_id; /* spare id (0 - vdc->vdc_nspares-1) */
2406 vdev_draid_config_t *vdc = tvd->vdev_tsd; in vdev_draid_spare_get_child() local
2409 ASSERT3U(vds->vds_spare_id, <, vdc->vdc_nspares); in vdev_draid_spare_get_child()
2413 uint64_t perm = physical_offset / vdc->vdc_devslicesz; in vdev_draid_spare_get_child()
2415 vdev_draid_get_perm(vdc, perm, &base, &iter); in vdev_draid_spare_get_child()
2417 uint64_t cid = vdev_draid_permute_id(vdc, base, iter, in vdev_draid_spare_get_child()
2464 vdev_draid_config_t *vdc = tvd->vdev_tsd; in vdev_draid_spare_open() local
2465 if (tvd->vdev_ops != &vdev_draid_ops || vdc == NULL) in vdev_draid_spare_open()
2468 if (vds->vds_spare_id >= vdc->vdc_nspares) in vdev_draid_spare_open()