freebsd-dev/sys/cddl/contrib/opensolaris
Steven Hartland 3e856909b7 Fix expandsz 16.0E vals and vdev_min_asize of RAIDZ children
When a member of a RAIDZ has been replaced with a device smaller than the
original, then the top level vdev can report its expand size as 16.0E.

The reduced child asize causes the RAIDZ to have a vdev_asize lower than its
vdev_max_asize which then results in an underflow during the calculation of
the parents expand size.

Fix this by updating the vdev_asize if it shrinks, which is already
protected by a check against vdev_min_asize so should always be safe.

Also for RAIDZ vdevs, ensure that the sum of their child vdev_min_asize is
always greater than the parents vdev_min_size.

Fixes: https://www.illumos.org/issues/7885

MFC after:	2 weeks
Sponsored by:	Multiplay
2017-04-03 13:11:28 +00:00
..
common MFV r302662: 6447 handful of nvpair cleanups 2016-09-01 15:17:39 +00:00
uts Fix expandsz 16.0E vals and vdev_min_asize of RAIDZ children 2017-04-03 13:11:28 +00:00
OPENSOLARIS.LICENSE