From: Stefan Hajnoczi <stefanha@gmail.com>
To: Kevin Wolf <kwolf@redhat.com>
Cc: qemu-devel@nongnu.org, Anthony Liguori <aliguori@us.ibm.com>,
Christoph Hellwig <hch@lst.de>,
Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>,
Avi Kivity <avi@redhat.com>
Subject: Re: [Qemu-devel] Re: [PATCH v3 5/5] qed: Consistency check support
Date: Thu, 28 Oct 2010 11:15:01 +0100 [thread overview]
Message-ID: <AANLkTin+JjVnmd8vBur0prcPL1v4=aNFMY=NSuV=cu7w@mail.gmail.com> (raw)
In-Reply-To: <4CC84AA4.2030701@redhat.com>
On Wed, Oct 27, 2010 at 4:52 PM, Kevin Wolf <kwolf@redhat.com> wrote:
> 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 <stefanha@linux.vnet.ibm.com>
>
> 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?
You're right, migration is not supported. This is also true for the
other image formats which cache metadata in memory though.
I am actually looking into migration next together with Adam Litke who
has already started. We'll have to defer accessing the file until the
source has flushed/closed it.
Stefan
next prev parent reply other threads:[~2010-10-28 10:15 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-22 14:56 [Qemu-devel] (no subject) Stefan Hajnoczi
2010-10-22 14:56 ` [Qemu-devel] [PATCH v3 1/5] docs: Add QED image format specification Stefan Hajnoczi
2010-10-22 14:56 ` [Qemu-devel] [PATCH v3 2/5] qed: Add QEMU Enhanced Disk image format Stefan Hajnoczi
2010-10-22 14:56 ` [Qemu-devel] [PATCH v3 3/5] qed: Table, L2 cache, and cluster functions Stefan Hajnoczi
2010-10-22 14:56 ` [Qemu-devel] [PATCH v3 4/5] qed: Read/write support Stefan Hajnoczi
2010-10-22 14:56 ` [Qemu-devel] [PATCH v3 5/5] qed: Consistency check support Stefan Hajnoczi
2010-10-27 15:52 ` [Qemu-devel] " Kevin Wolf
2010-10-28 10:15 ` Stefan Hajnoczi [this message]
2010-10-28 10:37 ` Kevin Wolf
2010-10-28 10:51 ` Stefan Hajnoczi
2010-10-28 11:02 ` Avi Kivity
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='AANLkTin+JjVnmd8vBur0prcPL1v4=aNFMY=NSuV=cu7w@mail.gmail.com' \
--to=stefanha@gmail.com \
--cc=aliguori@us.ibm.com \
--cc=avi@redhat.com \
--cc=hch@lst.de \
--cc=kwolf@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@linux.vnet.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).