HomeFreeBSD

spa_min_alloc should be GCD, not min

Description

spa_min_alloc should be GCD, not min

Since spa_min_alloc may not be a power of 2, unlike ashifts, in the
case of DRAID, we should not select the minimal value among several
vdevs. Rounding to a multiple of it is unlikely to work for other
vdevs. Instead, using the greatest common divisor produces smaller
yet more reasonable results.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Signed-off-by: Ameer Hamza <ahamza@ixsystems.com>
Closes #15067

Details

Provenance
Ameer Hamza <ahamza@ixsystems.com>Authored on Jul 20 2023, 5:23 PM
GitHub <noreply@github.com>Committed on Jul 20 2023, 5:23 PM
Parents
rG929173ab42fa: Don't panic if setting vdev properties is unsupported for this vdev type
Branches
Unknown
Tags
Unknown

Event Timeline

GitHub <noreply@github.com> committed rGd9bb583c25d8: spa_min_alloc should be GCD, not min (authored by Ameer Hamza <ahamza@ixsystems.com>).Jul 20 2023, 5:23 PM