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

2016-08-17 Thread Fam Zheng
On Tue, 08/16 13:26, Vladimir Sementsov-Ogievskiy wrote: > 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

Re: [Qemu-block] [PATCH] iSCSI: start moving options also for -drive

2016-08-17 Thread Paolo Bonzini
On 17/08/2016 14:13, Pino Toscano wrote: > On Tuesday, 12 April 2016 16:57:42 CEST Pino Toscano wrote: >> to overcome the limitations of the options handling [1], I'm planning >> to move more options for iSCSI also as block options, so it is possible >> to specify them with -drive. >> >> The

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

2016-08-17 Thread Fam Zheng
On Tue, 08/16 13:25, Vladimir Sementsov-Ogievskiy wrote: Patches 5-8, 13, 14, 16, 17: Reviewed-by: Fam Zheng I'll take a closer look at patch 12 and 18 tomorrow. Fam

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

2016-08-17 Thread Vladimir Sementsov-Ogievskiy
On 17.08.2016 14:47, Fam Zheng wrote: On Tue, 08/16 13:25, Vladimir Sementsov-Ogievskiy wrote: Patches 5-8, 13, 14, 16, 17: Reviewed-by: Fam Zheng I'll take a closer look at patch 12 and 18 tomorrow. Fam Thank you! -- Best regards, Vladimir

Re: [Qemu-block] [PATCH] iSCSI: start moving options also for -drive

2016-08-17 Thread Pino Toscano
On Tuesday, 12 April 2016 16:57:42 CEST Pino Toscano wrote: > to overcome the limitations of the options handling [1], I'm planning > to move more options for iSCSI also as block options, so it is possible > to specify them with -drive. > > The only patch in this series is for initiator-target,

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

2016-08-17 Thread Dr. David Alan Gilbert
* Vladimir Sementsov-Ogievskiy (vsement...@virtuozzo.com) wrote: > 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. > >

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

2016-08-17 Thread Dr. David Alan Gilbert
* Vladimir Sementsov-Ogievskiy (vsement...@virtuozzo.com) wrote: > 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 >

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

2016-08-17 Thread Kashyap Chamarthy
On Wed, Aug 17, 2016 at 11:22:55AM +0200, Kevin Wolf wrote: > Am 16.08.2016 um 23:28 hat Kashyap Chamarthy geschrieben: > > Hi, > > > > From the QAPI schema documentation of 'blockdev-mirror': > > > > # @target: the id or node-name of the block device to mirror to. This > >

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

2016-08-17 Thread Vladimir Sementsov-Ogievskiy
On 17.08.2016 15:35, Dr. David Alan Gilbert wrote: * Vladimir Sementsov-Ogievskiy (vsement...@virtuozzo.com) wrote: 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

[Qemu-block] [PATCH v6 3/9] vdi: Use QEMU UUID API

2016-08-17 Thread Fam Zheng
The UUID operations we need from libuuid is fully supported by QEMU UUID implementation. Use it, and remove the unused code. Signed-off-by: Fam Zheng --- block/vdi.c | 73 ++--- 1 file changed, 17 insertions(+), 56

[Qemu-block] [PATCH v6 0/9] UUID clean ups for 2.8

2016-08-17 Thread Fam Zheng
v6: Fix initializer syntax that is disliked by centos6. v5: Add union fields in QemuUUID to help the alignment necessary for bswap, and assert. [Richard] Update the test case initializer syntax accordingly. v4: Use memcpy instead of pointer type cast. [Richard] Keep parameter order

[Qemu-block] [PATCH v6 6/9] tests: No longer dependent on CONFIG_UUID

2016-08-17 Thread Fam Zheng
crypto now uses built-in uuid implementation, so this check is not needed. Signed-off-by: Fam Zheng --- tests/test-crypto-block.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test-crypto-block.c b/tests/test-crypto-block.c index a38110d..1957a86

[Qemu-block] [PATCH 1/2] block: fix deadlock in bdrv_co_flush

2016-08-17 Thread Denis V. Lunev
From: Evgeny Yakovlev The following commit commit 3ff2f67a7c24183fcbcfe1332e5223ac6f96438c Author: Evgeny Yakovlev Date: Mon Jul 18 22:39:52 2016 +0300 block: ignore flush requests when storage is clean has introduced a

[Qemu-block] [PATCH 2/2] block: fix possible reorder of flush operations

2016-08-17 Thread Denis V. Lunev
This patch reduce CPU usage of flush operations a bit. When we have one flush completed we should kick only next operation. We should not start all pending operations in the hope that they will go back to wait on wait_queue. Also there is a technical possibility that requests will get reordered

[Qemu-block] [PATCH for 2.7 0/2] block: fixes for deadlock in flush code

2016-08-17 Thread Denis V. Lunev
We have suffered from the following deadlock Thread 2 (Thread 0x7f1b7edf9700 (LWP 240293)): #0 0x7f1bd1f0675f in ppoll () from /lib64/libc.so.6 #1 0x7f1bd8c1d78b in ppoll (__ss=0x0, __timeout=0x0, __nfds=, __fds=) at /usr/include/bits/poll2.h:77 #2 qemu_poll_ns (fds=, nfds=,

[Qemu-block] [PATCH v6 7/9] configure: Remove detection code for UUID

2016-08-17 Thread Fam Zheng
All code now uses built-in UUID implementation. Remove the code of libuuid and make --enable-uuid and --disable-uuid only print a message. Signed-off-by: Fam Zheng --- configure | 43 --- 1 file changed, 4 insertions(+), 39 deletions(-)

[Qemu-block] [PATCH v6 8/9] vl: Switch qemu_uuid to QemuUUID

2016-08-17 Thread Fam Zheng
Update all qemu_uuid users as well, especially get rid of the duplicated low level g_strdup_printf, sscanf and snprintf calls with QEMU UUID API. Since qemu_uuid_parse is quite tangled with qemu_uuid, it's switching to QemuUUID is done here too to keep everything in sync and avoid code churn.

[Qemu-block] [PATCH v6 9/9] tests: Add uuid tests

2016-08-17 Thread Fam Zheng
Signed-off-by: Fam Zheng --- tests/Makefile.include | 2 + tests/test-uuid.c | 173 + 2 files changed, 175 insertions(+) create mode 100644 tests/test-uuid.c diff --git a/tests/Makefile.include b/tests/Makefile.include

[Qemu-block] [PATCH v6 2/9] vhdx: Use QEMU UUID API

2016-08-17 Thread Fam Zheng
This removes our dependency to libuuid, so that the driver can always be built. Similar to how we handled data plane configure options, --enable-vhdx and --disable-vhdx are also changed to a nop with a message saying it's obsolete. Signed-off-by: Fam Zheng ---

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

2016-08-17 Thread Kevin Wolf
Am 16.08.2016 um 16:02 hat Kevin Wolf geschrieben: > 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:

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

2016-08-17 Thread Stefan Hajnoczi
On Wed, Aug 17, 2016 at 03:20:30PM +0800, Fam Zheng wrote: > v3: Fix typo in copyright header. [Max] > Fix pre-existing type casting. [Max] > > 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

[Qemu-block] [PATCH v6 1/9] util: Add UUID API

2016-08-17 Thread Fam Zheng
A number of different places across the code base use CONFIG_UUID. Some of them are soft dependency, some are not built if libuuid is not available, some come with dummy fallback, some throws runtime error. It is hard to maintain, and hard to reason for users. Since UUID is a simple standard

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

2016-08-17 Thread Stefan Hajnoczi
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. > >

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

2016-08-17 Thread Fam Zheng
On Tue, 08/16 13:26, Vladimir Sementsov-Ogievskiy wrote: > bool migrate_use_events(void) > { > MigrationState *s; > diff --git a/qapi-schema.json b/qapi-schema.json > index 5658723..6386fbc 100644 > --- a/qapi-schema.json > +++ b/qapi-schema.json > @@ -553,11 +553,13 @@ > # been

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

2016-08-17 Thread Fam Zheng
v3: Fix typo in copyright header. [Max] Fix pre-existing type casting. [Max] 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:

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

2016-08-17 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 +++

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

2016-08-17 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

[Qemu-block] [PATCH v6 4/9] vpc: Use QEMU UUID API

2016-08-17 Thread Fam Zheng
Previously we conditionally generated footer->uuid, when libuuid was available. Now that we have a built-in implementation, we can switch to it. Signed-off-by: Fam Zheng --- block/vpc.c | 10 +++--- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/block/vpc.c

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

2016-08-17 Thread Stefan Hajnoczi
On Wed, Aug 17, 2016 at 03:20:33PM +0800, Fam Zheng wrote: > +#include "qemu/osdep.h" > +#include "qemu-common.h" > +#include "dmg.h" > +#include ... > diff --git a/block/dmg.h b/block/dmg.h > new file mode 100644 > index 000..b592d6f > --- /dev/null > +++ b/block/dmg.h ... > +#include

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

2016-08-17 Thread Fam Zheng
On Tue, 08/16 13:26, Vladimir Sementsov-Ogievskiy wrote: > 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:

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

2016-08-17 Thread Fam Zheng
On Tue, 08/16 13:26, Vladimir Sementsov-Ogievskiy wrote: > 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. Does this mean if a real user doesn't specify

[Qemu-block] [PATCH v6 5/9] crypto: Switch to QEMU UUID API

2016-08-17 Thread Fam Zheng
The uuid generation doesn't return error, so update the function signature and calling code accordingly. Signed-off-by: Fam Zheng --- crypto/block-luks.c | 26 +++--- 1 file changed, 7 insertions(+), 19 deletions(-) diff --git a/crypto/block-luks.c

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

2016-08-17 Thread Kevin Wolf
Am 16.08.2016 um 23:28 hat Kashyap Chamarthy geschrieben: > 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