]> git.karo-electronics.de Git - karo-tx-linux.git/commit
kvm tools, qcow: Fix locking issues
authorPekka Enberg <penberg@kernel.org>
Sat, 9 Jul 2011 11:04:12 +0000 (14:04 +0300)
committerPekka Enberg <penberg@kernel.org>
Sun, 10 Jul 2011 12:23:22 +0000 (15:23 +0300)
commitb973dfba85bf3cc3e4861ba192c4a76e358e649c
tree3b1fee3c3aa2a383caf9d1a4d314f651bd3e948e
parent6d7b6feeb8f87a0be81bc52027cb023229126227
kvm tools, qcow: Fix locking issues

The virtio_blk_do_io() function can enter the QCOW code through
disk_image__{read,write,flush}() from multiple threads because it uses a thread
pool for I/O requests. Thus, use locking to make the QCOW2 code thread-safe.

Cc: Asias He <asias.hejun@gmail.com>
Cc: Cyrill Gorcunov <gorcunov@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Prasad Joshi <prasadjoshi124@gmail.com>
Cc: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
tools/kvm/disk/qcow.c
tools/kvm/include/kvm/mutex.h
tools/kvm/include/kvm/qcow.h