All of lore.kernel.org
 help / color / mirror / Atom feed
From: John Snow <jsnow@redhat.com>
To: Eric Blake <eblake@redhat.com>,
	qemu-devel@nongnu.org, qemu-block@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>, Fam Zheng <fam@euphon.net>,
	vsementsov@virtuozzo.com, Markus Armbruster <armbru@redhat.com>,
	Max Reitz <mreitz@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v5 03/11] blockdev: n-ary bitmap merge
Date: Thu, 20 Dec 2018 16:03:19 -0500	[thread overview]
Message-ID: <13dea930-e726-ca56-e62e-11b7586ca270@redhat.com> (raw)
In-Reply-To: <5c6ab855-5fb3-bbe0-f7ee-528fc2aa52da@redhat.com>



On 12/19/18 9:48 PM, Eric Blake wrote:
> On 12/19/18 8:29 PM, John Snow wrote:
>> Especially outside of transactions, it is helpful to provide
>> all-or-nothing semantics for bitmap merges. This facilitates
>> the coalescing of multiple bitmaps into a single target for
>> the "checkpoint" interpretation when assembling bitmaps that
>> represent arbitrary points in time from component bitmaps.
>>
>> This is an incompatible change from the preliminary version
>> of the API.
> 
> but that doesn't matter because it was in the x- namespace, and we're
> about to rename it anyway.
> 

Yes, just an "FYI".

>>
>> Signed-off-by: John Snow <jsnow@redhat.com>
>> ---
>>   blockdev.c           | 75 ++++++++++++++++++++++++++++++--------------
>>   qapi/block-core.json | 22 ++++++-------
>>   2 files changed, 62 insertions(+), 35 deletions(-)
>>
> 
>> +static BdrvDirtyBitmap *do_block_dirty_bitmap_merge(const char *node,
>> +                                                    const char *target,
>> +                                                    strList *bitmaps,
>> +                                                    HBitmap **backup,
>> +                                                    Error **errp)
>>   {
> 
>> -    bdrv_merge_dirty_bitmap(dst, src, NULL, errp);
>> +    for (lst = bitmaps; lst; lst = lst->next) {
>> +        src = bdrv_find_dirty_bitmap(bs, lst->value);
>> +        if (!src) {
>> +            error_setg(errp, "Dirty bitmap '%s' not found", lst->value);
>> +            dst = NULL;
>> +            goto out;
>> +        }
>> +
>> +        bdrv_merge_dirty_bitmap(anon, src, NULL, &local_err);
>> +        if (local_err) {
>> +            error_propagate(errp, local_err);
>> +            dst = NULL;
>> +            goto out;
>> +        }
>> +    }
> 
> Appears to be a silent no-op when given "bitmaps":[] as the source.  An
> alternative would be requiring at least one source in the list, but I
> don't see it as worth changing the patch to special-case an empty list
> differently from a no-op.
> >> @@ -1943,23 +1943,23 @@
>>   ##
>>   # @x-block-dirty-bitmap-merge:
>>   #
>> -# FIXME: Rename @src_name and @dst_name to src-name and dst-name.
>> -#
>> -# Merge @src_name dirty bitmap to @dst_name dirty bitmap. @src_name
>> dirty
>> -# bitmap is unchanged. On error, @dst_name is unchanged.
>> +# Merge dirty bitmaps listed in @bitmaps to the @target dirty bitmap.
>> +# The @bitmaps dirty bitmaps are unchanged.
>> +# On error, @target is unchanged.
>>   #
>>   # Returns: nothing on success
>>   #          If @node is not a valid block device, DeviceNotFound
>> -#          If @dst_name or @src_name is not found, GenericError
>> -#          If bitmaps has different sizes or granularities, GenericError
>> +#          If any bitmap in @bitmaps or @target is not found,
>> GenericError
>> +#          If any of the bitmaps have different sizes or granularities,
>> +#              GenericError
>>   #
>>   # Since: 3.0
> 
> Could do s/3.0/4.0/ to match the incompatible change here, but you do it
> in the later patch where your remove the x-.
> 
> Reviewed-by: Eric Blake <eblake@redhat.com>
> 

Yeah, I think I'll just leave it this way, so all the version
graduations are in the same patch.

Thank you!

  reply	other threads:[~2018-12-20 21:03 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-20  2:29 [Qemu-devel] [PATCH v5 00/11] bitmaps: remove x- prefix from QMP api John Snow
2018-12-20  2:29 ` [Qemu-devel] [PATCH v5 01/11] blockdev: abort transactions in reverse order John Snow
2018-12-20  2:29 ` [Qemu-devel] [PATCH v5 02/11] block/dirty-bitmap: remove assertion from restore John Snow
2018-12-20  2:41   ` Eric Blake
2018-12-20  8:33   ` Vladimir Sementsov-Ogievskiy
2018-12-20  2:29 ` [Qemu-devel] [PATCH v5 03/11] blockdev: n-ary bitmap merge John Snow
2018-12-20  2:48   ` Eric Blake
2018-12-20 21:03     ` John Snow [this message]
2018-12-20  9:23   ` Vladimir Sementsov-Ogievskiy
2018-12-20  2:29 ` [Qemu-devel] [PATCH v5 04/11] block: remove 'x' prefix from experimental bitmap APIs John Snow
2018-12-20  2:29 ` [Qemu-devel] [PATCH v5 05/11] iotests.py: don't abort if IMGKEYSECRET is undefined John Snow
2018-12-20  2:29 ` [Qemu-devel] [PATCH v5 06/11] iotests: add filter_generated_node_ids John Snow
2018-12-20  2:29 ` [Qemu-devel] [PATCH v5 07/11] iotests: add qmp recursive sorting function John Snow
2018-12-20  2:40   ` Eric Blake
2018-12-20  9:42   ` Vladimir Sementsov-Ogievskiy
2018-12-20  2:29 ` [Qemu-devel] [PATCH v5 08/11] iotests: remove default filters from qmp_log John Snow
2018-12-20  2:50   ` Eric Blake
2018-12-20  9:48   ` Vladimir Sementsov-Ogievskiy
2018-12-20  2:29 ` [Qemu-devel] [PATCH v5 09/11] iotests: change qmp_log filters to expect QMP objects only John Snow
2018-12-20  2:53   ` Eric Blake
2018-12-20 22:12     ` John Snow
2018-12-20 11:21   ` Vladimir Sementsov-Ogievskiy
2018-12-20 22:26     ` John Snow
2018-12-20  2:29 ` [Qemu-devel] [PATCH v5 10/11] iotests: implement pretty-print for log and qmp_log John Snow
2018-12-20  2:55   ` Eric Blake
2018-12-20 11:29   ` Vladimir Sementsov-Ogievskiy
2018-12-20  2:29 ` [Qemu-devel] [PATCH v5 11/11] iotests: add iotest 236 for testing bitmap merge John Snow
2018-12-20  3:02   ` Eric Blake
2018-12-20 20:58     ` John Snow
2018-12-20 12:12   ` Vladimir Sementsov-Ogievskiy
2018-12-20 20:53     ` 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=13dea930-e726-ca56-e62e-11b7586ca270@redhat.com \
    --to=jsnow@redhat.com \
    --cc=armbru@redhat.com \
    --cc=eblake@redhat.com \
    --cc=fam@euphon.net \
    --cc=kwolf@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=vsementsov@virtuozzo.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.