[Qemu-block] 'drive-mirror' vs. 'blockdev-mirror' semantics

2016-08-16 Thread Kashyap Chamarthy
Hi, >From the QAPI schema documentation of 'blockdev-mirror': # @target: the id or node-name of the block device to mirror to. This mustn't be attached to guest. Why must the target, prepared by 'blockdev-add', be not attached to the guest? (Side question: is this via 'device_add

Re: [Qemu-block] [PATCH] block jobs: Improve error message for missing job ID

2016-08-16 Thread Alberto Garcia
On Tue 16 Aug 2016 04:02:10 PM CEST, Kevin Wolf wrote: > If a block job is started with a node name rather than a device name and > no explicit job ID is passed, it was reported that '' isn't a "it was" ? > well-formed ID. Which is correct, but we can make the message a little > bit nicer. > > Si

Re: [Qemu-block] [PATCH] block jobs: Improve error message for missing job ID

2016-08-16 Thread Jeff Cody
On Tue, Aug 16, 2016 at 04:02:10PM +0200, Kevin Wolf wrote: > If a block job is started with a node name rather than a device name and > no explicit job ID is passed, it was reported that '' isn't a > well-formed ID. Which is correct, but we can make the message a little > bit nicer. > > Signed-of

Re: [Qemu-block] [PATCH v2] iotest 055: refactor and speed up

2016-08-16 Thread Pavel Butsykin
On 09.08.2016 16:15, Vladimir Sementsov-Ogievskiy wrote: Source disk is created and filled with test data before each test case. Instead initialize it once for the whole unit. Test disk filling patterns are merged into one pattern. Also TestSetSpeed used different image_len for source and targe

[Qemu-block] [PATCH] block jobs: Improve error message for missing job ID

2016-08-16 Thread Kevin Wolf
If a block job is started with a node name rather than a device name and no explicit job ID is passed, it was reported that '' isn't a well-formed ID. Which is correct, but we can make the message a little bit nicer. Signed-off-by: Kevin Wolf --- blockjob.c | 4 1 file changed, 4 insertions

Re: [Qemu-block] [Qemu-devel] [PATCH v24 01/12] unblock backup operations in backing file

2016-08-16 Thread Kashyap Chamarthy
[I erroneously gave a Tested-by to the next patch (02/12) in this series, instead of this one.] On Wed, Jul 27, 2016 at 03:01:42PM +0800, Changlong Xie wrote: > From: Wen Congyang > > Signed-off-by: Wen Congyang > Signed-off-by: Changlong Xie > Signed-off-by: Wang WeiWei > --- > block.c | 17

Re: [Qemu-block] [Qemu-devel] [PATCH v24 02/12] Backup: clear all bitmap when doing block checkpoint

2016-08-16 Thread Kashyap Chamarthy
On Tue, Aug 16, 2016 at 02:55:41PM +0200, Kashyap Chamarthy wrote: > On Wed, Jul 27, 2016 at 03:01:43PM +0800, Changlong Xie wrote: > > From: Wen Congyang > > > > Signed-off-by: Wen Congyang > > Signed-off-by: Changlong Xie > > Signed-off-by: Wang WeiWei > > Signed-off-by: zhanghailiang > > S

Re: [Qemu-block] [Qemu-devel] [PATCH v24 02/12] Backup: clear all bitmap when doing block checkpoint

2016-08-16 Thread Kashyap Chamarthy
On Wed, Jul 27, 2016 at 03:01:43PM +0800, Changlong Xie wrote: > From: Wen Congyang > > Signed-off-by: Wen Congyang > Signed-off-by: Changlong Xie > Signed-off-by: Wang WeiWei > Signed-off-by: zhanghailiang > Signed-off-by: Gonglei > --- > block/backup.c | 18 +

Re: [Qemu-block] [Qemu-devel] [PATCH v3] qemu-img: change opening method for the output in dd

2016-08-16 Thread Stefan Hajnoczi
On Mon, Aug 15, 2016 at 02:11:49PM +0200, Reda Sallahi wrote: > dd was creating an output image regardless of whether there was one already > created. With this patch we try to open first the output image and resize it > if necessary. > > We also make it mandatory to specify conv=notrunc when the

Re: [Qemu-block] [Qemu-devel] [PATCH 15/18] qapi: add md5 checksum of last dirty bitmap level to query-block

2016-08-16 Thread Daniel P. Berrange
On Tue, Aug 16, 2016 at 11:37:28AM +0100, Daniel P. Berrange wrote: > On Tue, Aug 16, 2016 at 01:26:12PM +0300, Vladimir Sementsov-Ogievskiy wrote: > > Reviewed-by: John Snow > > Signed-off-by: Vladimir Sementsov-Ogievskiy > > --- > > block/dirty-bitmap.c | 1 + > > include/qemu/hbitmap.h | 8

Re: [Qemu-block] [Qemu-devel] [PATCH 15/18] qapi: add md5 checksum of last dirty bitmap level to query-block

2016-08-16 Thread Daniel P. Berrange
On Tue, Aug 16, 2016 at 01:26:12PM +0300, Vladimir Sementsov-Ogievskiy wrote: > Reviewed-by: John Snow > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > block/dirty-bitmap.c | 1 + > include/qemu/hbitmap.h | 8 > qapi/block-core.json | 5 - > util/hbitmap.c | 8 +

[Qemu-block] [PATCH 13/18] iotests: maintain several vms in test

2016-08-16 Thread Vladimir Sementsov-Ogievskiy
The only problem with it is the same qmp socket name (which is vm._monitor_path) for all vms. And because of this second vm couldn't be lauched (vm.launch() fails because of socket is already in use). This patch adds a number of vm into vm._monitor_path Reviewed-by: John Snow Signed-off-by: Vladi

[Qemu-block] [PATCH 05/18] block: add bdrv_next_dirty_bitmap()

2016-08-16 Thread Vladimir Sementsov-Ogievskiy
Like bdrv_next() - bdrv_next_dirty_bitmap() is a function to provide access to private dirty bitmaps list. Reviewed-by: John Snow Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/dirty-bitmap.c | 10 ++ include/block/dirty-bitmap.h | 3 +++ 2 files changed, 13 insertions(

[Qemu-block] [PATCH 03/18] migration: split common postcopy out of ram postcopy

2016-08-16 Thread Vladimir Sementsov-Ogievskiy
Split common postcopy staff from ram postcopy staff. Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/migration/migration.h | 1 + migration/migration.c | 39 +++ migration/postcopy-ram.c | 4 +++- migration/savevm.c| 31 +

[Qemu-block] [PATCH 04/18] migration: introduce postcopy-only pending

2016-08-16 Thread Vladimir Sementsov-Ogievskiy
There would be savevm states (dirty-bitmap) which can migrate only in postcopy stage. The corresponding pending is introduced here. Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/migration/vmstate.h | 5 +++-- include/sysemu/sysemu.h | 5 +++-- migration/block.c | 7 +++

[Qemu-block] [PATCH 12/18] migration: add postcopy migration of dirty bitmaps

2016-08-16 Thread Vladimir Sementsov-Ogievskiy
Postcopy migration of dirty bitmaps. Only named dirty bitmaps, associated with root nodes and non-root named nodes are migrated. If destination qemu is already containing a dirty bitmap with the same name as a migrated bitmap (for the same node), than, if their granularities are the same the migra

[Qemu-block] [PATCH 06/18] block: add bdrv_dirty_bitmap_enable_successor()

2016-08-16 Thread Vladimir Sementsov-Ogievskiy
Enabling bitmap successor is necessary to enable successors of bitmaps being migrated before target vm start. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/dirty-bitmap.c | 5 + include/block/dirty-bitmap.h | 1 + 2 files changed, 6 insertions(+) diff --git a/block/dirty-bit

[Qemu-block] [PATCH 07/18] qapi: add dirty-bitmaps migration capability

2016-08-16 Thread Vladimir Sementsov-Ogievskiy
Reviewed-by: John Snow Reviewed-by: Eric Blake Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/migration/migration.h | 1 + migration/migration.c | 9 + qapi-schema.json | 4 +++- 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/include/migrati

[Qemu-block] [PATCH 10/18] migration/qemu-file: add qemu_put_counted_string()

2016-08-16 Thread Vladimir Sementsov-Ogievskiy
Add function opposite to qemu_get_counted_string. qemu_put_counted_string puts one-byte length of the string (string should not be longer than 255 characters), and then it puts the string, without last zero byte. Reviewed-by: John Snow Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/mig

[Qemu-block] [PATCH 08/18] block/dirty-bitmap: add bdrv_dirty_bitmap_release_successor

2016-08-16 Thread Vladimir Sementsov-Ogievskiy
To just release successor and unfreeze bitmap without any additional work. Signed-off-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Denis V. Lunev --- block/dirty-bitmap.c | 10 ++ include/block/dirty-bitmap.h | 2 ++ 2 files changed, 12 insertions(+) diff --git a/block/dirt

[Qemu-block] [PATCH 14/18] iotests: add add_incoming_migration to VM class

2016-08-16 Thread Vladimir Sementsov-Ogievskiy
Reviewed-by: John Snow Signed-off-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/iotests.py | 6 ++ 1 file changed, 6 insertions(+) diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py index fade81e..37c0f63 100644 --- a/tests/qemu-iotests/iotests.py +++ b/tes

[Qemu-block] [PATCH 09/18] migration: include migrate_dirty_bitmaps in migrate_postcopy

2016-08-16 Thread Vladimir Sementsov-Ogievskiy
Enable postcopy if dirty bitmap migration is endabled. Signed-off-by: Vladimir Sementsov-Ogievskiy --- migration/migration.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/migration/migration.c b/migration/migration.c index 7d56a8e..a3bb518 100644 --- a/migration/migration.c

[Qemu-block] [PATCH 01/18] migration: add has_postcopy savevm handler

2016-08-16 Thread Vladimir Sementsov-Ogievskiy
Now postcopy-able states are recognized by not NULL save_live_complete_postcopy handler. But when we have several different postcopy-able states, it is not convenient. Ram postcopy may be disabled, while some other postcopy enabled, in this case Ram state should behave as it is not postcopy-able.

[Qemu-block] [PATCH 16/18] iotests: add default node-name

2016-08-16 Thread Vladimir Sementsov-Ogievskiy
When testing migration, auto-generated by qemu node-names differs in source and destination qemu and migration fails. After this patch, auto-generated by iotest nodenames will be the same. Signed-off-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/iotests.py | 3 ++- 1 file changed, 2 in

[Qemu-block] [PATCH 11/18] migration: add is_active_iterate handler

2016-08-16 Thread Vladimir Sementsov-Ogievskiy
Only-postcopy savevm states (dirty-bitmap) don't need live iteration, so to disable them and stop transporting empty sections there is a new savevm handler. Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/migration/vmstate.h | 1 + migration/savevm.c | 5 + 2 files changed,

[Qemu-block] [PATCH 18/18] iotests: add dirty bitmap postcopy test

2016-08-16 Thread Vladimir Sementsov-Ogievskiy
Test - start two vms (vm_a, vm_b) - in a - do writes from set A - do writes from set B - fix bitmap md5 - clear bitmap - do writes from set A - start migration - than, in b - wait vm start (postcopy should start) - do writes from set B - check btimap md5 The te

[Qemu-block] [PATCH 00/18] Dirty bitmaps postcopy migration

2016-08-16 Thread Vladimir Sementsov-Ogievskiy
v2: some bugs fixed, iotests a bit changed and merged into one test. based on block-next (https://github.com/XanClic/qemu/commits/block-next) clone: tag postcopy-v2 from https://src.openvz.org/scm/~vsementsov/qemu.git online: https://src.openvz.org/users/vsementsov/repos/qemu/browse?at=refs%2Ftags

[Qemu-block] [PATCH 17/18] iotests: add dirty bitmap migration test 169

2016-08-16 Thread Vladimir Sementsov-Ogievskiy
The test starts two vms (vm_a, vm_b), create dirty bitmap in the first one, do several writes to corresponding device and then migrate vm_a to vm_b with dirty bitmaps. Signed-off-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/169 | 84 ++

[Qemu-block] [PATCH 15/18] qapi: add md5 checksum of last dirty bitmap level to query-block

2016-08-16 Thread Vladimir Sementsov-Ogievskiy
Reviewed-by: John Snow Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/dirty-bitmap.c | 1 + include/qemu/hbitmap.h | 8 qapi/block-core.json | 5 - util/hbitmap.c | 8 4 files changed, 21 insertions(+), 1 deletion(-) diff --git a/block/dirty-bitmap.c b/b

[Qemu-block] [PATCH 02/18] migration: fix ram_save_pending

2016-08-16 Thread Vladimir Sementsov-Ogievskiy
Fill postcopy-able pending only if ram postcopy is enabled. It is necessary because of there will be other postcopy-able states and when ram postcopy is disabled, it should not spoil common postcopy related pending. Signed-off-by: Vladimir Sementsov-Ogievskiy --- migration/ram.c | 8 ++-- 1

Re: [Qemu-block] [PULL 0/5] Block layer patches for 2.7.0-rc3

2016-08-16 Thread Peter Maydell
On 15 August 2016 at 14:57, Kevin Wolf wrote: > The following changes since commit 60ac136102098a70b97ab0c07bc7bf53131c: > > target-arm: Fix warn about implicit conversion (2016-08-12 11:12:24 +0100) > > are available in the git repository at: > > git://repo.or.cz/qemu/kevin.git tags/for-u

Re: [Qemu-block] [Qemu-devel] [PATCH for-2.8 v2 3/3] dmg: Move libbz2 code to dmg-bz2.so

2016-08-16 Thread Fam Zheng
On Tue, 08/16 15:59, Fam Zheng wrote: > diff --git a/block/Makefile.objs b/block/Makefile.objs > index fa4d8b8..141dec5 100644 > --- a/block/Makefile.objs > +++ b/block/Makefile.objs > @@ -40,6 +40,7 @@ gluster.o-libs := $(GLUSTERFS_LIBS) > ssh.o-cflags := $(LIBSSH2_CFLAGS) > ssh.o-libs

[Qemu-block] [PATCH for-2.8 v2 3/3] dmg: Move libbz2 code to dmg-bz2.so

2016-08-16 Thread Fam Zheng
dmg.o was moved to block-obj-m in 5505e8b76 to become a separate module, so that its reference to libbz2, since 6b383c08c, doesn't add an extra library to the main executable. Until recently, commit 06e60f70a (blockdev: Add dynamic module loading for block drivers) moved it back to block-obj-y to

[Qemu-block] [PATCH for-2.8 v2 1/3] scripts: Allow block module to not define BlockDriver

2016-08-16 Thread Fam Zheng
Signed-off-by: Fam Zheng --- scripts/modules/module_block.py | 5 - 1 file changed, 5 deletions(-) diff --git a/scripts/modules/module_block.py b/scripts/modules/module_block.py index db4fb54..7efec00 100644 --- a/scripts/modules/module_block.py +++ b/scripts/modules/module_block.py @@ -56,1

[Qemu-block] [PATCH for-2.8 v2 2/3] module: Don't load the same module if requested multiple times

2016-08-16 Thread Fam Zheng
Use a hash table to keep record of all loaded modules, and return early if the requested module is already loaded. Signed-off-by: Fam Zheng --- util/module.c | 19 +-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/util/module.c b/util/module.c index a5f7fbd..63ef

[Qemu-block] [PATCH for-2.8 v2 0/3] block: Fix libbz2 library dependency regresssion

2016-08-16 Thread Fam Zheng
v2: Rebase on top of Max's block-next tree, which has Colin's patches to dynamically load block modules. Two more tweaks to the module system is added. v1 was submitted as a single patch: https://lists.gnu.org/archive/html/qemu-devel/2016-08/msg00508.html Fam Zheng (3): scripts: Allow