qemu-e2k/block
Kevin Wolf b8684454e1 raw-posix: Fix .bdrv_co_get_block_status() for unaligned image size
Image files with an unaligned image size have a final hole that starts
at EOF, i.e. in the middle of a sector. Currently, *pnum == 0 is
returned when checking the status of this sector. In qemu-img, this
triggers an assertion failure.

In order to fix this, one type for the sector that contains EOF must be
found. Treating a hole as data is safe, so this patch rounds the
calculated number of data sectors up, so that a partial sector at EOF is
treated as a full data sector.

This fixes https://bugzilla.redhat.com/show_bug.cgi?id=1229394

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Tested-by: Cole Robinson <crobinso@redhat.com>
2015-06-12 15:54:01 +02:00
..
accounting.c
archipelago.c
backup.c
blkdebug.c blkdebug: Simplify passing of Error through qemu_opts_foreach() 2015-06-09 07:40:23 +02:00
blkverify.c
block-backend.c
bochs.c
cloop.c
commit.c
curl.c
dmg.c
gluster.c
io.c block: get_block_status: use "else" when testing the opposite condition 2015-05-22 09:37:33 +01:00
iscsi.c iscsi: Remove pointless runtime check of macro value 2015-06-03 14:21:23 +03:00
linux-aio.c
Makefile.objs block: move I/O request processing to block/io.c 2015-04-28 15:36:17 +02:00
mirror.c
nbd-client.c
nbd-client.h
nbd.c
nfs.c
null.c
parallels.c block/parallels: improve image writing performance further 2015-05-22 09:37:32 +01:00
qapi.c qobject: Clean up around qtype_code 2015-05-11 08:59:07 -04:00
qcow2-cache.c qcow2: style fixes in qcow2-cache.c 2015-05-22 17:08:01 +02:00
qcow2-cluster.c qcow2/qcow: protect against uninitialized encryption key 2015-05-22 17:08:01 +02:00
qcow2-refcount.c qcow2: make qcow2_cache_put() a void function 2015-05-22 17:08:01 +02:00
qcow2-snapshot.c
qcow2.c qcow2: Add DEFAULT_L2_CACHE_CLUSTERS 2015-06-12 15:54:01 +02:00
qcow2.h qcow2: Add DEFAULT_L2_CACHE_CLUSTERS 2015-06-12 15:54:01 +02:00
qcow.c qcow2/qcow: protect against uninitialized encryption key 2015-05-22 17:08:01 +02:00
qed-check.c
qed-cluster.c
qed-gencb.c
qed-l2-cache.c
qed-table.c
qed.c
qed.h
quorum.c
raw_bsd.c
raw-aio.h
raw-posix.c raw-posix: Fix .bdrv_co_get_block_status() for unaligned image size 2015-06-12 15:54:01 +02:00
raw-win32.c
rbd.c
sheepdog.c sheepdog: fix resource leak with sd_snapshot_create 2015-05-08 14:11:10 +03:00
snapshot.c
ssh.c
stream.c
vdi.c
vhdx-endian.c
vhdx-log.c
vhdx.c
vhdx.h
vmdk.c vmdk: Use vmdk_find_index_in_cluster everywhere 2015-06-12 15:54:01 +02:00
vpc.c
vvfat.c
win32-aio.c
write-threshold.c