HomeFreeBSD

Fix race in vdev_initialize_thread

Description

Fix race in vdev_initialize_thread

Before allowing new allocations to the metaslab we need to ensure
that any issued initializing writes have been synced. Otherwise,
it's possible for metaslab_block_alloc() to allocate a range which
is about to be overwritten by an initializing IO.

Serapheim Dimitropoulos <serapheim@delphix.com>
Reviewed-by: Richard Elling <Richard.Elling@RichardElling.com>
Reviewed-by: Tim Chase <tim@chase2k.com>
Reviewed-by: George Wilson <george.wilson@delphix.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #8461

Details

Provenance
Brian Behlendorf <behlendorf1@llnl.gov>Authored on Mar 6 2019, 5:17 PM
GitHub <noreply@github.com>Committed on Mar 6 2019, 5:17 PM
Parents
rG762f9ef3d9d8: config: better libtirpc detection
Branches
Unknown
Tags
Unknown

Event Timeline

GitHub <noreply@github.com> committed rG96ebc5a1a4cc: Fix race in vdev_initialize_thread (authored by Brian Behlendorf <behlendorf1@llnl.gov>).Mar 6 2019, 5:17 PM