[Top][All Lists]
[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
- [Qemu-devel] [RFC 0/7] qcow2: implement lazy refcounts optimization, Stefan Hajnoczi, 2012/06/22
- [Qemu-devel] [RFC 5/7] qcow2: implement lazy refcounts, Stefan Hajnoczi, 2012/06/22
- [Qemu-devel] [RFC 2/7] qcow2: introduce dirty bit, Stefan Hajnoczi, 2012/06/22
- [Qemu-devel] [RFC 1/7] docs: add dirty bit to qcow2 specification, Stefan Hajnoczi, 2012/06/22
- [Qemu-devel] [RFC 4/7] qemu-iotests: ignore qemu-img create lazy_refcounts output, Stefan Hajnoczi, 2012/06/22
- [Qemu-devel] [RFC 7/7] qemu-iotests: add 039 qcow2 lazy refcounts test, Stefan Hajnoczi, 2012/06/22
- [Qemu-devel] [RFC 6/7] qemu-io: add "abort" command to simulate program crash, Stefan Hajnoczi, 2012/06/22
- [Qemu-devel] [RFC 3/7] docs: add lazy refcounts bit to qcow2 specification, Stefan Hajnoczi, 2012/06/22
- Re: [Qemu-devel] [RFC 0/7] qcow2: implement lazy refcounts optimization, Zhi Yong Wu, 2012/06/25