From: Eric Blake <eblake@redhat.com>
To: Kevin Wolf <kwolf@redhat.com>, Fam Zheng <famz@redhat.com>
Cc: pbonzini@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com
Subject: Re: [Qemu-devel] [PATCH v2] block: per caller dirty bitmap
Date: Tue, 12 Nov 2013 06:06:00 -0700 [thread overview]
Message-ID: <528227B8.8040404@redhat.com> (raw)
In-Reply-To: <20131112104657.GC2627@dhcp-200-207.str.redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1959 bytes --]
On 11/12/2013 03:46 AM, Kevin Wolf wrote:
>> +++ b/block/qapi.c
>> @@ -204,14 +204,6 @@ void bdrv_query_info(BlockDriverState *bs,
>> info->io_status = bs->iostatus;
>> }
>>
>> - if (bs->dirty_bitmap) {
>> - info->has_dirty = true;
>> - info->dirty = g_malloc0(sizeof(*info->dirty));
>> - info->dirty->count = bdrv_get_dirty_count(bs) * BDRV_SECTOR_SIZE;
>> - info->dirty->granularity =
>> - ((int64_t) BDRV_SECTOR_SIZE << hbitmap_granularity(bs->dirty_bitmap));
>> - }
>> -
>> if (bs->drv) {
>> info->has_inserted = true;
>> info->inserted = g_malloc0(sizeof(*info->inserted));
>
> The dirty field should probably be removed from qapi-schema.json if it
> never gets set any more.
>
> It was optional, so perhaps removing it doesn't cause any trouble
> indeed, but I'd like to hear Eric on this matter before merging the
> patch. Though if libvirt does make use of it, we have a problem because
> it doesn't really make sense any more after these changes.
Removing an optional output-only field is okay (it is the same as
stating that we are ALWAYS taking the option of not including it).
Since it has always been marked optional, management can't be relying on
it; more specifically, libvirt does not have any code checking for it.
So I'm okay with removing it from the schema as a backwards-compatible
change.
[Removing an optional input field is wrong, but BlockInfo is an output
type, not an input type.]
Eventually, libvirt would like to use persistent dirty bitmaps, in order
to resume long-running operations such as drive-mirror even across
migration between different qemu processes, but I don't think we are
quite there yet, and I also don't think that removal of 'dirty' from
BlockInfo impedes in that goal.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 621 bytes --]
prev parent reply other threads:[~2013-11-12 13:06 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-04 9:30 [Qemu-devel] [PATCH v2] block: per caller dirty bitmap Fam Zheng
2013-11-04 10:37 ` Paolo Bonzini
2013-11-04 10:47 ` Fam Zheng
2013-11-04 10:55 ` Paolo Bonzini
2013-11-11 10:31 ` Stefan Hajnoczi
2013-11-04 14:38 ` Benoît Canet
2013-11-05 3:12 ` Fam Zheng
2013-11-11 10:34 ` Stefan Hajnoczi
2013-11-11 10:35 ` Stefan Hajnoczi
2013-11-12 10:46 ` Kevin Wolf
2013-11-12 13:06 ` Eric Blake [this message]
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=528227B8.8040404@redhat.com \
--to=eblake@redhat.com \
--cc=famz@redhat.com \
--cc=kwolf@redhat.com \
--cc=pbonzini@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).