zfsonlinux/zfs — pull request #822 by dechamps (2012-07-11 16:53:32+00:00)
Title: Fix dynamic vdev expansion (zpool online -e)

This series of patches fixes a bunch of issues related to dynamic vdev expansion (`zpool online -e`), especially on whole disks.

There were numerous bugs in the whole code path: `zpool_relabel_disk` wasn't displaying errors correctly (5534b70), `zpool_vdev_online` wasn't using the right device path when relabelling (5d49b12), `efi_write` wasn't able to rescan partitions due to EBUSY (060f8d3), and `efi_use_whole_disk` was broken due to a regression in e5dc681 (48bf50a). These patches fix all of these problems. See the individual commits for details.

After applying these patches, `zpool online -e` should work gracefully in all circumstances.

Fixes #808.

@behlendorf: commit 060f8d3 uses a bunch of kernel-provided functions (`get_gendisk`, `bdget`, `blkdev_get`, `ioctl_by_bdev`). Expect trouble with old kernels.