qemu-irix/block
Kevin Wolf 08fd2f30bd qcow2: Bring synchronous read/write back to life
When the synchronous read and write functions were dropped, they were replaced
by generic emulation functions. Unfortunately, these emulation functions don't
provide the same semantics as the original functions did.

The original bdrv_read would mean that we read some data synchronously and that
we won't be interrupted during this read. The latter assumption is no longer
true with the emulation function which needs to use qemu_aio_poll and therefore
allows the callback of any other concurrent AIO request to be run during the
read. Which in turn means that (meta)data read earlier could have changed and
be invalid now. qcow2 is not prepared to work in this way and it's just scary
how many places there are where other requests could run.

I'm not sure yet where exactly it breaks, but you'll see breakage with virtio
on qcow2 with a backing file. Providing synchronous functions again fixes the
problem for me.

Patchworks-ID: 35437
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
(cherry picked from commit ef845c3bf4)

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2009-12-03 11:29:25 +01:00
..
bochs.c Move block drivers into their own directory 2009-05-14 16:13:46 -05:00
cloop.c Move block drivers into their own directory 2009-05-14 16:13:46 -05:00
cow.c qemu-img: Print available options with -o ? 2009-06-06 18:38:57 +03:00
curl.c Fix Sparse warning about "expression using sizeof on a function" 2009-08-27 21:23:37 -05:00
dmg.c Revert "support colon in filenames" 2009-07-09 16:06:38 -05:00
nbd.c Move block drivers into their own directory 2009-05-14 16:13:46 -05:00
parallels.c Move block drivers into their own directory 2009-05-14 16:13:46 -05:00
qcow.c qcow1: Fix qcow_aio_writev 2009-07-10 13:44:29 -05:00
qcow2-cluster.c qcow2: Bring synchronous read/write back to life 2009-12-03 11:29:25 +01:00
qcow2-refcount.c Fix most warnings (errors with -Werror) when debugging is enabled 2009-07-22 15:41:01 -05:00
qcow2-snapshot.c Fix QCOW2 debugging code to compile again 2009-06-29 08:52:40 -05:00
qcow2.c qcow2: Bring synchronous read/write back to life 2009-12-03 11:29:25 +01:00
qcow2.h qcow2: Bring synchronous read/write back to life 2009-12-03 11:29:25 +01:00
raw-posix.c Fix most warnings (errors with -Werror) when debugging is enabled 2009-07-22 15:41:01 -05:00
raw-win32.c block: add bdrv_probe_device method 2009-06-15 14:04:22 +02:00
vmdk.c vmdk: Fix backing file handling 2009-07-22 15:41:01 -05:00
vpc.c qemu-img: Print available options with -o ? 2009-06-06 18:38:57 +03:00
vvfat.c vvfat: one more missing BlockDriver C99 initializer conversion 2009-05-28 02:14:56 -05:00