aboutsummaryrefslogtreecommitdiff
path: root/os-win32.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2017-06-01 12:44:56 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2017-06-07 18:22:02 +0200
commit6bdcc018a6ed760b9dfe43539124e420aed83092 (patch)
tree28864efb950ffa58600716b6890f1eb672cd6542 /os-win32.c
parentb8158192fadb3e346372456c25cbbc4be584a85c (diff)
downloadqemu-6bdcc018a6ed760b9dfe43539124e420aed83092.zip
qemu-6bdcc018a6ed760b9dfe43539124e420aed83092.tar.gz
qemu-6bdcc018a6ed760b9dfe43539124e420aed83092.tar.bz2
nbd: make it thread-safe, fix qcow2 over nbd
NBD is not thread safe, because it accesses s->in_flight without a CoMutex. Fixing this will be required for multiqueue. CoQueue doesn't have spurious wakeups but, when another coroutine can run between qemu_co_queue_next's wakeup and qemu_co_queue_wait's re-locking of the mutex, the wait condition can become false and a loop is necessary. In fact, it turns out that the loop is necessary even without this multi-threaded scenario. A particular sequence of coroutine wakeups is happening ~80% of the time when starting a guest with qcow2 image served over NBD (i.e. qemu-nbd --format=raw, and QEMU's -drive option has -format=qcow2). This patch fixes that issue too. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'os-win32.c')
0 files changed, 0 insertions, 0 deletions