Kevin Wolf d40593dd90 block/backup: Fix hang for unaligned image size
When doing a block backup of an image with an unaligned size (with
respect to the BACKUP_CLUSTER_SIZE), qemu would check the allocation
status of sectors after the end of the image. bdrv_is_allocated()
returns a result that is valid for 0 sectors in this case, so the backup
job ran into an endless loop.

Stop looping when seeing a result valid for 0 sectors, we're at EOF then.

The test case looks somewhat unrelated at first sight because I
originally tried to reproduce a different suspected bug that turned out
to not exist. Still a good test case and it accidentally found this one.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
2014-07-09 15:50:11 +02:00
..
2012-04-19 15:48:52 +02:00
031
2014-06-27 20:00:00 +02:00
2013-08-30 15:48:43 +02:00
036
2014-06-27 20:00:00 +02:00
2013-08-30 15:48:43 +02:00
039
2014-06-27 20:00:00 +02:00
054
2014-06-27 20:00:00 +02:00
060
2014-06-27 20:00:00 +02:00
061
2014-06-27 20:00:00 +02:00
062
2013-08-30 15:28:52 +02:00
2014-01-22 12:07:18 +01:00
075
2014-04-01 13:59:47 +02:00
077
2014-02-09 09:12:38 +01:00
2014-01-24 17:40:25 +01:00
078
2014-04-11 13:59:49 +02:00
2014-04-11 13:59:49 +02:00
2014-07-01 10:15:12 +02:00
083
2014-06-27 20:00:01 +02:00
084
2014-04-01 15:22:35 +02:00
088
2014-04-01 13:59:47 +02:00
089
2014-05-28 14:28:46 +02:00
2014-05-28 14:28:46 +02:00
092
2014-05-19 11:36:49 +02:00
2014-06-27 20:00:00 +02:00
2014-06-27 20:00:00 +02:00
2014-06-27 20:00:00 +02:00
2014-06-24 20:01:24 +04:00
2014-06-27 20:00:00 +02:00
2014-07-01 10:15:33 +02:00
2014-06-27 20:00:00 +02:00
2012-02-23 10:29:46 +01:00

=== This is the QEMU I/O test suite ===

* Intro

This package contains a simple test suite for the I/O layer of qemu.
It does not require a guest, but only the qemu, qemu-img and qemu-io
binaries.  This does limit it to exercise the low-level I/O path only
but no actual block drivers like ide, scsi or virtio.

* Usage

Just run ./check to run all tests for the raw image format, or ./check
-qcow2 to test the qcow2 image format.  The output of ./check -h explains
additional options to test further image formats or I/O methods.

* Feedback and patches

Please send improvements to the test suite, general feedback or just
reports of failing tests cases to qemu-devel@savannah.nongnu.org.