Commit 3f218e89 authored by Jean-Philippe Brucker's avatar Jean-Philippe Brucker Committed by Will Deacon
Browse files

virtio/blk: sync I/O on reset



Ensure that all requests are complete when resetting a virtqueue, by
draining the AIO queue after stopping the submission thread.
Signed-off-by: default avatarJean-Philippe Brucker <jean-philippe.brucker@arm.com>
Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
parent 2790307c
......@@ -248,6 +248,8 @@ static void exit_vq(struct kvm *kvm, void *dev, u32 vq)
close(bdev->io_efd);
pthread_cancel(bdev->io_thread);
pthread_join(bdev->io_thread, NULL);
disk_image__wait(bdev->disk);
}
static int notify_vq(struct kvm *kvm, void *dev, u32 vq)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment