diff options
| author | Paolo Bonzini | 2017-06-01 12:44:56 +0200 |
|---|---|---|
| committer | Paolo Bonzini | 2017-06-07 18:22:02 +0200 |
| commit | 6bdcc018a6ed760b9dfe43539124e420aed83092 (patch) | |
| tree | 28864efb950ffa58600716b6890f1eb672cd6542 /scripts/checkpatch.pl | |
| parent | target/i386: Add GDB XML description for SSE registers (diff) | |
| download | qemu-6bdcc018a6ed760b9dfe43539124e420aed83092.tar.gz qemu-6bdcc018a6ed760b9dfe43539124e420aed83092.tar.xz qemu-6bdcc018a6ed760b9dfe43539124e420aed83092.zip | |
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 'scripts/checkpatch.pl')
0 files changed, 0 insertions, 0 deletions
