qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 03/17] spec: add qcow2-dirty-bitmaps specificati


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH 03/17] spec: add qcow2-dirty-bitmaps specification
Date: Tue, 6 Oct 2015 14:33:13 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0

On 10/06/2015 02:22 PM, John Snow wrote:


>>> +Dirty Bitmap Directory Entry:
>>> +

>>> +
>>> +        24 - 27:    flags
>>> +                    Bit
>>> +                      0: in_use
>>> +                         The bitmap is in use and may be inconsistent.
>>> +
>>> +                      1: self
>>> +                         The bitmap is a dirty bitmap for the
>>> containing image.
>>> +
>>> +                      2: auto
>>> +                         The bitmap should be autoloaded as block
>>> dirty bitmap.
>>> +                         Only available if bit 1 (self) is set.
>>> +
>>> +                      3: read_only
>>> +                         The bitmap should not be rewritten.
>>> +
>>> +                    Bits 4 - 31 are reserved.
>>
>> Is this appropriate as field, reserved for future extensiion? Or we need
>> an additional one? Do we need scheme like with snapshots? (somthing like
>> field 'additional_area_size', and additional offset of this size after
>> the name)
>>
> 
> I think it would remain appropriate as long as we have a version header
> for the bitmap extension as a whole.

Simply requiring that the bits must be 0 is good enough for now.

> 
> e.g. "Bits 4 - 31 are reserved in qcow2.bitmap.v1 ..."
> 
> If a program that only knows about v1 opens a v2 file and find it
> conforms to spec (does not use the new reserved bits), then it can
> continue along happily.

I don't know that you even have to mention versions of the header, so
much as the blanket statement that any set bit not described by this
version of the spec is either a data corruption or evidence of a newer
version of the spec having edited the file in the meantime.  It works as
long as you require conforming clients to set reserved bits to 0.

> 
> If a reserved bit is set, it's an error and the v1 program must not
> alter the image in case it ruins the consistency of the file.
> 
> The usual suspects (Kevin, Markus, Stefan and Eric) may have better
> suggestions for how to handle future compatibility by drawing upon their
> experience with qcow2.

No, I think we're just fine. If any future spec version requires
additional space, then it can use one of the bits 4-31 as a flag to call
out that space, and older clients will handily refuse to operate on the
file without having to know that the bit meant that the header occupied
more space in the newer version of the spec.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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