]> git.proxmox.com Git - mirror_zfs.git/commit - module/zfs/zio.c
spa_min_alloc should be GCD, not min
authorAmeer Hamza <ahamza@ixsystems.com>
Thu, 20 Jul 2023 17:23:52 +0000 (22:23 +0500)
committerGitHub <noreply@github.com>
Thu, 20 Jul 2023 17:23:52 +0000 (10:23 -0700)
commitd9bb583c25d833e57c0842a81dca1bd50da5d9b1
treebff0987817a6d4cab358efac3ebce2aba2c72962
parent929173ab42fa9482455c8d51ed64326a3d983e41
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
include/sys/spa_impl.h
module/zfs/spa_misc.c
module/zfs/vdev.c
module/zfs/zio.c