Revision 9c5a8433cee3f03ecd67de0046c41ed9b01d1993 authored by Eric Blake on 11 June 2018, 21:39:26 UTC, committed by Michael Roth on 21 June 2018, 01:45:07 UTC
Commit a290f085 exposed a latent bug in qemu-img map introduced during the conversion of block status to be byte-based. Earlier in commit 5e344dd8, the internal interface get_block_status() switched to take byte-based parameters, but still called a sector-based block layer function; as such, rounding was added in the lone caller to obey the contract. However, commit 237d78f8 changed get_block_status() to truly be byte-based, at which point rounding to sector boundaries can result in calling bdrv_block_status() with 'bytes == 0' (a coding error) when the boundary between data and a hole falls mid-sector (true for the past-EOF implicit hole present in POSIX files). Fix things by removing the rounding that is now no longer necessary. See also https://bugzilla.redhat.com/1589738 Fixes: 237d78f8 Reported-by: Dan Kenigsberg <danken@redhat.com> Reported-by: Nir Soffer <nsoffer@redhat.com> Reported-by: Maor Lipchuk <mlipchuk@redhat.com> CC: qemu-stable@nongnu.org Signed-off-by: Eric Blake <eblake@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com> (cherry picked from commit e0b371ed5e2db079051139136fd0478728b6a58f) Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
1 parent d8a919f
File | Mode | Size |
---|---|---|
acpi-test-data | ||
data | ||
docker | ||
guest-debug | ||
image-fuzzer | ||
keys | ||
libqos | ||
migration | ||
multiboot | ||
qapi-schema | ||
qemu-iotests | ||
rocker | ||
tcg | ||
vm | ||
vmstate-static-checker-data | ||
.gitignore | -rw-r--r-- | 1.7 KB |
Makefile.include | -rw-r--r-- | 43.4 KB |
ac97-test.c | -rw-r--r-- | 585 bytes |
acpi-utils.c | -rw-r--r-- | 1.5 KB |
acpi-utils.h | -rw-r--r-- | 3.1 KB |
ahci-test.c | -rw-r--r-- | 57.1 KB |
atomic_add-bench.c | -rw-r--r-- | 3.6 KB |
benchmark-crypto-cipher.c | -rw-r--r-- | 2.6 KB |
benchmark-crypto-hash.c | -rw-r--r-- | 1.7 KB |
benchmark-crypto-hmac.c | -rw-r--r-- | 2.0 KB |
bios-tables-test.c | -rw-r--r-- | 26.3 KB |
boot-order-test.c | -rw-r--r-- | 5.2 KB |
boot-sector.c | -rw-r--r-- | 4.7 KB |
boot-sector.h | -rw-r--r-- | 665 bytes |
boot-serial-test.c | -rw-r--r-- | 3.5 KB |
check-block.sh | -rwxr-xr-x | 449 bytes |
check-qdict.c | -rw-r--r-- | 21.2 KB |
check-qjson.c | -rw-r--r-- | 44.8 KB |
check-qlist.c | -rw-r--r-- | 2.1 KB |
check-qlit.c | -rw-r--r-- | 1.6 KB |
check-qnull.c | -rw-r--r-- | 1.8 KB |
check-qnum.c | -rw-r--r-- | 3.8 KB |
check-qobject.c | -rw-r--r-- | 10.1 KB |
check-qom-interface.c | -rw-r--r-- | 2.4 KB |
check-qom-proplist.c | -rw-r--r-- | 17.1 KB |
check-qstring.c | -rw-r--r-- | 2.2 KB |
crypto-tls-x509-helpers.c | -rw-r--r-- | 14.3 KB |
crypto-tls-x509-helpers.h | -rw-r--r-- | 5.3 KB |
device-introspect-test.c | -rw-r--r-- | 6.7 KB |
display-vga-test.c | -rw-r--r-- | 1.6 KB |
drive_del-test.c | -rw-r--r-- | 3.4 KB |
ds1338-test.c | -rw-r--r-- | 1.9 KB |
e1000-test.c | -rw-r--r-- | 1.0 KB |
e1000e-test.c | -rw-r--r-- | 13.2 KB |
eepro100-test.c | -rw-r--r-- | 1.1 KB |
endianness-test.c | -rw-r--r-- | 10.3 KB |
es1370-test.c | -rw-r--r-- | 591 bytes |
fdc-test.c | -rw-r--r-- | 13.5 KB |
fw_cfg-test.c | -rw-r--r-- | 3.4 KB |
hd-geo-test.c | -rw-r--r-- | 10.8 KB |
i440fx-test.c | -rw-r--r-- | 12.3 KB |
i82801b11-test.c | -rw-r--r-- | 641 bytes |
ide-test.c | -rw-r--r-- | 27.1 KB |
intel-hda-test.c | -rw-r--r-- | 1.0 KB |
io-channel-helpers.c | -rw-r--r-- | 4.2 KB |
io-channel-helpers.h | -rw-r--r-- | 1.4 KB |
ioh3420-test.c | -rw-r--r-- | 700 bytes |
iothread.c | -rw-r--r-- | 2.2 KB |
iothread.h | -rw-r--r-- | 603 bytes |
ipmi-bt-test.c | -rw-r--r-- | 11.7 KB |
ipmi-kcs-test.c | -rw-r--r-- | 7.8 KB |
ipoctal232-test.c | -rw-r--r-- | 664 bytes |
ivshmem-test.c | -rw-r--r-- | 13.1 KB |
libqtest.c | -rw-r--r-- | 24.6 KB |
libqtest.h | -rw-r--r-- | 23.1 KB |
m25p80-test.c | -rw-r--r-- | 10.0 KB |
m48t59-test.c | -rw-r--r-- | 5.9 KB |
megasas-test.c | -rw-r--r-- | 2.2 KB |
migration-test.c | -rw-r--r-- | 18.4 KB |
ne2000-test.c | -rw-r--r-- | 609 bytes |
numa-test.c | -rw-r--r-- | 7.5 KB |
nvme-test.c | -rw-r--r-- | 676 bytes |
pc-cpu-test.c | -rw-r--r-- | 3.8 KB |
pcnet-test.c | -rw-r--r-- | 610 bytes |
pkix_asn1_tab.c | -rw-r--r-- | 39.1 KB |
pnv-xscom-test.c | -rw-r--r-- | 3.5 KB |
prom-env-test.c | -rw-r--r-- | 3.0 KB |
ptimer-test-stubs.c | -rw-r--r-- | 2.4 KB |
ptimer-test.c | -rw-r--r-- | 21.4 KB |
ptimer-test.h | -rw-r--r-- | 409 bytes |
pvpanic-test.c | -rw-r--r-- | 1.0 KB |
pxe-test.c | -rw-r--r-- | 2.8 KB |
q35-test.c | -rw-r--r-- | 6.5 KB |
qemu-iotests-quick.sh | -rwxr-xr-x | 136 bytes |
qht-bench.c | -rw-r--r-- | 12.5 KB |
qmp-test.c | -rw-r--r-- | 8.3 KB |
qom-test.c | -rw-r--r-- | 3.3 KB |
rcutorture.c | -rw-r--r-- | 11.6 KB |
rtas-test.c | -rw-r--r-- | 887 bytes |
rtc-test.c | -rw-r--r-- | 20.0 KB |
rtl8139-test.c | -rw-r--r-- | 5.1 KB |
spapr-phb-test.c | -rw-r--r-- | 724 bytes |
tco-test.c | -rw-r--r-- | 12.1 KB |
test-aio-multithread.c | -rw-r--r-- | 10.6 KB |
test-aio.c | -rw-r--r-- | 25.5 KB |
test-arm-mptimer.c | -rw-r--r-- | 29.2 KB |
test-base64.c | -rw-r--r-- | 3.2 KB |
test-bitcnt.c | -rw-r--r-- | 4.1 KB |
test-bitops.c | -rw-r--r-- | 3.5 KB |
test-blockjob-txn.c | -rw-r--r-- | 6.7 KB |
test-blockjob.c | -rw-r--r-- | 3.9 KB |
test-bufferiszero.c | -rw-r--r-- | 2.1 KB |
test-char.c | -rw-r--r-- | 20.3 KB |
test-clone-visitor.c | -rw-r--r-- | 6.0 KB |
test-coroutine.c | -rw-r--r-- | 10.1 KB |
test-crypto-afsplit.c | -rw-r--r-- | 5.9 KB |
test-crypto-block.c | -rw-r--r-- | 9.6 KB |
test-crypto-cipher.c | -rw-r--r-- | 27.4 KB |
test-crypto-hash.c | -rw-r--r-- | 8.2 KB |
test-crypto-hmac.c | -rw-r--r-- | 7.1 KB |
test-crypto-ivgen.c | -rw-r--r-- | 5.5 KB |
test-crypto-pbkdf.c | -rw-r--r-- | 13.3 KB |
test-crypto-secret.c | -rw-r--r-- | 11.4 KB |
test-crypto-tlscredsx509.c | -rw-r--r-- | 27.1 KB |
test-crypto-tlssession.c | -rw-r--r-- | 18.9 KB |
test-crypto-xts.c | -rw-r--r-- | 17.8 KB |
test-cutils.c | -rw-r--r-- | 44.5 KB |
test-filter-mirror.c | -rw-r--r-- | 2.4 KB |
test-filter-redirector.c | -rw-r--r-- | 6.5 KB |
test-hbitmap.c | -rw-r--r-- | 30.7 KB |
test-hmp.c | -rw-r--r-- | 3.9 KB |
test-int128.c | -rw-r--r-- | 6.9 KB |
test-io-channel-buffer.c | -rw-r--r-- | 1.4 KB |
test-io-channel-command.c | -rw-r--r-- | 3.7 KB |
test-io-channel-file.c | -rw-r--r-- | 3.2 KB |
test-io-channel-socket.c | -rw-r--r-- | 17.2 KB |
test-io-channel-tls.c | -rw-r--r-- | 11.2 KB |
test-io-task.c | -rw-r--r-- | 6.3 KB |
test-iov.c | -rw-r--r-- | 12.0 KB |
test-keyval.c | -rw-r--r-- | 23.1 KB |
test-logging.c | -rw-r--r-- | 4.6 KB |
test-mul64.c | -rw-r--r-- | 1.7 KB |
test-netfilter.c | -rw-r--r-- | 6.2 KB |
test-opts-visitor.c | -rw-r--r-- | 11.9 KB |
test-qapi-util.c | -rw-r--r-- | 2.2 KB |
test-qdev-global-props.c | -rw-r--r-- | 10.4 KB |
test-qdist.c | -rw-r--r-- | 9.4 KB |
test-qemu-opts.c | -rw-r--r-- | 23.5 KB |
test-qga.c | -rw-r--r-- | 28.4 KB |
test-qht-par.c | -rw-r--r-- | 1.2 KB |
test-qht.c | -rw-r--r-- | 3.1 KB |
test-qmp-commands.c | -rw-r--r-- | 8.0 KB |
test-qmp-event.c | -rw-r--r-- | 6.3 KB |
test-qobject-input-visitor.c | -rw-r--r-- | 45.6 KB |
test-qobject-output-visitor.c | -rw-r--r-- | 29.2 KB |
test-rcu-list.c | -rw-r--r-- | 7.7 KB |
test-replication.c | -rw-r--r-- | 14.9 KB |
test-shift128.c | -rw-r--r-- | 5.5 KB |
test-string-input-visitor.c | -rw-r--r-- | 10.1 KB |
test-string-output-visitor.c | -rw-r--r-- | 8.6 KB |
test-thread-pool.c | -rw-r--r-- | 6.1 KB |
test-throttle.c | -rw-r--r-- | 23.2 KB |
test-timed-average.c | -rw-r--r-- | 2.2 KB |
test-uuid.c | -rw-r--r-- | 5.3 KB |
test-visitor-serialization.c | -rw-r--r-- | 32.8 KB |
test-vmstate.c | -rw-r--r-- | 26.0 KB |
test-write-threshold.c | -rw-r--r-- | 2.8 KB |
test-x86-cpuid-compat.c | -rw-r--r-- | 14.1 KB |
test-x86-cpuid.c | -rw-r--r-- | 4.2 KB |
test-xbzrle.c | -rw-r--r-- | 4.8 KB |
tmp105-test.c | -rw-r--r-- | 4.8 KB |
tpci200-test.c | -rw-r--r-- | 618 bytes |
usb-hcd-ehci-test.c | -rw-r--r-- | 4.7 KB |
usb-hcd-ohci-test.c | -rw-r--r-- | 734 bytes |
usb-hcd-uhci-test.c | -rw-r--r-- | 2.0 KB |
usb-hcd-xhci-test.c | -rw-r--r-- | 1.2 KB |
vhost-user-bridge.c | -rw-r--r-- | 17.4 KB |
vhost-user-test.c | -rw-r--r-- | 25.8 KB |
virtio-9p-test.c | -rw-r--r-- | 12.8 KB |
virtio-balloon-test.c | -rw-r--r-- | 733 bytes |
virtio-blk-test.c | -rw-r--r-- | 21.2 KB |
virtio-console-test.c | -rw-r--r-- | 1.1 KB |
virtio-net-test.c | -rw-r--r-- | 7.2 KB |
virtio-rng-test.c | -rw-r--r-- | 1016 bytes |
virtio-scsi-test.c | -rw-r--r-- | 7.2 KB |
virtio-serial-test.c | -rw-r--r-- | 927 bytes |
vmgenid-test.c | -rw-r--r-- | 5.9 KB |
vmxnet3-test.c | -rw-r--r-- | 603 bytes |
wdt_ib700-test.c | -rw-r--r-- | 3.1 KB |
Computing file changes ...