qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-block] [PATCH v8 0/2] qemu-img info lists bitmap directory ent


From: Eric Blake
Subject: Re: [Qemu-block] [PATCH v8 0/2] qemu-img info lists bitmap directory entries
Date: Wed, 30 Jan 2019 06:43:28 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0

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: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]