HomeFreeBSD

Leaf vdevs should not be reopened

Description

Leaf vdevs should not be reopened

When vdev_disk.c was implemented for Linux we failed to handle the
reopen case. According to the vdev_reopen() comment leaf vdevs should
not be closed or opened when v->vdev_reopening is set. Under Linux
we would always close and open the device.

This issue was only noticed when a 'zpool scrub' command was run while
the leaf vdev device names in /dev/disk/by-vdev were missing. The
scrub command calls vdev_reopen() which caused the vdevs to be closed
but they couldn't be reopened due to the missing links. The result
was that all the vdevs were marked unavailable and the pool was
halted due to failmode=wait.

This patch adds the missing functionality in a similiar fashion to
to the Illumos code.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>

Details

Provenance
Brian Behlendorf <behlendorf1@llnl.gov>Authored on Feb 26 2013, 7:25 PM
Parents
rGc5b247f3354d: -x shouldn't warn about old on-disk format or unavailable features
Branches
Unknown
Tags
Unknown

Event Timeline

Brian Behlendorf <behlendorf1@llnl.gov> committed rG0d8103d9561b: Leaf vdevs should not be reopened (authored by Brian Behlendorf <behlendorf1@llnl.gov>).Feb 28 2013, 8:02 PM