Re: [Qemu-block] [Qemu-devel] [PATCH] block/qcow2-bitmap: fix use of uninitialized pointer

2017-09-22 Thread Eric Blake
On 09/22/2017 09:43 AM, Vladimir Sementsov-Ogievskiy wrote: > Without initialization to zero dirty_bitmap field may be not zero > for a bitmap which should not be stored and > qcow2_store_persistent_dirty_bitmaps will erroneously call > store_bitmap for it which leads to SYGSEGV on

Re: [Qemu-block] [PATCH v2 1/3] block: add bdrv_co_drain_end callback

2017-09-22 Thread Kevin Wolf
Am 22.09.2017 um 04:30 hat Fam Zheng geschrieben: > On Thu, 09/21 18:39, Manos Pitsidianakis wrote: > > On Thu, Sep 21, 2017 at 09:29:43PM +0800, Fam Zheng wrote: > > > On Thu, 09/21 16:17, Manos Pitsidianakis wrote: > > It might imply to someone that there's an assert(drv->bdrv_co_drain_begin &&

[Qemu-block] [PATCH v2 2/2] qcow2: truncate the tail of the image file after shrinking the image

2017-09-22 Thread Pavel Butsykin
Now after shrinking the image, at the end of the image file, there might be a tail that probably will never be used. So we can find the last used cluster and cut the tail. Signed-off-by: Pavel Butsykin --- block/qcow2-refcount.c | 22 ++

[Qemu-block] [PATCH v2 0/2] Truncate the tail of the image file in qcow2 shrinking

2017-09-22 Thread Pavel Butsykin
Now after shrinking the qcow2 image, at the end of the image file, there might be a tail that probably will never be used. Although it will not bring any tangible benefit, we can cut the tail if it is. Yes, it will not free up disk space, but if the blocks were be allocated sequentially and the

[Qemu-block] [PATCH v2 1/2] qcow2: fix return error code in qcow2_truncate()

2017-09-22 Thread Pavel Butsykin
Signed-off-by: Pavel Butsykin Reviewed-by: Eric Blake Reviewed-by: John Snow Reviewed-by: Max Reitz --- block/qcow2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/block/qcow2.c

Re: [Qemu-block] [PATCH 1/6] qemu-io: Reset qemuio_blk permissions before each command

2017-09-22 Thread Kevin Wolf
Am 21.09.2017 um 15:53 hat Kevin Wolf geschrieben: > Am 15.09.2017 um 12:10 hat Kevin Wolf geschrieben: > > qemu-io provides a 'reopen' command that allows switching from writable > > to read-only access. We need to make sure that we don't try to keep > > write permissions to a BlockBackend that

Re: [Qemu-block] [Qemu-devel] [PATCH v2 0/2] Truncate the tail of the image file in qcow2 shrinking

2017-09-22 Thread Daniel P. Berrange
On Fri, Sep 22, 2017 at 12:39:24PM +0300, Pavel Butsykin wrote: > Now after shrinking the qcow2 image, at the end of the image file, there might > be a tail that probably will never be used. Although it will not bring any > tangible benefit, we can cut the tail if it is. Yes, it will not free up

Re: [Qemu-block] [PATCH v2 3/3] block/throttle.c: add bdrv_co_drain_begin/end callbacks

2017-09-22 Thread Stefan Hajnoczi
On Thu, Sep 21, 2017 at 04:17:07PM +0300, Manos Pitsidianakis wrote: > Reviewed-by: Stefan Hajnoczi > Signed-off-by: Manos Pitsidianakis > --- > block/throttle.c | 18 ++ > 1 file changed, 18 insertions(+) Reviewed-by: Stefan Hajnoczi

Re: [Qemu-block] [Qemu-devel] [PATCH v2 0/2] Truncate the tail of the image file in qcow2 shrinking

2017-09-22 Thread Pavel Butsykin
On 22.09.2017 12:50, Daniel P. Berrange wrote: On Fri, Sep 22, 2017 at 12:39:24PM +0300, Pavel Butsykin wrote: Now after shrinking the qcow2 image, at the end of the image file, there might be a tail that probably will never be used. Although it will not bring any tangible benefit, we can cut

Re: [Qemu-block] [Qemu-devel] [PATCH v2 1/3] block: add bdrv_co_drain_end callback

2017-09-22 Thread Fam Zheng
On Fri, 09/22 13:03, Kevin Wolf wrote: > Am 22.09.2017 um 04:30 hat Fam Zheng geschrieben: > > On Thu, 09/21 18:39, Manos Pitsidianakis wrote: > > > On Thu, Sep 21, 2017 at 09:29:43PM +0800, Fam Zheng wrote: > > > > On Thu, 09/21 16:17, Manos Pitsidianakis wrote: > > > It might imply to someone

Re: [Qemu-block] [PATCH v2 1/6] qemu-io: Drop write permissions before read-only reopen

2017-09-22 Thread Fam Zheng
On Fri, 09/22 14:55, Kevin Wolf wrote: > qemu-io provides a 'reopen' command that allows switching from writable > to read-only access. We need to make sure that we don't try to keep > write permissions to a BlockBackend that becomes read-only, otherwise > things are going to fail. > > This

[Qemu-block] [PATCH v2 1/6] qemu-io: Drop write permissions before read-only reopen

2017-09-22 Thread Kevin Wolf
qemu-io provides a 'reopen' command that allows switching from writable to read-only access. We need to make sure that we don't try to keep write permissions to a BlockBackend that becomes read-only, otherwise things are going to fail. This requires a bdrv_drain() call because otherwise in-flight

[Qemu-block] [PATCH] block/qcow2-bitmap: fix use of uninitialized pointer

2017-09-22 Thread Vladimir Sementsov-Ogievskiy
Without initialization to zero dirty_bitmap field may be not zero for a bitmap which should not be stored and qcow2_store_persistent_dirty_bitmaps will erroneously call store_bitmap for it which leads to SYGSEGV on bdrv_dirty_bitmap_name. Signed-off-by: Vladimir Sementsov-Ogievskiy

[Qemu-block] [PATCH 03/34] block: remove "qemu/osdep.h" from header file

2017-09-22 Thread Philippe Mathieu-Daudé
applied using ./scripts/clean-includes Signed-off-by: Philippe Mathieu-Daudé --- block/dmg.h | 1 - 1 file changed, 1 deletion(-) diff --git a/block/dmg.h b/block/dmg.h index b592d6fa8b..2ecf239ba5 100644 --- a/block/dmg.h +++ b/block/dmg.h @@ -26,7 +26,6 @@ #ifndef

[Qemu-block] [PATCH 13/34] hw/ide: remove old i386 dependency

2017-09-22 Thread Philippe Mathieu-Daudé
and remove a duplicated include Signed-off-by: Philippe Mathieu-Daudé --- hw/ide/ahci.c | 1 - hw/ide/cmd646.c | 1 - hw/ide/core.c | 3 +-- hw/ide/ich.c| 1 - hw/ide/isa.c| 1 - hw/ide/microdrive.c | 1 - hw/ide/pci.c| 1 - hw/ide/piix.c

Re: [Qemu-block] [PATCH 03/34] block: remove "qemu/osdep.h" from header file

2017-09-22 Thread Peter Maydell
On 22 September 2017 at 16:39, Philippe Mathieu-Daudé wrote: > applied using ./scripts/clean-includes > > Signed-off-by: Philippe Mathieu-Daudé > --- > block/dmg.h | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/block/dmg.h b/block/dmg.h > index

Re: [Qemu-block] [Qemu-devel] [PATCH 13/34] hw/ide: remove old i386 dependency

2017-09-22 Thread John Snow
On 09/22/2017 11:39 AM, Philippe Mathieu-Daudé wrote: > and remove a duplicated include > > Signed-off-by: Philippe Mathieu-Daudé Acked-by: John Snow