From: Max Reitz <mreitz@redhat.com>
To: Eric Blake <eblake@redhat.com>, qemu-devel@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>, Stefan Hajnoczi <stefanha@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v4 26/26] iotests: Add test for different refcount widths
Date: Thu, 04 Dec 2014 10:51:05 +0100 [thread overview]
Message-ID: <54802E89.8030500@redhat.com> (raw)
In-Reply-To: <547FA4E9.40302@redhat.com>
On 2014-12-04 at 01:03, Eric Blake wrote:
> On 12/03/2014 05:37 AM, Max Reitz wrote:
>> Add a test for conversion between different refcount widths and errors
>> specific to certain widths (i.e. snapshots with refcount_bits=1).
>>
>> Signed-off-by: Max Reitz <mreitz@redhat.com>
>> ---
>> tests/qemu-iotests/112 | 296 +++++++++++++++++++++++++++++++++++++++++++++
>> tests/qemu-iotests/112.out | 155 ++++++++++++++++++++++++
>> tests/qemu-iotests/group | 1 +
>> 3 files changed, 452 insertions(+)
>> create mode 100755 tests/qemu-iotests/112
>> create mode 100644 tests/qemu-iotests/112.out
>
>> +# This test will set refcount_bits on its own which would conflict with the
>> +# manual setting; compat will be overridden as well
>> +_unsupported_imgopts refcount_bits 'compat=0.10'
> Should this be 'compat' rather than 'compat=0.10' as the filter? The
> reason I ask is that if I can pass an explicit 'compat=1.1'...
>
>> +echo
>> +echo '=== refcount_bits and compat=0.10 ==='
>> +echo
>> +
>> +# Should work
>> +IMGOPTS="$IMGOPTS,compat=0.10,refcount_bits=16" _make_test_img 64M
> ...is it going to conflict with this explicit compat=0.10?
>
> I didn't actually try this setup, though, so if the test passes with an
> explicit imgopt request for compat=1.1, then I'm fine with it as-is.
Yes, it works; the last option given counts (see iotest 082).
> Reviewed-by: Eric Blake <eblake@redhat.com>
Thank you!
> Side note:
>
> Now that we can produce MUCH smaller images where the reftable can
> easily require enough contiguous clusters to require the creation of at
> least one refblock that cannot be self-referential, it would probably be
> good to modify an existing test and/or add a new test to prove that we
> don't trip up when trying to create and read such an image.
Reading is rarely a problem because we don't even need to read the
refcounts then. However, creation may indeed be (or better: it should
not be), so I will see to add a test later on.
Max
> But I'm
> fine with doing that as a later patch, so don't hold up this series for
> it (unless you want to add a 27/26). See my mail here where I calculate
> the minimum size required to guarantee that situation at just under 256
> megabytes with 512 byte clusters:
> https://lists.gnu.org/archive/html/qemu-devel/2014-11/msg03455.html
>
> But now that I looked that up, I just realized that that email did not
> calculate what it would take to get an L1 table to likewise occupy
> enough contiguous clusters to guarantee a refblock where every entry is
> pointing to clusters of the L1 table and therefore cannot be
> self-referential. But as both L1 and L2 table entries are 64 bits, it
> looks like the math is the same as for 64-bit width refcounts, so it
> happens to be the same magic size of just under 256 megabytes - and in
> this case, the magic value is hit even without relying on this series'
> addition of 64-bit refcount widths.
>
next prev parent reply other threads:[~2014-12-04 9:51 UTC|newest]
Thread overview: 73+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-03 13:37 [Qemu-devel] [PATCH v4 00/26] qcow2: Support refcount orders != 4 Max Reitz
2014-12-03 13:37 ` [Qemu-devel] [PATCH v4 01/26] qcow2: Add two new fields to BDRVQcowState Max Reitz
2014-12-03 14:51 ` Eric Blake
2014-12-10 15:08 ` Stefan Hajnoczi
2014-12-03 13:37 ` [Qemu-devel] [PATCH v4 02/26] qcow2: Add refcount_bits to format-specific info Max Reitz
2014-12-03 15:09 ` Eric Blake
2014-12-10 15:14 ` Stefan Hajnoczi
2014-12-03 13:37 ` [Qemu-devel] [PATCH v4 03/26] qcow2: Do not return new value after refcount update Max Reitz
2014-12-03 15:13 ` Eric Blake
2014-12-10 15:15 ` Stefan Hajnoczi
2014-12-03 13:37 ` [Qemu-devel] [PATCH v4 04/26] qcow2: Only return status from qcow2_get_refcount Max Reitz
2014-12-03 15:37 ` Eric Blake
2014-12-10 15:32 ` Stefan Hajnoczi
2014-12-03 13:37 ` [Qemu-devel] [PATCH v4 05/26] qcow2: Use unsigned addend for update_refcount() Max Reitz
2014-12-03 15:55 ` Eric Blake
2014-12-11 10:58 ` Stefan Hajnoczi
2014-12-11 11:03 ` Max Reitz
2014-12-12 11:07 ` Stefan Hajnoczi
2014-12-03 13:37 ` [Qemu-devel] [PATCH v4 06/26] qcow2: Use 64 bits for refcount values Max Reitz
2014-12-03 16:11 ` Eric Blake
2014-12-03 16:18 ` Max Reitz
2014-12-11 11:04 ` Stefan Hajnoczi
2014-12-03 13:37 ` [Qemu-devel] [PATCH v4 07/26] qcow2: Respect error in qcow2_alloc_bytes() Max Reitz
2014-12-03 17:12 ` Eric Blake
2014-12-11 11:10 ` Stefan Hajnoczi
2014-12-03 13:37 ` [Qemu-devel] [PATCH v4 08/26] qcow2: Refcount overflow and qcow2_alloc_bytes() Max Reitz
2014-12-03 17:41 ` Eric Blake
2014-12-11 11:12 ` Stefan Hajnoczi
2014-12-03 13:37 ` [Qemu-devel] [PATCH v4 09/26] qcow2: Helper for refcount array reallocation Max Reitz
2014-12-03 18:00 ` Eric Blake
2014-12-11 11:26 ` Stefan Hajnoczi
2014-12-03 13:37 ` [Qemu-devel] [PATCH v4 10/26] qcow2: Helper function for refcount modification Max Reitz
2014-12-03 18:48 ` Eric Blake
2014-12-11 13:36 ` Stefan Hajnoczi
2014-12-03 13:37 ` [Qemu-devel] [PATCH v4 11/26] qcow2: More helpers " Max Reitz
2014-12-03 19:17 ` Eric Blake
2014-12-11 13:40 ` Stefan Hajnoczi
2014-12-03 13:37 ` [Qemu-devel] [PATCH v4 12/26] qcow2: Open images with refcount order != 4 Max Reitz
2014-12-03 13:37 ` [Qemu-devel] [PATCH v4 13/26] qcow2: refcount_order parameter for qcow2_create2 Max Reitz
2014-12-03 19:29 ` Eric Blake
2014-12-11 13:41 ` Stefan Hajnoczi
2014-12-03 13:37 ` [Qemu-devel] [PATCH v4 14/26] qcow2: Use symbolic macros in qcow2_amend_options Max Reitz
2014-12-03 19:48 ` Eric Blake
2014-12-11 14:05 ` Stefan Hajnoczi
2014-12-03 13:37 ` [Qemu-devel] [PATCH v4 15/26] iotests: Prepare for refcount_bits option Max Reitz
2014-12-03 22:05 ` Eric Blake
2014-12-11 14:26 ` Stefan Hajnoczi
2014-12-03 13:37 ` [Qemu-devel] [PATCH v4 16/26] qcow2: Allow creation with refcount order != 4 Max Reitz
2014-12-03 23:02 ` Eric Blake
2014-12-11 14:41 ` Stefan Hajnoczi
2014-12-03 13:37 ` [Qemu-devel] [PATCH v4 17/26] progress: Allow regressing progress Max Reitz
2014-12-03 23:03 ` Eric Blake
2014-12-11 14:41 ` Stefan Hajnoczi
2014-12-03 13:37 ` [Qemu-devel] [PATCH v4 18/26] block: Add opaque value to the amend CB Max Reitz
2014-12-11 14:42 ` Stefan Hajnoczi
2014-12-03 13:37 ` [Qemu-devel] [PATCH v4 19/26] qcow2: Use error_report() in qcow2_amend_options() Max Reitz
2014-12-03 13:37 ` [Qemu-devel] [PATCH v4 20/26] qcow2: Use abort() instead of assert(false) Max Reitz
2014-12-03 13:37 ` [Qemu-devel] [PATCH v4 21/26] qcow2: Split upgrade/downgrade paths for amend Max Reitz
2014-12-03 13:37 ` [Qemu-devel] [PATCH v4 22/26] qcow2: Use intermediate helper CB " Max Reitz
2014-12-11 14:44 ` Stefan Hajnoczi
2014-12-03 13:37 ` [Qemu-devel] [PATCH v4 23/26] qcow2: Add function for refcount order amendment Max Reitz
2014-12-03 23:30 ` Eric Blake
2014-12-11 17:08 ` Stefan Hajnoczi
2014-12-03 13:37 ` [Qemu-devel] [PATCH v4 24/26] qcow2: Invoke refcount order amendment function Max Reitz
2014-12-03 23:35 ` Eric Blake
2014-12-11 14:46 ` Stefan Hajnoczi
2014-12-03 13:37 ` [Qemu-devel] [PATCH v4 25/26] qcow2: Point to amend function in check Max Reitz
2014-12-11 14:46 ` Stefan Hajnoczi
2014-12-03 13:37 ` [Qemu-devel] [PATCH v4 26/26] iotests: Add test for different refcount widths Max Reitz
2014-12-04 0:03 ` Eric Blake
2014-12-04 9:51 ` Max Reitz [this message]
2014-12-04 19:10 ` Eric Blake
2014-12-05 9:02 ` Max Reitz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=54802E89.8030500@redhat.com \
--to=mreitz@redhat.com \
--cc=eblake@redhat.com \
--cc=kwolf@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).