]> git.proxmox.com Git - mirror_qemu.git/commit
vdi: make it thread-safe
authorPaolo Bonzini <pbonzini@redhat.com>
Thu, 29 Jun 2017 13:27:41 +0000 (15:27 +0200)
committerFam Zheng <famz@redhat.com>
Mon, 17 Jul 2017 03:28:15 +0000 (11:28 +0800)
commit1e886639791762e89b51aa0507f523c6a1448831
tree0dd8ee307a4282fc631e8f8a20de6ae4dced666b
parent667221c10d05a22573dae1928880bca525f8cd20
vdi: make it thread-safe

The VirtualBox driver is using a mutex to order all allocating writes,
but it is not protecting accesses to the bitmap because they implicitly
happen under the AioContext mutex.  Change this to use a CoRwlock
explicitly.

Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20170629132749.997-4-pbonzini@redhat.com>
Signed-off-by: Fam Zheng <famz@redhat.com>
block/vdi.c