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: Kevin Wolf
Subject: Re: [Qemu-devel] [RFC 2/7] qcow2: introduce dirty bit
Date: Mon, 25 Jun 2012 16:18:05 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20120430 Thunderbird/12.0.1

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.

Kevin



reply via email to

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