Re: [Qemu-devel] [RFC PATCH v3 6/6] qcow2: Add full image preallocation option

2013-12-20 Thread Stefan Hajnoczi
On Thu, Dec 19, 2013 at 10:27:41AM +0800, Hu Tao wrote: > -static int preallocate(BlockDriverState *bs) > +static int preallocate(BlockDriverState *bs, enum prealloc_mode mode) > { > uint64_t nb_sectors; > uint64_t offset; > @@ -1395,9 +1395,19 @@ static int preallocate(BlockDriverState

[Qemu-devel] [RFC PATCH v3 6/6] qcow2: Add full image preallocation option

2013-12-18 Thread Hu Tao
This adds a preallocation=full mode to qcow2 image creation, which creates a non-sparse image file. Signed-off-by: Hu Tao --- block/qcow2.c | 20 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/block/qcow2.c b/block/qcow2.c index 487a595..3c41d4a 100644 --- a/