From: Kevin Wolf <kwolf@redhat.com>
To: Avi Kivity <avi@redhat.com>
Cc: markmc@redhat.com, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Re: [PATCH] qcow2/virtio corruption: Don't allocate the same cluster twice
Date: Wed, 06 May 2009 19:52:44 +0200 [thread overview]
Message-ID: <4A01CE6C.3000901@redhat.com> (raw)
In-Reply-To: <4A01C411.3060505@redhat.com>
Avi Kivity schrieb:
> Kevin Wolf wrote:
>> Avi Kivity schrieb:
>>> Also, the second request now depends on the first to update its
>>> metadata. But if the first request fail, it will not update its
>>> metadata, and the second request will complete without error and also
>>> without updating its metadata.
>>>
>> Hm, right. Need to think about this...
>>
>
> I suggest retaining the part where you use inflight l2metas to layout
> data contiguously, but change alloc_cluster_link_l2() not to rely on
> n_start and nb_available but instead recompute them on completion.
> m->nb_clusters should never be zeroed for this to work.
Is there even a reason why we need to copy the unmodified sectors in
alloc_cluster_link_l2() and cannot do that in alloc_cluster_offset()
before we write the new data? Then the callback wouldn't need to mess
around with figuring out which part must be overwritten and which one
mustn't.
Kevin
next prev parent reply other threads:[~2009-05-06 17:53 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-06 16:39 [Qemu-devel] [PATCH] qcow2/virtio corruption: Don't allocate the same cluster twice Kevin Wolf
2009-05-06 16:54 ` [Qemu-devel] " Avi Kivity
2009-05-06 17:03 ` Kevin Wolf
2009-05-06 17:08 ` Avi Kivity
2009-05-06 17:52 ` Kevin Wolf [this message]
2009-05-06 18:31 ` Avi Kivity
2009-05-07 7:32 ` Gleb Natapov
2009-05-07 7:54 ` Avi Kivity
2009-05-07 8:01 ` Kevin Wolf
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=4A01CE6C.3000901@redhat.com \
--to=kwolf@redhat.com \
--cc=avi@redhat.com \
--cc=markmc@redhat.com \
--cc=qemu-devel@nongnu.org \
/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).