From: Anthony Liguori <anthony@codemonkey.ws>
To: Kevin Wolf <kwolf@suse.de>
Cc: qemu-devel@nongnu.org
Subject: [Qemu-devel] Re: [PATCH][RESEND] qcow2: Fix cluster allocation
Date: Wed, 07 Jan 2009 11:22:25 -0600 [thread overview]
Message-ID: <4964E4D1.7010405@codemonkey.ws> (raw)
In-Reply-To: <4964E38A.5050204@suse.de>
Kevin Wolf wrote:
> When allocating multiple clusters at once, the qcow2 implementation
> tries to find as many physically contiguous clusters as possible to
> allow larger writes. This search includes allocated clusters which are
> in the right place and still free clusters. If the range to allocate
> spans clusters in patterns like "10 allocated, then 10 free, then again
> 10 allocated" it is only checked that the chunks of allocated clusters
> are contiguous for themselves.
>
> However, what is actually needed is to have _all_ allocated clusters
> contiguous, starting at the first cluster of the allocation and spanning
> multiple such chunks. This patch changes the check so that each offset
> is not compared to the offset of the first cluster in its own chunk but
> to the first cluster in the whole allocation.
>
> I haven't seen it happen, but without this fix data corruption on qcow2
> images is possible.
>
> Signed-off-by: Kevin Wolf <kwolf@suse.de>
> Acked-by: Gleb Natapov <gleb@redhat.com>
>
Applied. Thanks.
Regards,
Anthony Liguori
next prev parent reply other threads:[~2009-01-07 17:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-07 17:16 [Qemu-devel] [PATCH][RESEND] qcow2: Fix cluster allocation Kevin Wolf
2009-01-07 17:22 ` Anthony Liguori [this message]
2009-01-07 17:34 ` [Qemu-devel] " Anthony Liguori
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=4964E4D1.7010405@codemonkey.ws \
--to=anthony@codemonkey.ws \
--cc=kwolf@suse.de \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.