Steven Hartland 2e215fecbe OpenZFS 7885 - zpool list can report 16.0e for expandsz
Authored by: Steven Hartland <steven.hartland@multiplay.co.uk>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Approved by: Gordon Ross <gordon.w.ross@gmail.com>

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.

Reviewed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Ported-by: George Melikov <mail@gmelikov.ru>

OpenZFS-issue: https://www.illumos.org/issues/7885
OpenZFS-commit: https://github.com/openzfs/openzfs/commit/bb0dbaa
Closes #5963
2017-04-05 09:33:20 -07:00
..
2017-03-29 12:24:51 -07:00
2017-03-20 18:36:00 -07:00
2015-01-16 14:41:26 -08:00
2015-01-16 14:41:26 -08:00
2016-11-02 12:14:45 -07:00
2016-12-12 10:46:26 -08:00
2017-01-03 11:31:18 -06:00
2015-01-16 14:41:26 -08:00
2016-04-21 09:49:25 -07:00
2017-01-03 11:31:18 -06:00
2010-08-31 13:41:58 -07:00
2017-01-03 11:31:18 -06:00
2016-08-11 11:23:49 -07:00
2017-01-03 11:31:18 -06:00
2016-12-02 16:57:49 -07:00
2016-11-29 14:34:33 -08:00
2017-03-29 12:24:51 -07:00
2013-10-31 14:58:04 -07:00
2017-03-10 09:51:33 -08:00
2010-08-31 13:41:58 -07:00
2017-03-10 09:51:41 -08:00
2017-03-10 09:51:33 -08:00
2017-04-03 14:23:02 -07:00
2017-03-10 09:51:33 -08:00
2017-03-10 09:51:41 -08:00
2017-03-10 09:51:33 -08:00
2017-01-03 11:31:18 -06:00
2017-03-10 09:51:33 -08:00
2017-03-10 09:51:35 -08:00
2017-03-29 12:24:51 -07:00
2017-03-29 12:24:51 -07:00
2017-03-10 09:51:33 -08:00
2017-03-10 09:51:41 -08:00
2017-03-10 09:51:33 -08:00
2017-01-23 10:35:58 -08:00
2017-03-09 17:43:36 -08:00