HomeFreeBSD

Use the right device path when relabeling.

Description

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

Details

Provenance
Etienne Dechamps <etienne.dechamps@ovh.net>Authored on Jul 6 2012, 2:22 PM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Jul 12 2012, 3:59 PM
Parents
rG8adf48642253: Fix error handling for "zpool online -e".
Branches
Unknown
Tags
Unknown

Event Timeline

Brian Behlendorf <behlendorf1@llnl.gov> committed rG7608bd0dd018: Use the right device path when relabeling. (authored by Etienne Dechamps <etienne.dechamps@ovh.net>).Jul 12 2012, 3:59 PM