Re: [Qemu-block] [PATCH v9 05/20] dirty-bitmap: Avoid size query failure during truncate

2017-09-23 Thread Vladimir Sementsov-Ogievskiy
19.09.2017 23:18, Eric Blake wrote: We've previously fixed several places where we failed to account for possible errors from bdrv_nb_sectors(). Fix another one by making bdrv_dirty_bitmap_truncate() take the new size from the caller instead of querying itself; then adjust the sole caller bdrv_t

Re: [Qemu-block] [PATCH v9 18/20] qcow2: Switch store_bitmap_data() to byte-based iteration

2017-09-23 Thread Vladimir Sementsov-Ogievskiy
19.09.2017 23:19, Eric Blake wrote: Now that we have adjusted the majority of the calls this function makes to be byte-based, it is easier to read the code if it makes passes over the image using bytes rather than sectors. iotests 165 was rather weak - on a default 64k-cluster image, where bitma

[Qemu-block] [PATCH v3 0/3] add bdrv_co_drain_begin/end BlockDriver callbacks

2017-09-23 Thread Manos Pitsidianakis
This patch series renames bdrv_co_drain to bdrv_co_drain_begin and adds a new bdrv_co_drain_end callback to match bdrv_drained_begin/end and drained_begin/end of BdrvChild. This is needed because the throttle driver (block/throttle.c) needs a way to mark the end of the drain in order to toggle

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

2017-09-23 Thread Manos Pitsidianakis
BlockDriverState has a bdrv_co_drain() callback but no equivalent for the end of the drain. The throttle driver (block/throttle.c) needs a way to mark the end of the drain in order to toggle io_limits_disabled correctly, thus bdrv_co_drain_end is needed. Signed-off-by: Manos Pitsidianakis --- in

[Qemu-block] [PATCH v3 2/3] block: rename bdrv_co_drain to bdrv_co_drain_begin

2017-09-23 Thread Manos Pitsidianakis
Reviewed-by: Stefan Hajnoczi Reviewed-by: Fam Zheng Signed-off-by: Manos Pitsidianakis --- include/block/block_int.h | 4 ++-- block/io.c| 4 ++-- block/qed.c | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/include/block/block_int.h b/inc

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

2017-09-23 Thread Manos Pitsidianakis
Reviewed-by: Stefan Hajnoczi Reviewed-by: Fam Zheng Signed-off-by: Manos Pitsidianakis --- block/throttle.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/block/throttle.c b/block/throttle.c index 5bca76300f..833175ac77 100644 --- a/block/throttle.c +++ b/block/throttle

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

2017-09-23 Thread Vladimir Sementsov-Ogievskiy
22.09.2017 17:43, 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 bdrv_dirty_bitmap_name. pl