[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC PATCH v3 0/6] qemu-img: add preallocation=full
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [RFC PATCH v3 0/6] qemu-img: add preallocation=full |
Date: |
Fri, 20 Dec 2013 11:30:21 +0100 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Thu, Dec 19, 2013 at 10:27:35AM +0800, Hu Tao wrote:
> This series implements full image preallocation to create a non-sparse image
> file at creation time, both for raw and qcow2 format. The purpose is to avoid
> performance deterioration of the guest cause by sparse image.
I'm not sure the new bdrv_preallocate() interface is necessary. Can
qcow2_create() simply pass a preallocate=full option to
bdrv_create_file()?
It's simpler if we avoid bdrv_preallocate(), just keep it a
.bdrv_create() option. That way we also avoid the question of how
exactly preallocate functions on an image file that already has blocks
allocated.
So what I imagine is:
1. Add preallocation=full support to raw-posix.c
2. Add preallocation=full support to qcow2.c, calculate image file size
including metadata for bdrv_create_file().
CCing Eric Blake so libvirt can consider how full preallocation
interacts with their safezero() preallocation. If QEMU handles
preallocation can we skip safezero()? Is there a concern about full
preallocation in QEMU taking a long time without progress report?
Stefan
- [Qemu-devel] [RFC PATCH v3 4/6] raw-posix: Add full image preallocation option, (continued)
- [Qemu-devel] [RFC PATCH v3 4/6] raw-posix: Add full image preallocation option, Hu Tao, 2013/12/18
- [Qemu-devel] [RFC PATCH v3 2/6] block: add BlockDriver.bdrv_preallocate., Hu Tao, 2013/12/18
- [Qemu-devel] [RFC PATCH v3 5/6] qcow2: implement bdrv_preallocate, Hu Tao, 2013/12/18
- [Qemu-devel] [RFC PATCH v3 3/6] block/raw-posix: implement bdrv_preallocate, Hu Tao, 2013/12/18
- [Qemu-devel] [RFC PATCH v3 6/6] qcow2: Add full image preallocation option, Hu Tao, 2013/12/18
- Re: [Qemu-devel] [RFC PATCH v3 0/6] qemu-img: add preallocation=full,
Stefan Hajnoczi <=