Re: [Qemu-block] [PATCH] live-block-ops.txt: Rewrite and improve it

2017-05-30 Thread Kashyap Chamarthy
First, thanks for the quick feedback! On Tue, May 30, 2017 at 02:24:40PM -0500, Eric Blake wrote: > On 05/30/2017 10:38 AM, Kashyap Chamarthy wrote: > > This edition documents all four operations: [...] > s/occurance/occurrence/ > > > use raw JSON; for subsequent occurances, use

Re: [Qemu-block] [Qemu-devel] [PATCH v3 04/16] qemu-img: Expose PreallocMode for resizing

2017-05-30 Thread Eric Blake
On 05/26/2017 11:55 AM, Max Reitz wrote: > Add a --preallocation command line option to qemu-img resize which can > be used to set the PreallocMode parameter of blk_truncate(). > > Signed-off-by: Max Reitz > --- > qemu-img.c| 33 ++--- >

Re: [Qemu-block] [PATCH] live-block-ops.txt: Rewrite and improve it

2017-05-30 Thread Eric Blake
On 05/30/2017 03:24 PM, Kashyap Chamarthy wrote: > First, thanks for the quick feedback! > > On Tue, May 30, 2017 at 02:24:40PM -0500, Eric Blake wrote: >> On 05/30/2017 10:38 AM, Kashyap Chamarthy wrote: >>> This edition documents all four operations: > >>> + >>> +(1) `Disk image backing chain

Re: [Qemu-block] [Qemu-devel] [PATCH v3 10/16] block/qcow2: Lock s->lock in preallocate()

2017-05-30 Thread Eric Blake
On 05/26/2017 11:55 AM, Max Reitz wrote: > preallocate() is and will be called only from places that do not lock Maybe: "that do not otherwise need to lock" > s->lock: Currently that is qcow2_create2(), as of a future patch it will > be called from qcow2_truncate(), too. > > It therefore makes

[Qemu-block] [PATCH 15/25] qcow2: add persistent dirty bitmaps support

2017-05-30 Thread Vladimir Sementsov-Ogievskiy
Store persistent dirty bitmaps in qcow2 image. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- block/qcow2-bitmap.c | 475 +++ block/qcow2.c| 9 + block/qcow2.h

Re: [Qemu-block] [PULL 00/15] Block layer patches

2017-05-30 Thread Stefan Hajnoczi
On Mon, May 29, 2017 at 05:06:39PM +0200, Kevin Wolf wrote: > The following changes since commit 9964e96dccf7f7c936ee854a795415d19b60: > > Merge remote-tracking branch 'jasowang/tags/net-pull-request' into staging > (2017-05-23 15:01:31 +0100) > > are available in the git repository at: >

Re: [Qemu-block] [PATCH 09/25] block/dirty-bitmap: add readonly field to BdrvDirtyBitmap

2017-05-30 Thread Vladimir Sementsov-Ogievskiy
Thank you for this scenario. Hmm. So, as I need guarantee that image and bitmap are unchanged, bdrv_set_dirty should return error and fail the whole write. Ok? 29.05.2017 21:35, Max Reitz wrote: On 2017-05-03 14:25, Vladimir Sementsov-Ogievskiy wrote: It will be needed in following commits

Re: [Qemu-block] [Qemu-devel] [PATCH v2] blockdev: Print a warning for legacy drive options that belong to -device

2017-05-30 Thread Thomas Huth
On 30.05.2017 07:20, Markus Armbruster wrote: > Thomas Huth writes: > >> We likely do not want to carry these legacy -drive options along forever. >> Let's emit a deprecation warning for the -drive options that have a >> replacement with the -device option, so that the

[Qemu-block] [PATCH 25/25] block: release persistent bitmaps on inactivate

2017-05-30 Thread Vladimir Sementsov-Ogievskiy
We should release them here to reload on invalidate cache. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block.c | 4 block/dirty-bitmap.c | 29 +++-- include/block/dirty-bitmap.h | 1 + 3 files changed, 28

[Qemu-block] [PATCH 01/25] specs/qcow2: fix bitmap granularity qemu-specific note

2017-05-30 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: John Snow --- docs/specs/qcow2.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/specs/qcow2.txt b/docs/specs/qcow2.txt index 80cdfd0e91..dda53dd2a3 100644 ---

[Qemu-block] [PATCH 23/25] qcow2: add .bdrv_remove_persistent_dirty_bitmap

2017-05-30 Thread Vladimir Sementsov-Ogievskiy
Realize .bdrv_remove_persistent_dirty_bitmap interface. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz Reviewed-by: John Snow --- block/qcow2-bitmap.c | 41 +

[Qemu-block] [PATCH 05/25] block: fix bdrv_dirty_bitmap_granularity signature

2017-05-30 Thread Vladimir Sementsov-Ogievskiy
Make getter signature const-correct. This allows other functions with const dirty bitmap parameter use bdrv_dirty_bitmap_granularity(). Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Eric Blake Reviewed-by: John Snow

[Qemu-block] [PATCH 16/25] block: add bdrv_can_store_new_dirty_bitmap

2017-05-30 Thread Vladimir Sementsov-Ogievskiy
This will be needed to check some restrictions before making bitmap persistent in qmp-block-dirty-bitmap-add (this functionality will be added by future patch) Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz Reviewed-by: John Snow

[Qemu-block] [PATCH 04/25] tests: add hbitmap iter test

2017-05-30 Thread Vladimir Sementsov-Ogievskiy
Test that hbitmap iter is resistant to bitmap resetting. Signed-off-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Denis V. Lunev Reviewed-by: Max Reitz Reviewed-by: John Snow --- tests/test-hbitmap.c | 19

[Qemu-block] [PATCH 06/25] block/dirty-bitmap: add deserialize_ones func

2017-05-30 Thread Vladimir Sementsov-Ogievskiy
Add bdrv_dirty_bitmap_deserialize_ones() function, which is needed for qcow2 bitmap loading, to handle unallocated bitmap parts, marked as all-ones. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Kevin Wolf Reviewed-by: John Snow

[Qemu-block] [PATCH 07/25] qcow2-refcount: rename inc_refcounts() and make it public

2017-05-30 Thread Vladimir Sementsov-Ogievskiy
This is needed for the following patch, which will introduce refcounts checking for qcow2 bitmaps. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz Reviewed-by: John Snow --- block/qcow2-refcount.c | 53

[Qemu-block] [PATCH 08/25] qcow2: add bitmaps extension

2017-05-30 Thread Vladimir Sementsov-Ogievskiy
Add bitmap extension as specified in docs/specs/qcow2.txt. For now, just mirror extension header into Qcow2 state and check constraints. Also, calculate refcounts for qcow2 bitmaps, to not break qemu-img check. For now, disable image resize if it has bitmaps. It will be fixed later.

Re: [Qemu-block] [Qemu-devel] [PATCH v7 19/20] qcow2: report encryption specific image information

2017-05-30 Thread Daniel P. Berrange
On Mon, May 29, 2017 at 11:53:01AM +0200, Markus Armbruster wrote: > "Daniel P. Berrange" writes: > > > On Thu, May 25, 2017 at 02:52:30PM -0500, Eric Blake wrote: > >> On 05/25/2017 11:38 AM, Daniel P. Berrange wrote: > >> > Currently 'qemu-img info' reports a simple

Re: [Qemu-block] [PATCH 25/25] block: release persistent bitmaps on inactivate

2017-05-30 Thread Vladimir Sementsov-Ogievskiy
29.05.2017 20:54, Max Reitz wrote: On 2017-05-03 14:25, Vladimir Sementsov-Ogievskiy wrote: We should release them here to reload on invalidate cache. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block.c | 4 block/dirty-bitmap.c

Re: [Qemu-block] [PATCH 09/25] block/dirty-bitmap: add readonly field to BdrvDirtyBitmap

2017-05-30 Thread Vladimir Sementsov-Ogievskiy
30.05.2017 09:50, Vladimir Sementsov-Ogievskiy wrote: Thank you for this scenario. Hmm. So, as I need guarantee that image and bitmap are unchanged, bdrv_set_dirty should return error and fail the whole write. Ok? No, bad idea. As bdrv_set_dirty is called after write completed. 29.05.2017

[Qemu-block] [PATCH 03/25] hbitmap: improve dirty iter

2017-05-30 Thread Vladimir Sementsov-Ogievskiy
Make dirty iter resistant to resetting bits in corresponding HBitmap. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz Reviewed-by: John Snow --- include/qemu/hbitmap.h | 26 --

Re: [Qemu-block] [PATCH 09/25] block/dirty-bitmap: add readonly field to BdrvDirtyBitmap

2017-05-30 Thread Vladimir Sementsov-Ogievskiy
30.05.2017 10:31, Vladimir Sementsov-Ogievskiy wrote: 30.05.2017 09:50, Vladimir Sementsov-Ogievskiy wrote: Thank you for this scenario. Hmm. So, as I need guarantee that image and bitmap are unchanged, bdrv_set_dirty should return error and fail the whole write. Ok? No, bad idea. As

[Qemu-block] [PATCH 17/25] qcow2: add .bdrv_can_store_new_dirty_bitmap

2017-05-30 Thread Vladimir Sementsov-Ogievskiy
Realize .bdrv_can_store_new_dirty_bitmap interface. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: John Snow Reviewed-by: Max Reitz --- block/qcow2-bitmap.c | 51 +++

[Qemu-block] [PATCH 21/25] iotests: test qcow2 persistent dirty bitmap

2017-05-30 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- tests/qemu-iotests/165 | 105 + tests/qemu-iotests/165.out | 5 +++ tests/qemu-iotests/group | 1 + 3 files changed, 111

[Qemu-block] [PATCH 09/25] block/dirty-bitmap: add readonly field to BdrvDirtyBitmap

2017-05-30 Thread Vladimir Sementsov-Ogievskiy
It will be needed in following commits for persistent bitmaps. If bitmap is loaded from read-only storage (and we can't mark it "in use" in this storage) corresponding BdrvDirtyBitmap should be read-only. Signed-off-by: Vladimir Sementsov-Ogievskiy ---

[Qemu-block] [PATCH 24/25] qmp: block-dirty-bitmap-remove: remove persistent

2017-05-30 Thread Vladimir Sementsov-Ogievskiy
Remove persistent bitmap from the storage on block-dirty-bitmap-remove. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz Reviewed-by: John Snow --- blockdev.c | 10 ++ qapi/block-core.json | 3

[Qemu-block] [PATCH 20/25] qmp: add x-debug-block-dirty-bitmap-sha256

2017-05-30 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz Reviewed-by: John Snow --- block/dirty-bitmap.c | 5 + blockdev.c | 29 + include/block/dirty-bitmap.h |

[Qemu-block] [PATCH 12/25] block: bdrv_close: release bitmaps after drv->bdrv_close

2017-05-30 Thread Vladimir Sementsov-Ogievskiy
Release bitmaps after 'if (bs->drv) { ... }' block. This will allow format driver to save persistent bitmaps, which will appear in following commits. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- block.c | 6 +++--- 1 file

[Qemu-block] [PATCH 02/25] specs/qcow2: do not use wording 'bitmap header'

2017-05-30 Thread Vladimir Sementsov-Ogievskiy
A bitmap directory entry is sometimes called a 'bitmap header'. This patch leaves only one name - 'bitmap directory entry'. The name 'bitmap header' creates misunderstandings with 'qcow2 header' and 'qcow2 bitmap header extension' (which is extension of qcow2 header) Signed-off-by: Vladimir

Re: [Qemu-block] [PULL 00/12] Block patches

2017-05-30 Thread Stefan Hajnoczi
On Fri, May 26, 2017 at 03:23:52PM -0400, Jeff Cody wrote: > The following changes since commit 9964e96dccf7f7c936ee854a795415d19b60: > > Merge remote-tracking branch 'jasowang/tags/net-pull-request' into staging > (2017-05-23 15:01:31 +0100) > > are available in the git repository at: >

[Qemu-block] [PATCH v19 00/25] qcow2: persistent dirty bitmaps

2017-05-30 Thread Vladimir Sementsov-Ogievskiy
Hi all! There is a new update of qcow2-bitmap series - v19. web: https://src.openvz.org/users/vsementsov/repos/qemu/browse?at=qcow2-bitmap-v19 git: https://src.openvz.org/scm/~vsementsov/qemu.git (tag qcow2-bitmap-v19) v19: rebased on master 05: move 'sign-off' over 'reviewed-by's 08:

[Qemu-block] [PATCH 11/25] block/dirty-bitmap: add autoload field to BdrvDirtyBitmap

2017-05-30 Thread Vladimir Sementsov-Ogievskiy
Mirror AUTO flag from Qcow2 bitmap in BdrvDirtyBitmap. This will be needed in future, to save this flag back to Qcow2 for persistent bitmaps. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz Reviewed-by: John Snow

[Qemu-block] [PATCH 10/25] qcow2: autoloading dirty bitmaps

2017-05-30 Thread Vladimir Sementsov-Ogievskiy
Auto loading bitmaps are bitmaps in Qcow2, with the AUTO flag set. They are loaded when the image is opened and become BdrvDirtyBitmaps for the corresponding drive. Extra data in bitmaps is not supported for now. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by:

[Qemu-block] [PATCH 18/25] qmp: add persistent flag to block-dirty-bitmap-add

2017-05-30 Thread Vladimir Sementsov-Ogievskiy
Add optional 'persistent' flag to qmp command block-dirty-bitmap-add. Default is false. Signed-off-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Denis V. Lunev Reviewed-by: Max Reitz Reviewed-by: John Snow ---

[Qemu-block] [PATCH 13/25] block: introduce persistent dirty bitmaps

2017-05-30 Thread Vladimir Sementsov-Ogievskiy
New field BdrvDirtyBitmap.persistent means, that bitmap should be saved by format driver in .bdrv_close and .bdrv_inactivate. No format driver supports it for now. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz ---

[Qemu-block] [PATCH 19/25] qmp: add autoload parameter to block-dirty-bitmap-add

2017-05-30 Thread Vladimir Sementsov-Ogievskiy
Optional. Default is false. Signed-off-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Denis V. Lunev Reviewed-by: Max Reitz Reviewed-by: John Snow --- blockdev.c | 18 --

[Qemu-block] [PATCH 22/25] block/dirty-bitmap: add bdrv_remove_persistent_dirty_bitmap

2017-05-30 Thread Vladimir Sementsov-Ogievskiy
Interface for removing persistent bitmap from its storage. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz Reviewed-by: John Snow --- block/dirty-bitmap.c | 18 ++

[Qemu-block] [PATCH 14/25] block/dirty-bitmap: add bdrv_dirty_bitmap_next()

2017-05-30 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz Reviewed-by: John Snow --- block/dirty-bitmap.c | 7 +++ include/block/dirty-bitmap.h | 3 +++ 2 files changed, 10 insertions(+) diff --git

Re: [Qemu-block] Throttling groups vs filter nodes

2017-05-30 Thread Kevin Wolf
[ Cc: qemu-block - noticed only now that it's missing ] Am 29.05.2017 um 22:57 hat Manos Pitsidianakis geschrieben: > On Mon, May 29, 2017 at 05:05:17PM +0200, Alberto Garcia wrote: > >On Sat 27 May 2017 09:56:03 AM CEST, Stefan Hajnoczi wrote: > >>A quirk in the current implementation is that

Re: [Qemu-block] [Qemu-devel] [PATCH 0/4] qemu-img check: format allocation info

2017-05-30 Thread no-reply
Hi, This series failed build test on s390x host. Please find the details below. Message-id: 20170530103641.68891-1-vsement...@virtuozzo.com Type: series Subject: [Qemu-devel] [PATCH 0/4] qemu-img check: format allocation info === TEST SCRIPT BEGIN === #!/bin/bash # Testing script will be

[Qemu-block] [PATCH 2/4] qcow2: add .bdrv_get_format_alloc_stat

2017-05-30 Thread Vladimir Sementsov-Ogievskiy
Realize .bdrv_get_format_alloc_stat interface. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/qcow2-refcount.c | 144 + block/qcow2.c | 2 + block/qcow2.h | 2 + 3 files changed, 148

[Qemu-block] [PATCH 3/4] qemu-img check: add format allocation info

2017-05-30 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy --- qapi/block-core.json | 6 +- qemu-img.c | 36 2 files changed, 41 insertions(+), 1 deletion(-) diff --git a/qapi/block-core.json b/qapi/block-core.json index

[Qemu-block] [PATCH 4/4] qemu-img check: improve dump_human_format_alloc_info

2017-05-30 Thread Vladimir Sementsov-Ogievskiy
Improve dump_human_format_alloc_info() by specifying format names. Signed-off-by: Vladimir Sementsov-Ogievskiy --- qemu-img.c | 35 ++- 1 file changed, 26 insertions(+), 9 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index

[Qemu-block] [PATCH 1/4] block: add bdrv_get_format_alloc_stat format interface

2017-05-30 Thread Vladimir Sementsov-Ogievskiy
The function should collect statistics, about allocted/unallocated by top-level format driver space (in its .file) and allocation status (allocated/hole/after eof) of corresponding areas in this .file. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block.c

[Qemu-block] [PATCH v2 0/4] qemu-img check: format allocation info

2017-05-30 Thread Vladimir Sementsov-Ogievskiy
Hi all. v2: fix build error, gcc things that some variables may be used uninitialized (actually they didn't). These series is a replacement for "qemu-img check: unallocated size" series. There was a question, should we account allocated clusters in qcow2 but actually holes in underalying

[Qemu-block] [PATCH 4/4] qemu-img check: improve dump_human_format_alloc_info

2017-05-30 Thread Vladimir Sementsov-Ogievskiy
Improve dump_human_format_alloc_info() by specifying format names. Signed-off-by: Vladimir Sementsov-Ogievskiy --- qemu-img.c | 35 ++- 1 file changed, 26 insertions(+), 9 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index

[Qemu-block] [PATCH 2/4] qcow2: add .bdrv_get_format_alloc_stat

2017-05-30 Thread Vladimir Sementsov-Ogievskiy
Realize .bdrv_get_format_alloc_stat interface. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/qcow2-refcount.c | 144 + block/qcow2.c | 2 + block/qcow2.h | 2 + 3 files changed, 148

[Qemu-block] [PATCH 1/4] block: add bdrv_get_format_alloc_stat format interface

2017-05-30 Thread Vladimir Sementsov-Ogievskiy
The function should collect statistics, about allocted/unallocated by top-level format driver space (in its .file) and allocation status (allocated/hole/after eof) of corresponding areas in this .file. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block.c

[Qemu-block] [PATCH 3/4] qemu-img check: add format allocation info

2017-05-30 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy --- qapi/block-core.json | 6 +- qemu-img.c | 36 2 files changed, 41 insertions(+), 1 deletion(-) diff --git a/qapi/block-core.json b/qapi/block-core.json index

[Qemu-block] [PATCH 0/4] qemu-img check: format allocation info

2017-05-30 Thread Vladimir Sementsov-Ogievskiy
Hi all. These series is a replacement for "qemu-img check: unallocated size" series. There was a question, should we account allocated clusters in qcow2 but actually holes in underalying file as allocated or not. Instead of hiding this information in one-number statistic I've decided to print

Re: [Qemu-block] [RFC] Making 'block-stream', and 'block-commit' accept node-name

2017-05-30 Thread Alberto Garcia
On Mon 29 May 2017 09:03:22 PM CEST, Kashyap Chamarthy wrote: > Observe the following ('qmp-shell', for brevity) invocation of the > four major types (stream, commit, mirror, backup) of live block > operations: > > (QEMU) block-stream device=node-D base=a.qcow2 job-id=job-block-stream >

Re: [Qemu-block] [PATCH v2 1/4] block: Fix anonymous BBs in blk_root_inactivate()

2017-05-30 Thread Jeff Cody
On Tue, May 30, 2017 at 05:22:50PM +0200, Kevin Wolf wrote: > blk->name isn't an array, but a pointer that can be NULL. Checking for > an anonymous BB must involve a NULL check first, otherwise we get > crashes. > > Signed-off-by: Kevin Wolf > Reviewed-by: Fam Zheng

Re: [Qemu-block] [PATCH 1/4] block: add bdrv_get_format_alloc_stat format interface

2017-05-30 Thread Vladimir Sementsov-Ogievskiy
30.05.2017 17:53, Eric Blake wrote: On 05/30/2017 05:48 AM, Vladimir Sementsov-Ogievskiy wrote: The function should collect statistics, about allocted/unallocated by top-level format driver space (in its .file) and allocation status (allocated/hole/after eof) of corresponding areas in this

Re: [Qemu-block] [PATCH v2 3/4] migration/block: Clean up BBs in block_save_complete()

2017-05-30 Thread Jeff Cody
On Tue, May 30, 2017 at 05:22:52PM +0200, Kevin Wolf wrote: > We need to release any block migrations BlockBackends on the source > before successfully completing the migration because otherwise > inactivating the images will fail (inactivation only tolerates device > BBs). > > Signed-off-by:

[Qemu-block] [PATCH v2 4/4] qemu-iotests: Block migration test

2017-05-30 Thread Kevin Wolf
Signed-off-by: Kevin Wolf --- tests/qemu-iotests/183 | 143 + tests/qemu-iotests/183.out | 46 +++ tests/qemu-iotests/group | 1 + 3 files changed, 190 insertions(+) create mode 100755 tests/qemu-iotests/183

[Qemu-block] [PATCH v2 3/4] migration/block: Clean up BBs in block_save_complete()

2017-05-30 Thread Kevin Wolf
We need to release any block migrations BlockBackends on the source before successfully completing the migration because otherwise inactivating the images will fail (inactivation only tolerates device BBs). Signed-off-by: Kevin Wolf Reviewed-by: Fam Zheng

[Qemu-block] [PATCH v2 0/4] Block migration (migrate -b) fixes

2017-05-30 Thread Kevin Wolf
v2: - Detect when migrate -b is compiled out [Eric] - Switched the whole test to QMP for this, HMP is a bit hard to deal with Kevin Wolf (4): block: Fix anonymous BBs in blk_root_inactivate() migration: Inactivate images after .save_live_complete_precopy() migration/block: Clean up BBs in

Re: [Qemu-block] [PATCH v2 2/4] migration: Inactivate images after .save_live_complete_precopy()

2017-05-30 Thread Jeff Cody
On Tue, May 30, 2017 at 05:22:51PM +0200, Kevin Wolf wrote: > Block migration may still access the image during its > .save_live_complete_precopy() implementation, so we should only > inactivate the image afterwards. > > Another reason for the change is that inactivating an image fails when >

Re: [Qemu-block] Throttling groups vs filter nodes

2017-05-30 Thread Kevin Wolf
Am 30.05.2017 um 16:29 hat Alberto Garcia geschrieben: > On Sat 27 May 2017 09:56:03 AM CEST, Stefan Hajnoczi wrote: > > Throttling groups allow multiple drives to share the same throttling > > state (i.e. budget) between them. Manos is working on moving the > > throttling code into a block

[Qemu-block] [PATCH] live-block-ops.txt: Rewrite and improve it

2017-05-30 Thread Kashyap Chamarthy
This edition documents all four operations: - `block-stream` - `block-commit` - `drive-mirror` (& `blockdev-mirror`) - `drive-backup` (& `blockdev-backup`) Things considered while writing this document: - Use reStructuredText format. It is gentler on the eye, and can be trivially

[Qemu-block] [PATCH] live-block-ops.txt: Rewrite and improve it

2017-05-30 Thread Kashyap Chamarthy
This edition documents all four operations: - `block-stream` - `block-commit` - `drive-mirror` (& `blockdev-mirror`) - `drive-backup` (& `blockdev-backup`) Things considered while writing this document: - Use reStructuredText format. It is gentler on the eye, and can be trivially

Re: [Qemu-block] [PATCH v3 0/4] block: fix 'savevm' hang with -object iothread

2017-05-30 Thread Stefan Hajnoczi
On Mon, May 22, 2017 at 02:57:00PM +0100, Stefan Hajnoczi wrote: > v3: > * Add missing bdrv_drain_all_end() in error code paths [Kevin] > v2: > * New patch to use bdrv_drain_all_begin/end() in savevm/loadvm [Kevin] >(All other patches unchanged) > > The 'savevm' command hangs when -object

[Qemu-block] [PATCH v2 2/4] migration: Inactivate images after .save_live_complete_precopy()

2017-05-30 Thread Kevin Wolf
Block migration may still access the image during its .save_live_complete_precopy() implementation, so we should only inactivate the image afterwards. Another reason for the change is that inactivating an image fails when there is still a non-device BlockBackend using it, which includes the BBs

[Qemu-block] [PATCH v2 1/4] block: Fix anonymous BBs in blk_root_inactivate()

2017-05-30 Thread Kevin Wolf
blk->name isn't an array, but a pointer that can be NULL. Checking for an anonymous BB must involve a NULL check first, otherwise we get crashes. Signed-off-by: Kevin Wolf Reviewed-by: Fam Zheng Reviewed-by: Juan Quintela Reviewed-by:

Re: [Qemu-block] Throttling groups vs filter nodes

2017-05-30 Thread Alberto Garcia
On Sat 27 May 2017 09:56:03 AM CEST, Stefan Hajnoczi wrote: > Throttling groups allow multiple drives to share the same throttling > state (i.e. budget) between them. Manos is working on moving the > throttling code into a block filter driver so it is no longer > hardcoded into the I/O code path.

Re: [Qemu-block] [PATCH 1/4] block: add bdrv_get_format_alloc_stat format interface

2017-05-30 Thread Eric Blake
On 05/30/2017 05:48 AM, Vladimir Sementsov-Ogievskiy wrote: > The function should collect statistics, about allocted/unallocated by > top-level format driver space (in its .file) and allocation status > (allocated/hole/after eof) of corresponding areas in this .file. > > Signed-off-by: Vladimir

Re: [Qemu-block] [PATCH v2 4/4] qemu-iotests: Block migration test

2017-05-30 Thread Eric Blake
On 05/30/2017 10:22 AM, Kevin Wolf wrote: > Signed-off-by: Kevin Wolf > --- > tests/qemu-iotests/183 | 143 > + > tests/qemu-iotests/183.out | 46 +++ > tests/qemu-iotests/group | 1 + > 3 files changed, 190

Re: [Qemu-block] [PATCH 1/4] block: add bdrv_get_format_alloc_stat format interface

2017-05-30 Thread Eric Blake
On 05/30/2017 10:27 AM, Vladimir Sementsov-Ogievskiy wrote: > 30.05.2017 17:53, Eric Blake wrote: >> On 05/30/2017 05:48 AM, Vladimir Sementsov-Ogievskiy wrote: >>> The function should collect statistics, about allocted/unallocated by >>> top-level format driver space (in its .file) and allocation

Re: [Qemu-block] [PATCH v2 4/4] qemu-iotests: Block migration test

2017-05-30 Thread Kevin Wolf
Am 30.05.2017 um 17:52 hat Jeff Cody geschrieben: > On Tue, May 30, 2017 at 05:22:53PM +0200, Kevin Wolf wrote: > > Signed-off-by: Kevin Wolf > > --- > > tests/qemu-iotests/183 | 143 > > + > > tests/qemu-iotests/183.out | 46

Re: [Qemu-block] [PATCH v2 4/4] qemu-iotests: Block migration test

2017-05-30 Thread Jeff Cody
On Tue, May 30, 2017 at 05:22:53PM +0200, Kevin Wolf wrote: > Signed-off-by: Kevin Wolf > --- > tests/qemu-iotests/183 | 143 > + > tests/qemu-iotests/183.out | 46 +++ > tests/qemu-iotests/group | 1 + > 3 files

Re: [Qemu-block] [PATCH v2 4/4] qemu-iotests: Block migration test

2017-05-30 Thread Jeff Cody
On Tue, May 30, 2017 at 06:57:05PM +0200, Kevin Wolf wrote: > Am 30.05.2017 um 17:52 hat Jeff Cody geschrieben: > > On Tue, May 30, 2017 at 05:22:53PM +0200, Kevin Wolf wrote: > > > Signed-off-by: Kevin Wolf > > > --- > > > tests/qemu-iotests/183 | 143 > > >

Re: [Qemu-block] [Qemu-devel] [PATCH v3 09/16] block/qcow2: Generalize preallocate()

2017-05-30 Thread Eric Blake
On 05/26/2017 11:55 AM, Max Reitz wrote: > This patch adds two new parameters to the preallocate() function so we > will be able to use it not just for preallocating a new image but also > for preallocated image growth. > > The offset parameter allows the caller to specify a virtual offset from >