Re: [Qemu-block] [Qemu-devel] [PATCH COLO-Frame v12 25/38] qmp event: Add event notification for COLO error

2015-12-22 Thread Hailiang Zhang
On 2015/12/22 5:14, John Snow wrote: On 12/19/2015 05:02 AM, Markus Armbruster wrote: Copying qemu-block because this seems related to generalising block jobs to background jobs. zhanghailiang writes: If some errors happen during VM's COLO FT stage, it's

Re: [Qemu-block] [Qemu-devel] [PATCH COLO-Frame v12 25/38] qmp event: Add event notification for COLO error

2015-12-22 Thread Hailiang Zhang
On 2015/12/19 18:02, Markus Armbruster wrote: Copying qemu-block because this seems related to generalising block jobs to background jobs. Er, this event just used to help users to know what happened to VM with COLO FT on. If users get this event, they can make further check what's wrong, and

Re: [Qemu-block] [Qemu-devel] [Patch v12 00/10] Block replication for continuous checkpoints

2015-12-01 Thread Hailiang Zhang
On 2015/12/1 18:40, Dr. David Alan Gilbert wrote: * Wen Congyang (we...@cn.fujitsu.com) wrote: Block replication is a very important feature which is used for continuous checkpoints(for example: COLO). You can get the detailed information about block replication from here:

Re: [Qemu-block] [PATCH v14 0/8] Block replication for continuous checkpoints

2016-01-19 Thread Hailiang Zhang
ping... It seems that there is no feedback for a long time, we hope COLO prototype could be merged in QEMU 2.6, it depends on this series, so please help us. Thanks. zhanghailiang On 2016/1/14 9:12, Changlong Xie wrote: It seems i missed someone in CC list, add them. Thanks -Xie On

Re: [Qemu-block] [PATCH v15 7/9] Introduce new APIs to do replication operation

2016-02-14 Thread Hailiang Zhang
On 2016/2/5 12:18, Changlong Xie wrote: Signed-off-by: Wen Congyang Signed-off-by: zhanghailiang Signed-off-by: Gonglei Signed-off-by: Changlong Xie --- Makefile.objs| 1 +

Re: [Qemu-block] [PATCH v15 0/9] Block replication for continuous checkpoints

2016-02-17 Thread Hailiang Zhang
ping... COLO prototype is based on this series, but it seems that this series didn't got enough reviewing and feedback, we will miss the train of qemu 2.6 version :( Since COLO is still a prototype, some problems could be fixed in later developing, and we hope COLO prototype to be merged as

Re: [Qemu-block] [PATCH v15 7/9] Introduce new APIs to do replication operation

2016-02-19 Thread Hailiang Zhang
Hi, On 2016/2/15 9:13, Wen Congyang wrote: On 02/15/2016 08:57 AM, Hailiang Zhang wrote: On 2016/2/5 12:18, Changlong Xie wrote: Signed-off-by: Wen Congyang <we...@cn.fujitsu.com> Signed-off-by: zhanghailiang <zhang.zhanghaili...@huawei.com> Signed-off-by: Gonglei <arei.gon

Re: [Qemu-block] [Qemu-devel] [PATCH v18 0/8] Block replication for continuous checkpoints

2016-05-05 Thread Hailiang Zhang
ping^2 ... Sorry for the noise, but this series is the prerequisite of COLO and it got no feedback for almost three weeks ... On 2016/4/15 16:10, Changlong Xie wrote: Block replication is a very important feature which is used for continuous checkpoints(for example: COLO). You can get the

[Qemu-block] [Block Replication] Question about supporting COLO in libvirt

2017-02-06 Thread Hailiang Zhang
Hi, I'm trying to implement supporting COLO in libvirt, But i found an annoying problem that libvirt does not support the command line option argument syntax we used for block replication in QEMU. That is libvirt does not support the bellow syntax for block: -drive

Re: [Qemu-block] [libvirt] [Block Replication] Question about supporting COLO in libvirt

2017-02-08 Thread Hailiang Zhang
On 2017/2/6 20:39, Daniel P. Berrange wrote: On Mon, Feb 06, 2017 at 08:34:28PM +0800, Hailiang Zhang wrote: Hi, I'm trying to implement supporting COLO in libvirt, But i found an annoying problem that libvirt does not support the command line option argument syntax we used for block

Re: [Qemu-block] [PATCH] migration: re-active images while migration been canceled after inactive them

2017-01-23 Thread Hailiang Zhang
On 2017/1/23 21:40, Dr. David Alan Gilbert wrote: * zhanghailiang (zhang.zhanghaili...@huawei.com) wrote: commit fe904ea8242cbae2d7e69c052c754b8f5f1ba1d6 fixed a case which migration aborted QEMU because it didn't regain the control of images while some errors happened. Actually, there are

Re: [Qemu-block] [PATCH v3 0/6] COLO block replication supports shared disk case

2017-02-23 Thread Hailiang Zhang
ping ... ? On 2017/1/20 11:47, zhanghailiang wrote: COLO block replication doesn't support the shared disk case, Here we try to implement it and this is the third version. Last posted series patches: https://lists.gnu.org/archive/html/qemu-block/2016-12/msg00039.html You can refer to the above

Re: [Qemu-block] [PATCH RFC v2 4/6] replication: fix code logic with the new shared_disk option

2017-01-17 Thread Hailiang Zhang
On 2016/12/20 20:42, Changlong Xie wrote: On 12/05/2016 04:35 PM, zhanghailiang wrote: Some code logic only be needed in non-shared disk, here we adjust these codes to prepare for shared disk scenario. Signed-off-by: zhanghailiang --- block/replication.c |

Re: [Qemu-block] [PATCH RFC v2 2/6] replication: add shared-disk and shared-disk-id options

2017-01-17 Thread Hailiang Zhang
On 2017/1/17 19:25, Stefan Hajnoczi wrote: On Mon, Dec 05, 2016 at 04:35:00PM +0800, zhanghailiang wrote: @@ -85,6 +99,9 @@ static int replication_open(BlockDriverState *bs, QDict *options, QemuOpts *opts = NULL; const char *mode; const char *top_id; +const char

Re: [Qemu-block] [PATCH RFC v2 5/6] replication: Implement block replication for shared disk case

2017-01-17 Thread Hailiang Zhang
Hi Stefan, On 2017/1/17 21:19, Stefan Hajnoczi wrote: On Mon, Dec 05, 2016 at 04:35:03PM +0800, zhanghailiang wrote: @@ -663,8 +695,12 @@ static void replication_stop(ReplicationState *rs, bool failover, Error **errp) switch (s->mode) { case REPLICATION_MODE_PRIMARY: -

Re: [Qemu-block] [Qemu-devel] [PATCH RFC v2 2/6] replication: add shared-disk and shared-disk-id options

2017-01-17 Thread Hailiang Zhang
On 2016/12/6 0:22, Eric Blake wrote: On 12/05/2016 02:35 AM, zhanghailiang wrote: We use these two options to identify which disk is shared Signed-off-by: zhanghailiang Signed-off-by: Wen Congyang Signed-off-by: Zhang Chen

Re: [Qemu-block] [PATCH RFC v2 1/6] docs/block-replication: Add description for shared-disk case

2017-01-18 Thread Hailiang Zhang
On 2017/1/13 21:41, Stefan Hajnoczi wrote: On Mon, Dec 05, 2016 at 04:34:59PM +0800, zhanghailiang wrote: +Issue qmp command: + { 'execute': 'blockdev-add', +'arguments': { +'driver': 'replication', +'node-name': 'rep', +'mode': 'primary', +'shared-disk-id':

Re: [Qemu-block] [PATCH RFC 1/7] docs/block-replication: Add description for shared-disk case

2016-11-27 Thread Hailiang Zhang
On 2016/11/28 14:00, Changlong Xie wrote: On 11/28/2016 01:13 PM, Hailiang Zhang wrote: On 2016/10/25 17:03, Changlong Xie wrote: On 10/20/2016 09:57 PM, zhanghailiang wrote: Introuduce the scenario of shared-disk block replication and how to use it. Signed-off-by: zhanghailiang

Re: [Qemu-block] [PATCH RFC 1/7] docs/block-replication: Add description for shared-disk case

2016-11-27 Thread Hailiang Zhang
On 2016/10/25 17:03, Changlong Xie wrote: On 10/20/2016 09:57 PM, zhanghailiang wrote: Introuduce the scenario of shared-disk block replication and how to use it. Signed-off-by: zhanghailiang Signed-off-by: Wen Congyang Signed-off-by:

Re: [Qemu-block] [PATCH 1/1] migration: fix compiler warning on uninitialized variable

2016-10-31 Thread Hailiang Zhang
On 2016/11/1 5:50, Jeff Cody wrote: Some older GCC versions (e.g. 4.4.7) report a warning on an uninitialized variable for 'request', even though all possible code paths that reference 'request' will be initialized. To appease these versions, initialize the variable to 0. Thanks for

Re: [Qemu-block] [Qemu-devel] [PATCH] migration: re-active images when migration fails to complete

2017-01-10 Thread Hailiang Zhang
ping .. ? Any comments ? Or should I send a for formal patch ? On 2016/12/22 10:56, Hailiang Zhang wrote: On 2016/12/9 4:02, Dr. David Alan Gilbert wrote: * Hailiang Zhang (zhang.zhanghaili...@huawei.com) wrote: Hi, On 2016/12/6 23:24, Dr. David Alan Gilbert wrote: * Kevin Wolf (kw

Re: [Qemu-block] [PATCH RFC 2/7] block-backend: Introduce blk_root() helper

2016-12-04 Thread Hailiang Zhang
On 2016/10/25 17:58, Changlong Xie wrote: I know you need blk->root in the next patch, but we strongly don't recommend your current solution. Please refer Kevin's cf2ab8fc 1409 /* XXX Ugly way to get blk->root, but that's a feature, not a bug. This 1410 * hack makes it obvious that

Re: [Qemu-block] [PATCH RFC 3/7] replication: add shared-disk and shared-disk-id options

2016-12-04 Thread Hailiang Zhang
On 2016/10/25 18:01, Changlong Xie wrote: On 10/20/2016 09:57 PM, zhanghailiang wrote: We use these two options to identify which disk is shared Signed-off-by: zhanghailiang Signed-off-by: Wen Congyang Signed-off-by: Zhang Chen

Re: [Qemu-block] [PATCH RFC 4/7] replication: Split out backup_do_checkpoint() from secondary_do_checkpoint()

2016-12-04 Thread Hailiang Zhang
On 2016/10/26 9:40, Changlong Xie wrote: On 10/20/2016 09:57 PM, zhanghailiang wrote: The helper backup_do_checkpoint() will be used for primary related codes. Here we split it out from secondary_do_checkpoint(). Besides, it is unnecessary to call backup_do_checkpoint() in replication starting

Re: [Qemu-block] [Qemu-devel] [PATCH] migration: re-active images when migration fails to complete

2016-12-27 Thread Hailiang Zhang
On 2016/12/22 10:56, Hailiang Zhang wrote: On 2016/12/9 4:02, Dr. David Alan Gilbert wrote: * Hailiang Zhang (zhang.zhanghaili...@huawei.com) wrote: Hi, On 2016/12/6 23:24, Dr. David Alan Gilbert wrote: * Kevin Wolf (kw...@redhat.com) wrote: Am 19.11.2016 um 12:43 hat zhanghailiang

Re: [Qemu-block] [Qemu-devel] [PATCH] migration: re-active images when migration fails to complete

2016-12-21 Thread Hailiang Zhang
On 2016/12/9 4:02, Dr. David Alan Gilbert wrote: * Hailiang Zhang (zhang.zhanghaili...@huawei.com) wrote: Hi, On 2016/12/6 23:24, Dr. David Alan Gilbert wrote: * Kevin Wolf (kw...@redhat.com) wrote: Am 19.11.2016 um 12:43 hat zhanghailiang geschrieben: commit

Re: [Qemu-block] [Qemu-devel] [PATCH] migration: re-active images when migration fails to complete

2016-12-07 Thread Hailiang Zhang
Hi, On 2016/12/6 23:24, Dr. David Alan Gilbert wrote: * Kevin Wolf (kw...@redhat.com) wrote: Am 19.11.2016 um 12:43 hat zhanghailiang geschrieben: commit fe904ea8242cbae2d7e69c052c754b8f5f1ba1d6 fixed a case which migration aborted QEMU because it didn't regain the control of images while

Re: [Qemu-block] [Qemu-devel] [PATCH v4 2/6] replication: add shared-disk and shared-disk-id options

2017-04-17 Thread Hailiang Zhang
On 2017/4/12 22:28, Eric Blake wrote: On 04/12/2017 09:05 AM, zhanghailiang wrote: We use these two options to identify which disk is shared Signed-off-by: zhanghailiang Signed-off-by: Wen Congyang Signed-off-by: Zhang Chen

Re: [Qemu-block] [Qemu-devel] [QEMU-2.8] Source QEMU crashes with: "bdrv_co_pwritev: Assertion `!(bs->open_flags & BDRV_O_INACTIVE)' failed"

2017-04-22 Thread Hailiang Zhang
Hi, I think the bellow patch can fix your problme. [PATCH 2/4] qmp-cont: invalidate on RUN_STATE_PRELAUNCH https://patchwork.kernel.org/patch/9591885/ Actually, we encounter the same problem in our test, we fix it with the follow patch: From 0e4d6d706afd9909b5fd71536b45c58af60892f8 Mon

Re: [Qemu-block] [PATCH v3 5/6] replication: Implement block replication for shared disk case

2017-03-07 Thread Hailiang Zhang
Hi Stefan, Sorry for the delayed reply. On 2017/2/28 1:37, Stefan Hajnoczi wrote: On Fri, Jan 20, 2017 at 11:47:59AM +0800, zhanghailiang wrote: Just as the scenario of non-shared disk block replication, we are going to implement block replication from many basic blocks that are already in

Re: [Qemu-block] [Qemu-devel] [PULL 2/8] replication: clarify permissions

2017-04-17 Thread Hailiang Zhang
On 2017/4/18 9:23, Eric Blake wrote: On 03/17/2017 08:15 AM, Kevin Wolf wrote: From: Changlong Xie Even if hidden_disk, secondary_disk are backing files, they all need write permissions in replication scenario. Otherwise we will encouter below exceptions on

Re: [Qemu-block] [Qemu-devel] [QEMU-2.8] Source QEMU crashes with: "bdrv_co_pwritev: Assertion `!(bs->open_flags & BDRV_O_INACTIVE)' failed"

2017-04-25 Thread Hailiang Zhang
On 2017/4/24 15:59, Kashyap Chamarthy wrote: On Sat, Apr 22, 2017 at 05:23:49PM +0800, Hailiang Zhang wrote: Hi, Hi Hailiang, I think the bellow patch can fix your problme. [PATCH 2/4] qmp-cont: invalidate on RUN_STATE_PRELAUNCH https://patchwork.kernel.org/patch/9591885/ Hmm, the above

Re: [Qemu-block] [PATCH v4 0/6] COLO block replication supports shared disk case

2017-05-12 Thread Hailiang Zhang
On 2017/5/12 3:17, Stefan Hajnoczi wrote: On Wed, Apr 12, 2017 at 10:05:15PM +0800, zhanghailiang wrote: COLO block replication doesn't support the shared disk case, Here we try to implement it and this is the 4th version. Please review and any commits are welcomed. Cc: Dr. David Alan Gilbert

Re: [Qemu-block] [PATCH v4 2/6] replication: add shared-disk and shared-disk-id options

2017-05-12 Thread Hailiang Zhang
On 2017/4/18 13:59, Xie Changlong wrote: On 04/12/2017 10:05 PM, zhanghailiang wrote: We use these two options to identify which disk is shared Signed-off-by: zhanghailiang Signed-off-by: Wen Congyang Signed-off-by: Zhang Chen

Re: [Qemu-block] [Qemu-devel] [PATCH v4 5/6] replication: Implement block replication for shared disk case

2017-05-12 Thread Hailiang Zhang
On 2017/5/12 3:15, Stefan Hajnoczi wrote: On Wed, Apr 12, 2017 at 10:05:20PM +0800, zhanghailiang wrote: @@ -612,6 +644,16 @@ static void replication_do_checkpoint(ReplicationState *rs, Error **errp) error_propagate(errp, local_err); break; } +

Re: [Qemu-block] [PATCH v4 2/6] replication: add shared-disk and shared-disk-id options

2017-05-12 Thread Hailiang Zhang
On 2017/5/12 3:08, Stefan Hajnoczi wrote: On Wed, Apr 12, 2017 at 10:05:17PM +0800, zhanghailiang wrote: We use these two options to identify which disk is shared Signed-off-by: zhanghailiang Signed-off-by: Wen Congyang Signed-off-by: