diff options
author | Alexander Motin <mav@FreeBSD.org> | 2025-02-18 18:45:42 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-02-18 18:45:42 +0000 |
commit | 6a2f7b38442b42f4bc9a848f8de10fc792ce8d76 (patch) | |
tree | b2f93cdc533cb2c5ad0f01547fac14f84b4a662a /sys/(public-mirror) | |
parent | 68473c4fd84774ffa0e413975f49ac1a98b84858 (diff) |
Fix metaslab group fragmentation math (#17037)vendor/openzfs/master
Since we are calculating a free space fragmentation, we should
weight metaslabs by the amount of their free space, not a full
size. Fragmentation of full metaslabs may not matter in presence
empty ones. The old algorithm did not differentiate metaslabs
having only one free 4KB block from metaslabs having 50% of space
free in 4KB blocks, reporting higher fragmentation.
While there, move metaslab_group_alloc_update() call after setting
mg_fragmentation, otherwise the effect may be delayed by one TXG.
Signed-off-by: Alexander Motin <mav@FreeBSD.org>
Sponsored by: iXsystems, Inc.
Reviewed-by: Paul Dagnelie <pcd@delphix.com>
Reviewed-by: Tony Nguyen <tony.nguyen@delphix.com>
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Diffstat (limited to 'sys/(public-mirror)')
0 files changed, 0 insertions, 0 deletions