mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 18:40:43 +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:
@@ -118,7 +118,7 @@ uint64_t metaslab_class_get_deferred(metaslab_class_t *);
|
||||
void metaslab_space_update(vdev_t *, metaslab_class_t *,
|
||||
int64_t, int64_t, int64_t);
|
||||
|
||||
metaslab_group_t *metaslab_group_create(metaslab_class_t *, vdev_t *, int);
|
||||
metaslab_group_t *metaslab_group_create(metaslab_class_t *, vdev_t *);
|
||||
void metaslab_group_destroy(metaslab_group_t *);
|
||||
void metaslab_group_activate(metaslab_group_t *);
|
||||
void metaslab_group_passivate(metaslab_group_t *);
|
||||
|
||||
@@ -269,7 +269,6 @@ struct metaslab_group {
|
||||
kmutex_t mg_ms_disabled_lock;
|
||||
kcondvar_t mg_ms_disabled_cv;
|
||||
|
||||
int mg_allocators;
|
||||
metaslab_group_allocator_t mg_allocator[];
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user