Please sign in to comment.
Prevent race in blkptr_verify against device removal
When we check the vdev of the blkptr in zfs_blkptr_verify, we can run into a race condition where that vdev is temporarily unavailable. This happens when a device removal operation and the old vdev_t has been removed from the array, but the new indirect vdev has not yet been inserted. We hold the spa_config_lock while doing our sensitive verification. To ensure that we don't deadlock, we only grab the lock if we don't have config_writer held. In addition, I had to const the tags of the refcounts and the spa_config_lock arguments. Reviewed-by: Brian Behlendorf <firstname.lastname@example.org> Reviewed-by: Serapheim Dimitropoulos <email@example.com> Signed-off-by: Paul Dagnelie <firstname.lastname@example.org> Closes #9112
- Loading branch information...
Showing with 35 additions and 28 deletions.