Re: [Qemu-devel] [PATCH 08/12] qemu-img: conditionally zero out target on convert

2013-09-16 Thread Paolo Bonzini
Il 13/09/2013 21:48, Peter Lieven ha scritto: > Am 13.09.2013 20:25, schrieb Eric Blake: >> On 09/13/2013 04:36 AM, Paolo Bonzini wrote: >>> Il 13/09/2013 12:25, Peter Lieven ha scritto: if the target has_zero_init = 0, but supports efficiently writing zeroes by unmapping we call bdrv_zer

Re: [Qemu-devel] [PATCH 08/12] qemu-img: conditionally zero out target on convert

2013-09-13 Thread Eric Blake
On 09/13/2013 01:48 PM, Peter Lieven wrote: +flags = BDRV_O_RDWR | BDRV_O_UNMAP; >>> I think this should be a new command-line flag. >> I agree - while 'sparse by default' may be reasonable, it is also >> feasible to want a mode that guarantees expansion rather than unmapped >> or sparse.

Re: [Qemu-devel] [PATCH 08/12] qemu-img: conditionally zero out target on convert

2013-09-13 Thread Peter Lieven
Am 13.09.2013 20:25, schrieb Eric Blake: > On 09/13/2013 04:36 AM, Paolo Bonzini wrote: >> Il 13/09/2013 12:25, Peter Lieven ha scritto: >>> if the target has_zero_init = 0, but supports efficiently >>> writing zeroes by unmapping we call bdrv_zeroize to >>> avoid fully allocating the target. this

Re: [Qemu-devel] [PATCH 08/12] qemu-img: conditionally zero out target on convert

2013-09-13 Thread Eric Blake
On 09/13/2013 04:36 AM, Paolo Bonzini wrote: > Il 13/09/2013 12:25, Peter Lieven ha scritto: >> if the target has_zero_init = 0, but supports efficiently >> writing zeroes by unmapping we call bdrv_zeroize to >> avoid fully allocating the target. this currently >> is designed especially for iscsi.

Re: [Qemu-devel] [PATCH 08/12] qemu-img: conditionally zero out target on convert

2013-09-13 Thread Paolo Bonzini
Il 13/09/2013 12:46, Peter Lieven ha scritto: >>> >>> -flags = BDRV_O_RDWR; >>> +flags = BDRV_O_RDWR | BDRV_O_UNMAP; >> I think this should be a new command-line flag. > In an earlier version there where no objections. I think it would > make the usage of qemu-img convert more complicated

Re: [Qemu-devel] [PATCH 08/12] qemu-img: conditionally zero out target on convert

2013-09-13 Thread Peter Lieven
On 13.09.2013 12:36, Paolo Bonzini wrote: Il 13/09/2013 12:25, Peter Lieven ha scritto: if the target has_zero_init = 0, but supports efficiently writing zeroes by unmapping we call bdrv_zeroize to avoid fully allocating the target. this currently is designed especially for iscsi. Signed-off-by

Re: [Qemu-devel] [PATCH 08/12] qemu-img: conditionally zero out target on convert

2013-09-13 Thread Paolo Bonzini
Il 13/09/2013 12:25, Peter Lieven ha scritto: > if the target has_zero_init = 0, but supports efficiently > writing zeroes by unmapping we call bdrv_zeroize to > avoid fully allocating the target. this currently > is designed especially for iscsi. > > Signed-off-by: Peter Lieven > --- > qemu-img

[Qemu-devel] [PATCH 08/12] qemu-img: conditionally zero out target on convert

2013-09-13 Thread Peter Lieven
if the target has_zero_init = 0, but supports efficiently writing zeroes by unmapping we call bdrv_zeroize to avoid fully allocating the target. this currently is designed especially for iscsi. Signed-off-by: Peter Lieven --- qemu-img.c | 22 -- 1 file changed, 16 insertion