[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v12 07/10] iotests: Add test 179 to cover write
From: |
Max Reitz |
Subject: |
Re: [Qemu-devel] [PATCH v12 07/10] iotests: Add test 179 to cover write zeroes with unmap |
Date: |
Fri, 5 May 2017 23:24:15 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.0.1 |
On 04.05.2017 05:07, Eric Blake wrote:
> No tests were covering write zeroes with unmap. Additionally,
> I needed to prove that my previous patches for correct status
> reporting and write zeroes optimizations actually had an impact.
>
> The test works for cluster_size between 8k and 2M (for smaller
> sizes, it fails because our allocation patterns are not contiguous
> with small clusters - in part, the largest consecutive allocation
> we tend to get is often bounded by the size covered by one L2
> table).
>
> Note that testing for zero clusters is tricky: 'qemu-io map'
> reports whether data comes from the current layer of the image
> (useful for sniffing out which regions of the file have
> QCOW_OFLAG_ZERO) - but doesn't show which clusters have mappings;
> while 'qemu-img map' sees "zero":true for both unallocated and
> zero clusters for any qcow2 with no backing layer (so less useful
> at detecting true zero clusters), but reliably shows mappings.
> So we have to rely on both queries side-by-side at each point of
> the test.
>
> Signed-off-by: Eric Blake <address@hidden>
>
> ---
> v12: probe the map in more places, to make test easier to follow
> v11: reserved for blkdebug half of v10
> v10: drop any changes to v2 files, rewrite test to work with updates
> earlier in the series, add a blkdebug probe
> v9: new patch
> ---
> tests/qemu-iotests/179 | 132 +++++++++++++++++++++++++++++++++++++
> tests/qemu-iotests/179.out | 160
> +++++++++++++++++++++++++++++++++++++++++++++
> tests/qemu-iotests/group | 1 +
> 3 files changed, 293 insertions(+)
> create mode 100755 tests/qemu-iotests/179
> create mode 100644 tests/qemu-iotests/179.out
Reviewed-by: Max Reitz <address@hidden>
TIL qemu-io -c w.
signature.asc
Description: OpenPGP digital signature