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 |
---|---|---|
accel | ||
audio | ||
backends | ||
block | ||
bsd-user | ||
capstone @ 22ead3e | ||
chardev | ||
contrib | ||
crypto | ||
default-configs | ||
disas | ||
docs | ||
dtc @ 558cd81 | ||
fpu | ||
fsdev | ||
gdb-xml | ||
hw | ||
include | ||
io | ||
libdecnumber | ||
linux-headers | ||
linux-user | ||
migration | ||
nbd | ||
net | ||
pc-bios | ||
po | ||
qapi | ||
qga | ||
qobject | ||
qom | ||
replay | ||
roms | ||
scripts | ||
scsi | ||
slirp | ||
stubs | ||
target | ||
tcg | ||
tests | ||
trace | ||
ui | ||
util | ||
.dir-locals.el | -rw-r--r-- | 75 bytes |
.editorconfig | -rw-r--r-- | 200 bytes |
.exrc | -rw-r--r-- | 220 bytes |
.gdbinit | -rw-r--r-- | 326 bytes |
.gitignore | -rw-r--r-- | 2.5 KB |
.gitmodules | -rw-r--r-- | 1.3 KB |
.mailmap | -rw-r--r-- | 1.4 KB |
.shippable.yml | -rw-r--r-- | 1.9 KB |
.travis.yml | -rw-r--r-- | 6.4 KB |
CODING_STYLE | -rw-r--r-- | 5.7 KB |
COPYING | -rw-r--r-- | 17.6 KB |
COPYING.LIB | -rw-r--r-- | 25.8 KB |
COPYING.PYTHON | -rw-r--r-- | 13.3 KB |
Changelog | -rw-r--r-- | 22.6 KB |
HACKING | -rw-r--r-- | 9.9 KB |
LICENSE | -rw-r--r-- | 840 bytes |
MAINTAINERS | -rw-r--r-- | 40.6 KB |
Makefile | -rw-r--r-- | 32.9 KB |
Makefile.objs | -rw-r--r-- | 5.7 KB |
Makefile.target | -rw-r--r-- | 6.4 KB |
README | -rw-r--r-- | 3.5 KB |
VERSION | -rw-r--r-- | 7 bytes |
arch_init.c | -rw-r--r-- | 3.1 KB |
balloon.c | -rw-r--r-- | 3.4 KB |
block.c | -rw-r--r-- | 151.6 KB |
blockdev-nbd.c | -rw-r--r-- | 5.1 KB |
blockdev.c | -rw-r--r-- | 121.0 KB |
blockjob.c | -rw-r--r-- | 25.6 KB |
bootdevice.c | -rw-r--r-- | 9.2 KB |
bt-host.c | -rw-r--r-- | 5.2 KB |
bt-vhci.c | -rw-r--r-- | 4.5 KB |
configure | -rwxr-xr-x | 174.5 KB |
cpus-common.c | -rw-r--r-- | 10.1 KB |
cpus.c | -rw-r--r-- | 54.8 KB |
device-hotplug.c | -rw-r--r-- | 2.6 KB |
device_tree.c | -rw-r--r-- | 12.9 KB |
disas.c | -rw-r--r-- | 17.7 KB |
dma-helpers.c | -rw-r--r-- | 7.9 KB |
dump.c | -rw-r--r-- | 59.5 KB |
exec.c | -rw-r--r-- | 108.1 KB |
gdbstub.c | -rw-r--r-- | 52.1 KB |
hmp-commands-info.hx | -rw-r--r-- | 18.0 KB |
hmp-commands.hx | -rw-r--r-- | 52.9 KB |
hmp.c | -rw-r--r-- | 89.4 KB |
hmp.h | -rw-r--r-- | 7.9 KB |
ioport.c | -rw-r--r-- | 9.0 KB |
iothread.c | -rw-r--r-- | 10.3 KB |
memory.c | -rw-r--r-- | 98.2 KB |
memory_ldst.inc.c | -rw-r--r-- | 20.1 KB |
memory_mapping.c | -rw-r--r-- | 10.5 KB |
module-common.c | -rw-r--r-- | 113 bytes |
monitor.c | -rw-r--r-- | 111.8 KB |
numa.c | -rw-r--r-- | 22.5 KB |
os-posix.c | -rw-r--r-- | 7.9 KB |
os-win32.c | -rw-r--r-- | 3.7 KB |
qapi-schema.json | -rw-r--r-- | 81.6 KB |
qdev-monitor.c | -rw-r--r-- | 26.4 KB |
qdict-test-data.txt | -rw-r--r-- | 88.4 KB |
qemu-bridge-helper.c | -rw-r--r-- | 11.0 KB |
qemu-doc.texi | -rw-r--r-- | 75.7 KB |
qemu-ga.texi | -rw-r--r-- | 3.2 KB |
qemu-img-cmds.hx | -rw-r--r-- | 5.2 KB |
qemu-img.c | -rw-r--r-- | 138.0 KB |
qemu-img.texi | -rw-r--r-- | 29.3 KB |
qemu-io-cmds.c | -rw-r--r-- | 59.1 KB |
qemu-io.c | -rw-r--r-- | 16.6 KB |
qemu-keymap.c | -rw-r--r-- | 7.4 KB |
qemu-nbd.c | -rw-r--r-- | 32.8 KB |
qemu-nbd.texi | -rw-r--r-- | 4.3 KB |
qemu-option-trace.texi | -rw-r--r-- | 1021 bytes |
qemu-options-wrapper.h | -rw-r--r-- | 1.0 KB |
qemu-options.h | -rw-r--r-- | 1.4 KB |
qemu-options.hx | -rw-r--r-- | 175.5 KB |
qemu-seccomp.c | -rw-r--r-- | 5.4 KB |
qemu-tech.texi | -rw-r--r-- | 12.3 KB |
qemu.nsi | -rw-r--r-- | 7.1 KB |
qemu.sasl | -rw-r--r-- | 1.8 KB |
qmp.c | -rw-r--r-- | 19.5 KB |
qtest.c | -rw-r--r-- | 20.2 KB |
replication.c | -rw-r--r-- | 2.5 KB |
replication.h | -rw-r--r-- | 5.2 KB |
rules.mak | -rw-r--r-- | 14.1 KB |
thunk.c | -rw-r--r-- | 9.1 KB |
tpm.c | -rw-r--r-- | 5.7 KB |
trace-events | -rw-r--r-- | 5.3 KB |
version.rc | -rw-r--r-- | 790 bytes |
vl.c | -rw-r--r-- | 144.7 KB |
Computing file changes ...