qemu-e2k/block
Kevin Wolf 22afa7b5b6 block-raw: Allow pread beyond the end of growable images
When using O_DIRECT, qcow2 snapshots didn't work any more for me. In the
process of creating the snapshot, qcow2 tries to pwrite some new information
(e.g. new L1 table) which will often end up being after the old end of the
image file. Now pwrite tries to align things and reads the old contents of the
file, read returns 0 because there is nothing to read after the end of file and
pwrite is stuck in an endless loop.

This patch allows to pread beyond the end of an image file. Whenever the
given offset is after the end of the image file, the read succeeds and fills
the buffer with zeros.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-06-29 14:18:07 -05:00
..
bochs.c
cloop.c
cow.c qemu-img: Print available options with -o ? 2009-06-06 18:38:57 +03:00
curl.c fully split aio_pool from BlockDriver 2009-05-27 09:46:03 -05:00
dmg.c support colon in filenames 2009-06-29 13:50:05 -05:00
nbd.c
parallels.c
qcow2-cluster.c alloc_cluster_link_l2: Write complete sectors 2009-06-16 15:18:36 -05:00
qcow2-refcount.c update_refcount: Write complete sectors 2009-06-16 15:18:37 -05:00
qcow2-snapshot.c Fix QCOW2 debugging code to compile again 2009-06-29 08:52:40 -05:00
qcow2.c Fix QCOW2 debugging code to compile again 2009-06-29 08:52:40 -05:00
qcow2.h Fix QCOW2 debugging code to compile again 2009-06-29 08:52:40 -05:00
qcow.c qemu-img: Print available options with -o ? 2009-06-06 18:38:57 +03:00
raw-posix.c block-raw: Allow pread beyond the end of growable images 2009-06-29 14:18:07 -05:00
raw-win32.c block: add bdrv_probe_device method 2009-06-15 14:04:22 +02:00
vmdk.c qemu-img: Print available options with -o ? 2009-06-06 18:38:57 +03: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