Eric Blake ebb718a5c7 qcow2: Catch more unaligned write_zero into zero cluster
is_zero_cluster() and is_zero_cluster_top_locked() are used only
by qcow2_co_write_zeroes().  The former is too broad (we don't
care if the sectors we are about to overwrite are non-zero, only
that all other sectors in the cluster are zero), so it needs to
be called up to twice but with smaller limits - rename it along
with adding the neeeded parameter.  The latter can be inlined for
more compact code.

The testsuite change shows that we now have a sparser top file
when an unaligned write_zeroes overwrites the only portion of
the backing file with data.

Based on a patch proposal by Denis V. Lunev.

CC: Denis V. Lunev <den@openvz.org>
Signed-off-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Denis V. Lunev <den@openvz.org>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2016-06-08 10:21:08 +02:00
..
2015-12-17 08:21:27 +01:00
030
2016-03-28 13:56:44 -04:00
2016-03-28 13:56:44 -04:00
2016-04-15 17:22:11 +02:00
2016-03-30 12:16:03 +02:00
2015-01-23 12:41:32 -05:00
2016-02-22 16:54:14 +01:00
2015-10-23 18:18:22 +02:00
083
2016-05-12 15:33:23 +02:00
095
2016-01-07 21:30:17 +01:00
2016-01-07 21:30:17 +01:00
2015-12-18 14:36:17 +01:00
118
2016-02-02 17:49:42 +01:00
2016-05-19 16:45:31 +02:00
2016-03-30 12:16:03 +02:00
2016-02-22 09:49:46 +01:00
2012-02-23 10:29:46 +01:00
2016-02-16 14:29:27 +00: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.