From: Eric Blake <eblake@redhat.com>
To: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>,
Andrey Shinkevich <andrey.shinkevich@virtuozzo.com>,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
"qemu-block@nongnu.org" <qemu-block@nongnu.org>
Cc: "armbru@redhat.com" <armbru@redhat.com>,
"kwolf@redhat.com" <kwolf@redhat.com>,
"mreitz@redhat.com" <mreitz@redhat.com>,
Denis Lunev <den@virtuozzo.com>, John Snow <jsnow@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v8 0/2] qemu-img info lists bitmap directory entries
Date: Wed, 30 Jan 2019 06:43:28 -0600 [thread overview]
Message-ID: <982d9998-e9d5-9c41-9ab6-74f893254b33@redhat.com> (raw)
In-Reply-To: <8e49d7d5-9608-9e40-a997-1d423f86fab1@virtuozzo.com>
[-- Attachment #1: Type: text/plain, Size: 2198 bytes --]
On 1/30/19 2:00 AM, Vladimir Sementsov-Ogievskiy wrote:
>> So, I'm trying to test this, and I've discovered something rather
>> annoying about persistent snapshots: they DON'T get written to disk
>> until the qemu process exits. In other words, even after creating a
>> persistent bitmap via QMP (I'm trying to debug my libvirt API for
>> incremental snapshots, so I did this via 'virsh snapshot-create-as $dom
>> name', but it boils down to a QMP transaction with
>> 'block-dirty-bitmap-add' as one of the commands), running:
>>
>> $ qemu-img info -U Active1.qcow2
>>
>> shows
>> bitmaps:
>> refcount bits: 16
>>
>> for as long as the qemu process is running.
>
> But what is the benefit of it, except qemu-img info with --force-share option,
> which of course is not guaranteed to show valid metadata?
>
> While qemu is running valid way to obtain info is qmp. Do libvirt call qemu-img
> --fore-share?
You're right that libvirt will be using QMP and not qemu-img. But that
does not prevent other clients from using qemu-img on a file, regardless
of whether the file is in use by a guest. There's also the argument that
if qemu dies suddenly (most likely due to a bug or to a host being
fenced), knowing what bitmaps were present in the image is better than
having nothing at all (but conversely, if qemu dies suddenly, you are
likely missing the bitmap data for the most recent changes, so even if
disabled bitmaps are flushed and no longer marked in-use, they still
won't be sufficient to allow an incremental backup, and a full backup
will be necessary regardless of how much or little bitmap information
got persisted).
While you're right that --force-share is not required to show up-to-date
metadata, it also is not required to show nothing at all. And at least
knowing that a persistent bitmap is associated with a qcow2 file may
make other things obvious - such as the fact that the image can't be
resized (until we implement the functionality to support resize and
bitmaps in the same image).
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization: qemu.org | libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2019-01-30 12:43 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-28 18:40 [Qemu-devel] [PATCH v8 0/2] qemu-img info lists bitmap directory entries Andrey Shinkevich
2019-01-28 18:40 ` [Qemu-devel] [PATCH v8 1/2] " Andrey Shinkevich
2019-01-28 18:40 ` [Qemu-devel] [PATCH v8 2/2] qemu-img info: bitmaps extension new test 239 Andrey Shinkevich
2019-01-28 19:11 ` Eric Blake
2019-01-28 19:17 ` Andrey Shinkevich
2019-01-30 4:01 ` [Qemu-devel] [PATCH v8 0/2] qemu-img info lists bitmap directory entries Eric Blake
2019-01-30 8:00 ` Vladimir Sementsov-Ogievskiy
2019-01-30 12:43 ` Eric Blake [this message]
2019-01-30 13:28 ` Vladimir Sementsov-Ogievskiy
2019-01-30 22:51 ` 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=982d9998-e9d5-9c41-9ab6-74f893254b33@redhat.com \
--to=eblake@redhat.com \
--cc=andrey.shinkevich@virtuozzo.com \
--cc=armbru@redhat.com \
--cc=den@virtuozzo.com \
--cc=jsnow@redhat.com \
--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 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).