[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCHv2 18/20] qemu-img: add support for fully allocat
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCHv2 18/20] qemu-img: add support for fully allocated images |
Date: |
Thu, 19 Sep 2013 14:36:28 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130805 Thunderbird/17.0.8 |
On 09/17/2013 07:48 AM, Peter Lieven wrote:
> Signed-off-by: Peter Lieven <address@hidden>
> ---
> qemu-img.c | 8 +++++---
> 1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/qemu-img.c b/qemu-img.c
> index 3e5e388..7600b58 100644
> --- a/qemu-img.c
> +++ b/qemu-img.c
> @@ -100,8 +100,10 @@ static void help(void)
> " '-h' with or without a command shows this help and lists the
> supported formats\n"
> " '-p' show progress of command (only certain commands)\n"
> " '-q' use Quiet mode - do not print any output (except
> errors)\n"
> - " '-S' indicates the consecutive number of bytes that must
> contain only zeros\n"
> - " for qemu-img to create a sparse image during conversion\n"
> + " '-S' indicates the consecutive number of bytes (defaults to
> 4096) that must\n"
> + " contain only zeros for qemu-img to create a sparse image
> during\n"
> + " conversion. if the number of bytes is 0 sparse files are
> disabled and\n"
s/if/If/
s/0/0,/
> + " images will always be fully allocated\n"
IIRC correctly, on NTFS file system, the minimum hole size for a sparse
file is 64k. Can you please make this option accept a suffixed number
(-S 64k) instead of forcing me to spell it out (-S 65536)?
> " '--output' takes the format in which the output must be done
> (human or json)\n"
> " '-n' skips the target volume creation (useful if the volume is
> created\n"
> " prior to running qemu-img)\n"
> @@ -1468,7 +1470,7 @@ static int img_convert(int argc, char **argv)
> /* signal EOF to align */
> bdrv_write_compressed(out_bs, 0, NULL, 0);
> } else {
> - int has_zero_init = bdrv_has_zero_init(out_bs);
> + int has_zero_init = min_sparse ? bdrv_has_zero_init(out_bs) : 0;
Is this another function that should be returning bool instead of int?
But that's a question for a separate patch.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- [Qemu-devel] [PATCHv2 20/20] block/raw: copy block limits and alignment information on raw_open, (continued)
- [Qemu-devel] [PATCHv2 17/20] block/get_block_status: fix BDRV_BLOCK_ZERO for unallocated blocks, Peter Lieven, 2013/09/17
- [Qemu-devel] [PATCHv2 19/20] qemu-img: conditionally zero out target on convert, Peter Lieven, 2013/09/17
- [Qemu-devel] [PATCHv2 16/20] block/get_block_status: avoid redundant callouts on raw devices, Peter Lieven, 2013/09/17
- [Qemu-devel] [PATCHv2 18/20] qemu-img: add support for fully allocated images, Peter Lieven, 2013/09/17
- Re: [Qemu-devel] [PATCHv2 18/20] qemu-img: add support for fully allocated images,
Eric Blake <=