Use the right device path when relabeling.
authorEtienne Dechamps <etienne.dechamps@ovh.net>
Fri, 6 Jul 2012 14:22:03 +0000 (16:22 +0200)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Thu, 12 Jul 2012 15:59:16 +0000 (08:59 -0700)
commit7608bd0dd01829a130cd8a4d244e197ce8fa590a
tree8e895f8fe4e4e2f471257f3fd4b36b8f2c926c82
parent8adf48642253c2ef9571ece5b233e0bf1f0217a8
Use the right device path when relabeling.

Currently, zpool_vdev_online() calls zpool_relabel_disk() with a short
partition device name, which is obviously wrong because (1)
zpool_relabel_disk() expects a full, absolute path to use with open()
and (2) efi_write() must be called on an opened disk device, not a
partition device.

With this patch, zpool_relabel_disk() gets called with a full disk
device path. The path is determined using the same algorithm as
zpool_find_vdev().

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue #808
lib/libzfs/libzfs_pool.c