]> git.proxmox.com Git - mirror_zfs.git/commit
zpool reopen should detect expanded devices
authorSara Hartse <sara.hartse@gmail.com>
Thu, 31 May 2018 17:36:37 +0000 (10:36 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Thu, 31 May 2018 17:36:37 +0000 (10:36 -0700)
commit74d42600d8d391dab5c57e87e81f97e0ca07b7b2
tree8a32fc9cfbcc8a61e5fc0f6e00757dd2adb73b6d
parentd1f06ec5bccae26639b7bb6bd3925f9998848f86
zpool reopen should detect expanded devices

Update bdev_capacity to have wholedisk vdevs query the
size of the underlying block device (correcting for the size
of the efi parition and partition alignment) and therefore detect
expanded space.

Correct vdev_get_stats_ex so that the expandsize is aligned
to metaslab size and new space is only reported if it is large
enough for a new metaslab.

Reviewed by: Don Brady <don.brady@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed-by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: John Wren Kennedy <jwk404@gmail.com>
Signed-off-by: sara hartse <sara.hartse@delphix.com>
External-issue: LX-165
Closes #7546
Issue #7582
include/sys/vdev_disk.h
lib/libefi/rdwr_efi.c
lib/libzfs/libzfs_pool.c
module/zfs/vdev.c
module/zfs/vdev_disk.c
tests/zfs-tests/tests/functional/cli_root/zpool_expand/zpool_expand_002_pos.ksh