]> git.proxmox.com Git - mirror_zfs.git/commit
OpenZFS 7885 - zpool list can report 16.0e for expandsz
authorSteven Hartland <steven.hartland@multiplay.co.uk>
Mon, 3 Apr 2017 23:38:51 +0000 (16:38 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 5 Apr 2017 16:33:20 +0000 (09:33 -0700)
commit2e215fecbe97167cd5408cea19aa50b80601248c
treefba001ae180648845160a98333e845944ab2f75f
parentd456708525b9c12b0416bdfd68f2ecec5121c78e
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
module/zfs/vdev.c