qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] Re: [PATCH v3 5/5] qed: Consistency check support


From: Kevin Wolf
Subject: [Qemu-devel] Re: [PATCH v3 5/5] qed: Consistency check support
Date: Wed, 27 Oct 2010 17:52:04 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.12) Gecko/20100907 Fedora/3.0.7-1.fc12 Thunderbird/3.0.7

Am 22.10.2010 16:56, schrieb Stefan Hajnoczi:
> This patch adds support for the qemu-img check command.  It also
> introduces a dirty bit in the qed header to mark modified images as
> needing a check.  This bit is cleared when the image file is closed
> cleanly.
> 
> If an image file is opened and it has the dirty bit set, a consistency
> check will run and try to fix corrupted table offsets.  These
> corruptions may occur if there is power loss while an allocating write
> is performed.  Once the image is fixed it opens as normal again.
> 
> Signed-off-by: Stefan Hajnoczi <address@hidden>

Hm, do I understand right that you fix the image and reset the dirty
flag in the header during bdrv_open? So how does this work with
migration, when the destination host opens the QED file before the
source closes it? Doesn't the destination destroy the image by "fixing" it?

And even if that wasn't the case, clearing the flag means that the
source might do new writes and thinks that the flag is still set. If the
source crashes now, we may need a consistency check, but the dirty flag
isn't set any more.

Am I missing some detail?

Kevin



reply via email to

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