]> git.proxmox.com Git - mirror_zfs.git/commit
Fix race in vdev_initialize_thread
authorBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 6 Mar 2019 17:17:53 +0000 (09:17 -0800)
committerGitHub <noreply@github.com>
Wed, 6 Mar 2019 17:17:53 +0000 (09:17 -0800)
commit96ebc5a1a4cc57806882e4e9b38c49ba8a5bdfda
treebadaa649b8d8bc6a2040692ee3e94c260a99614b
parent762f9ef3d9d897b5baf7c91d6e8a7bf371a9b02f
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
module/zfs/vdev_initialize.c