aboutsummaryrefslogtreecommitdiff
path: root/target-xtensa
diff options
context:
space:
mode:
authorPeter Lieven <pl@dlhnet.de>2013-01-11 13:29:55 +0100
committerStefan Hajnoczi <stefanha@redhat.com>2013-01-15 09:24:38 +0100
commit029d091e4975af60ff9622717af19c5910f2f4e9 (patch)
tree2b66d9a1e0aef1800ee3cf9cda09d88d68d27cf2 /target-xtensa
parent8d2497c3552e19a60e7a75d20976471ecb2a8e2b (diff)
block: fix initialization in bdrv_io_limits_enable()
bdrv_io_limits_enable() starts a new slice, but does not set io_base correctly for that slice. Here is how io_base is used: bytes_base = bs->nr_bytes[is_write] - bs->io_base.bytes[is_write]; bytes_res = (unsigned) nb_sectors * BDRV_SECTOR_SIZE; if (bytes_base + bytes_res <= bytes_limit) { /* no wait */ } else { /* operation needs to be throttled */ } As a result, any I/O operations that are triggered between now and bs->slice_end are incorrectly limited. If 10 MB of data has been written since the VM was started, QEMU thinks that 10 MB of data has been written in this slice. This leads to a I/O lockup in the guest. We fix this by delaying the start of a new slice to the next call of bdrv_exceed_io_limits(). Signed-off-by: Peter Lieven <pl@kamp.de> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'target-xtensa')
0 files changed, 0 insertions, 0 deletions