[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v7 for 2.0 4/4] qcow2: Add full image preallocat
From: |
Hu Tao |
Subject: |
Re: [Qemu-devel] [PATCH v7 for 2.0 4/4] qcow2: Add full image preallocation option |
Date: |
Wed, 7 May 2014 10:39:17 +0800 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
Hi,
On Thu, Mar 20, 2014 at 02:38:32PM +0100, Kevin Wolf wrote:
> Am 17.03.2014 um 07:53 hat Hu Tao geschrieben:
> > This adds a preallocation=full mode to qcow2 image creation, which
> > creates a non-sparse image file.
> >
> > Signed-off-by: Hu Tao <address@hidden>
>
> I see that you changed the implementation from bdrv_preallocate() to
> bdrv_create() options in v4 after Stefan had asked whether
> bdrv_preallocate() was really necessary or just complicating things.
>
> In hindsight, do you really think the new code is simpler? I certainly
> think this one is rather adventurous and the formulas to precalculate
> the image file size are easy to get wrong.
When I tried to implement the bdrv_preallocate() way, I found that it
was inevitable to precalculate the size. For example, in
qcow2::bdrv_preallcate() we have to call low level
raw::bdrv_preallocate() first, but we have to pass in the actual image
file size which we have to precalculate before qcow2::bdrv_preallocate()
can create any metadata.
Another problem I don't understand about bdrv_preallocate() is that how
it ensures existing data not being corrupted for every call to
bdrv_preallocate().
Regards,
Hu Tao
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [Qemu-devel] [PATCH v7 for 2.0 4/4] qcow2: Add full image preallocation option,
Hu Tao <=