mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-24 11:18:52 +03:00
Remove mg_allocators (#17192)
Previous code allowed each metaslab group to have different number of allocators. But in practice it worked only for embedded SLOGs, relying on a number of conditions and creating a significant mine field if any of those change. I just stepped on one myself. This change makes all groups to have spa_alloc_count allocators. It may cost us extra 192 bytes of memory per normal top-level vdev on large systems, but I find it a small price for cleaner and more reliable code. Signed-off-by: Alexander Motin <mav@FreeBSD.org> Sponsored by: iXsystems, Inc. Fixes #17188 Reviewed-by: Tony Hutter <hutter2@llnl.gov> Reviewed-by: Paul Dagnelie <pcd@delphix.com>
This commit is contained in:
+2
-3
@@ -1490,12 +1490,11 @@ vdev_metaslab_group_create(vdev_t *vd)
|
||||
mc = spa_normal_class(spa);
|
||||
}
|
||||
|
||||
vd->vdev_mg = metaslab_group_create(mc, vd,
|
||||
spa->spa_alloc_count);
|
||||
vd->vdev_mg = metaslab_group_create(mc, vd);
|
||||
|
||||
if (!vd->vdev_islog) {
|
||||
vd->vdev_log_mg = metaslab_group_create(
|
||||
spa_embedded_log_class(spa), vd, 1);
|
||||
spa_embedded_log_class(spa), vd);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user