[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v13 6/6] qcow2: Add full preallocation option
From: |
Kevin Wolf |
Subject: |
Re: [Qemu-devel] [PATCH v13 6/6] qcow2: Add full preallocation option |
Date: |
Thu, 4 Sep 2014 15:09:08 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
Am 29.08.2014 um 10:33 hat Hu Tao geschrieben:
> preallocation=full allocates disk space by fallocating the space if
> posix_fallocate() is available, otherwise by writing zeros to disk to
> ensure disk space in any cases.
>
> Signed-off-by: Hu Tao <address@hidden>
> ---
> block/qcow2.c | 61
> +++++++++++++++++++++++++++++++++++++++-------
> qemu-doc.texi | 7 +++---
> qemu-img.texi | 7 +++---
> tests/qemu-iotests/082.out | 54 ++++++++++++++++++++--------------------
> 4 files changed, 87 insertions(+), 42 deletions(-)
> + qemu_opt_set_number(opts, BLOCK_OPT_SIZE,
> + aligned_total_size + meta_size);
> + qemu_opt_set(opts, BLOCK_OPT_PREALLOC,
> PreallocMode_lookup[prealloc]);
> + }
This means that if used with a protocol that doesn't have a
preallocation option, it gets silently ignored. I'm not completely
decided yet whether that's a bug or a feature. :-)
Kevin