HomeFreeBSD

Make vdev_set_deferred_resilver() recursive

Description

Make vdev_set_deferred_resilver() recursive

vdev_clear() can call vdev_set_deferred_resilver() with a
non-leaf vdev to setup a deferred resilver. However, this
function is currently written to only handle leaf vdevs.
This bug was introduced with deferred resilvers in 80a91e74.
This patch makes this function recursive so that it can find
appropriate vdevs to resilver and set vdev_resilver_deferred
on them.

Reviewed-by: Matthew Ahrens <mahrens@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Tom Caputi <tcaputi@datto.com>
Issue #7732
Closes #8082

Details

Provenance
Tom Caputi <tcaputi@datto.com>Authored on Nov 7 2018, 11:33 PM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Nov 7 2018, 11:33 PM
Parents
rG95692927f284: Fix libudev dependency in libzutil
Branches
Unknown
Tags
Unknown

Event Timeline

Brian Behlendorf <behlendorf1@llnl.gov> committed rG4021ba4cfaa8: Make vdev_set_deferred_resilver() recursive (authored by Tom Caputi <tcaputi@datto.com>).Nov 7 2018, 11:33 PM