From: Max Reitz <mreitz@redhat.com>
To: John Snow <jsnow@redhat.com>,
qemu-block@nongnu.org, qemu-devel@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>, Markus Armbruster <armbru@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 8/8] iotests/257: test traditional sync modes
Date: Wed, 10 Jul 2019 22:46:45 +0200 [thread overview]
Message-ID: <5ff7f740-f96d-928c-c88b-d3c277a7c944@redhat.com> (raw)
In-Reply-To: <ec327b5f-bb53-61f7-19b6-f723c56ee09a@redhat.com>
[-- Attachment #1.1: Type: text/plain, Size: 2731 bytes --]
On 10.07.19 21:00, John Snow wrote:
>
>
> On 7/10/19 1:14 PM, Max Reitz wrote:
>> On 10.07.19 03:05, John Snow wrote:
>>> Signed-off-by: John Snow <jsnow@redhat.com>
>>> ---
>>> tests/qemu-iotests/257 | 31 +
>>> tests/qemu-iotests/257.out | 3089 ++++++++++++++++++++++++++++++++++++
>>> 2 files changed, 3120 insertions(+)
>>
>> Oof.
>>
>
> Yeah, it's... a lot of test output. We probably shouldn't count the
> reference test output against any kind of SLOC metrics.
>
>>> diff --git a/tests/qemu-iotests/257 b/tests/qemu-iotests/257
>>> index de8707cb19..8de1c4da19 100755
>>> --- a/tests/qemu-iotests/257
>>> +++ b/tests/qemu-iotests/257
>>
>> [...]
>>
>>> @@ -410,6 +416,11 @@ def test_bitmap_sync(bsync_mode, msync_mode='bitmap', failure=None):
>>> if bsync_mode == 'always' and failure == 'intermediate':
>>> # We manage to copy one sector (one bit) before the error.
>>> ebitmap.clear_bit(ebitmap.first_bit)
>>> + if msync_mode in ('full', 'top'):
>>> + # These modes return all bits set except what was copied/skipped
>>
>> Hm. How useful is bitmap support for 'top' then, anyway? That means
>> that if you want to resume a top backup, you always have to resume it
>> like it was a full backup. Which sounds kind of useless.
>>
>> Max
>>
>
> Good point!
>
> I think this can be fixed by doing an initialization pass of the
> copy_bitmap when sync=top to set only the allocated regions in the bitmap.
>
> This means that the write notifier won't copy out regions that are
> written to that weren't already in the top layer. I believe this is
> actually a bugfix; the data we'd copy out in such cases is actually in
> the backing layer and shouldn't be copied with sync=top.
Now that you mention it... I didn’t realize that. Yes, you’re right.
> So this would have two effects:
> (1) sync=top gets a little more judicious about what it copies out on
> sync=top, and
> (2) the bitmap return value is more meaningful again.
>
> This doesn't touch sync=none at all, which needs more invasive fixes if
> we wanted it to have useful bitmap return values (it needs to
> differentiate the idea between must-copy and can-copy, and I still don't
> know if this is worthwhile to do, so until I hear otherwise, I'm not gonna.)
No, I’m with you on that one.
Max
>>> + fail_bit = ebitmap.first_bit
>>> + ebitmap.clear()
>>> + ebitmap.dirty_bits(range(fail_bit, SIZE // GRANULARITY))
>>> ebitmap.compare(get_bitmap(bitmaps, drive0.device, 'bitmap0'))
>>>
>>> # 2 - Writes and Reference Backup
>> [...]
>>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2019-07-10 20:47 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-10 1:05 [Qemu-devel] [PATCH 0/8] bitmaps: allow bitmaps to be used with full and top John Snow
2019-07-10 1:05 ` [Qemu-devel] [PATCH 1/8] iotests/257: add Pattern class John Snow
2019-07-10 15:10 ` Max Reitz
2019-07-10 16:26 ` Max Reitz
2019-07-10 17:34 ` John Snow
2019-07-10 1:05 ` [Qemu-devel] [PATCH 2/8] iotests/257: add EmulatedBitmap class John Snow
2019-07-10 15:47 ` Max Reitz
2019-07-10 17:36 ` John Snow
2019-07-10 1:05 ` [Qemu-devel] [PATCH 3/8] iotests/257: Refactor backup helpers John Snow
2019-07-10 16:04 ` Max Reitz
2019-07-10 17:52 ` John Snow
2019-07-10 20:17 ` Max Reitz
2019-07-10 1:05 ` [Qemu-devel] [PATCH 4/8] block/backup: hoist bitmap check into QMP interface John Snow
2019-07-10 16:11 ` Max Reitz
2019-07-10 17:57 ` John Snow
2019-07-10 20:19 ` Max Reitz
2019-07-10 1:05 ` [Qemu-devel] [PATCH 5/8] iotests/257: test API failures John Snow
2019-07-10 16:22 ` Max Reitz
2019-07-10 18:00 ` John Snow
2019-07-10 1:05 ` [Qemu-devel] [PATCH 6/8] block/backup: issue progress updates for skipped regions John Snow
2019-07-10 16:36 ` Max Reitz
2019-07-10 18:20 ` John Snow
2019-07-10 20:30 ` Max Reitz
2019-07-10 20:47 ` John Snow
2019-07-10 20:53 ` Max Reitz
2019-07-10 1:05 ` [Qemu-devel] [PATCH 7/8] block/backup: support bitmap sync modes for non-bitmap backups John Snow
2019-07-10 16:48 ` Max Reitz
2019-07-10 18:32 ` John Snow
2019-07-10 20:39 ` Max Reitz
2019-07-10 1:05 ` [Qemu-devel] [PATCH 8/8] iotests/257: test traditional sync modes John Snow
2019-07-10 17:14 ` Max Reitz
2019-07-10 19:00 ` John Snow
2019-07-10 20:46 ` Max Reitz [this message]
[not found] ` <2f221513-f173-8d9f-a3b2-d790ef6f6f51@redhat.com>
2019-07-11 12:37 ` Max Reitz
2019-07-11 17:58 ` John Snow
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=5ff7f740-f96d-928c-c88b-d3c277a7c944@redhat.com \
--to=mreitz@redhat.com \
--cc=armbru@redhat.com \
--cc=jsnow@redhat.com \
--cc=kwolf@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
/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).