freebsd-nq/sys/cddl
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
..
boot/zfs loader: update symlink support in zfs reader 2017-02-22 22:00:50 +00:00
compat/opensolaris MFV r315290, r315291: 7303 dynamic metaslab selection 2017-03-24 09:37:00 +00:00
contrib/opensolaris Fix expandsz 16.0E vals and vdev_min_asize of RAIDZ children 2017-04-03 13:11:28 +00:00
dev Fix a backwards comparison in the code to dump a DTrace debug buffer. 2017-03-13 18:43:00 +00:00