qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [RFC 2/7] qcow2: introduce dirty bit


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [RFC 2/7] qcow2: introduce dirty bit
Date: Mon, 25 Jun 2012 16:51:09 +0100

On Mon, Jun 25, 2012 at 3:18 PM, Kevin Wolf <address@hidden> wrote:
> Am 22.06.2012 17:08, schrieb Stefan Hajnoczi:
>> This patch adds an incompatible feature bit to mark images that have not
>> been closed cleanly.  When a dirty image file is opened a consistency
>> check and repair is performed.
>>
>> Signed-off-by: Stefan Hajnoczi <address@hidden>
>> ---
>>  block/qcow2.c |   44 ++++++++++++++++++++++++++++++++++++++++++--
>>  block/qcow2.h |    3 +++
>>  2 files changed, 45 insertions(+), 2 deletions(-)
>
>> diff --git a/block/qcow2.h b/block/qcow2.h
>> index 455b6d7..5c7cfb6 100644
>> --- a/block/qcow2.h
>> +++ b/block/qcow2.h
>> @@ -108,6 +108,9 @@ enum {
>>      QCOW2_FEAT_TYPE_INCOMPATIBLE    = 0,
>>      QCOW2_FEAT_TYPE_COMPATIBLE      = 1,
>>      QCOW2_FEAT_TYPE_AUTOCLEAR       = 2,
>> +
>> +    QCOW2_INCOMPATIBLE_FEAT_DIRTY   = 0x1,
>> +    QCOW2_INCOMPATIBLE_FEAT_MASK    = QCOW2_INCOMPATIBLE_FEAT_DIRTY,
>>  };
>
> I would use a separate enum for each of the three flag categories.
>
> Also, you should add a feature table entry for the dirty bit so that
> older qemu versions can display a useful error message.

Good point, I forgot to do this.

Stefan



reply via email to

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