Re: [Qemu-devel] [PATCH v2 3/4] qcow2: add shrink image support

2017-06-28 Thread Max Reitz
On 2017-06-28 17:31, Pavel Butsykin wrote: > On 28.06.2017 16:59, Max Reitz wrote: >> On 2017-06-27 17:06, Pavel Butsykin wrote: >>> On 26.06.2017 20:47, Max Reitz wrote: On 2017-06-26 17:23, Pavel Butsykin wrote: >>> [] > > Is there any guarantee that in the future this will not chang

Re: [Qemu-devel] [PATCH v2 3/4] qcow2: add shrink image support

2017-06-28 Thread Pavel Butsykin
On 28.06.2017 16:59, Max Reitz wrote: On 2017-06-27 17:06, Pavel Butsykin wrote: On 26.06.2017 20:47, Max Reitz wrote: On 2017-06-26 17:23, Pavel Butsykin wrote: [] Is there any guarantee that in the future this will not change? Because in this case it can be a potential danger. Since this

Re: [Qemu-devel] [PATCH v2 3/4] qcow2: add shrink image support

2017-06-28 Thread Max Reitz
On 2017-06-27 17:06, Pavel Butsykin wrote: > On 26.06.2017 20:47, Max Reitz wrote: >> On 2017-06-26 17:23, Pavel Butsykin wrote: > [] >>> >>> Is there any guarantee that in the future this will not change? Because >>> in this case it can be a potential danger. >> >> Since this behavior is not docum

Re: [Qemu-devel] [PATCH v2 3/4] qcow2: add shrink image support

2017-06-27 Thread Pavel Butsykin
On 26.06.2017 20:47, Max Reitz wrote: On 2017-06-26 17:23, Pavel Butsykin wrote: [] Is there any guarantee that in the future this will not change? Because in this case it can be a potential danger. Since this behavior is not documented anywhere, there is no guarantee. I can add a comment.

Re: [Qemu-devel] [PATCH v2 3/4] qcow2: add shrink image support

2017-06-26 Thread Max Reitz
On 2017-06-26 17:23, Pavel Butsykin wrote: > On 23.06.2017 18:46, Max Reitz wrote: >> On 2017-06-22 15:57, Pavel Butsykin wrote: >>> >>> On 22.06.2017 01:55, Max Reitz wrote: On 2017-06-13 14:16, Pavel Butsykin wrote: > [] > +} > +qcow2_cache_put(bs, s->refcount_block_c

Re: [Qemu-devel] [PATCH v2 3/4] qcow2: add shrink image support

2017-06-26 Thread Pavel Butsykin
On 23.06.2017 18:46, Max Reitz wrote: On 2017-06-22 15:57, Pavel Butsykin wrote: On 22.06.2017 01:55, Max Reitz wrote: On 2017-06-13 14:16, Pavel Butsykin wrote: [] +} +qcow2_cache_put(bs, s->refcount_block_cache, &refblock); + +reftable_tmp[i] = unused_block ? 0 : cp

Re: [Qemu-devel] [PATCH v2 3/4] qcow2: add shrink image support

2017-06-23 Thread Max Reitz
On 2017-06-22 15:57, Pavel Butsykin wrote: > > On 22.06.2017 01:55, Max Reitz wrote: >> On 2017-06-13 14:16, Pavel Butsykin wrote: >>> This patch add shrinking of the image file for qcow2. As a result, >>> this allows >>> us to reduce the virtual image size and free up space on the disk >>> withou

Re: [Qemu-devel] [PATCH v2 3/4] qcow2: add shrink image support

2017-06-22 Thread Pavel Butsykin
On 22.06.2017 01:55, Max Reitz wrote: On 2017-06-13 14:16, Pavel Butsykin wrote: This patch add shrinking of the image file for qcow2. As a result, this allows us to reduce the virtual image size and free up space on the disk without copying the image. Image can be fragmented and shrink is done

Re: [Qemu-devel] [PATCH v2 3/4] qcow2: add shrink image support

2017-06-21 Thread Max Reitz
On 2017-06-13 14:16, Pavel Butsykin wrote: > This patch add shrinking of the image file for qcow2. As a result, this allows > us to reduce the virtual image size and free up space on the disk without > copying the image. Image can be fragmented and shrink is done by punching > holes > in the image

[Qemu-devel] [PATCH v2 3/4] qcow2: add shrink image support

2017-06-13 Thread Pavel Butsykin
This patch add shrinking of the image file for qcow2. As a result, this allows us to reduce the virtual image size and free up space on the disk without copying the image. Image can be fragmented and shrink is done by punching holes in the image file. Signed-off-by: Pavel Butsykin --- block/qcow