Re: [Qemu-devel] [PATCH v12 3/3] qmp: add monitor command to add/remove a child

2016-03-27 Thread Changlong Xie
On 03/10/2016 10:49 AM, Changlong Xie wrote: From: Wen Congyang The new QMP command name is x-blockdev-change. It's just for adding/removing quorum's child now, and doesn't support all kinds of children, all kinds of operations, nor all block drivers. So it is experimental now.

Re: [Qemu-devel] [PATCH v16 4/8] docs: block replication's description

2016-03-27 Thread Changlong Xie
On 03/11/2016 06:34 PM, Changlong Xie wrote: From: Wen Congyang Signed-off-by: Wen Congyang Signed-off-by: zhanghailiang Signed-off-by: Gonglei Signed-off-by: Changlong Xie --- docs/block-replication.txt | 238 + 1 file changed, 238 insertions

Re: [Qemu-devel] [PATCH v2 04/14] block: Convert block job core to BlockBackend

2016-05-24 Thread Changlong Xie
On 05/24/2016 09:47 PM, Kevin Wolf wrote: +blk = blk_new(); blk_new(errp);

Re: [Qemu-devel] [PATCH v2 13/14] commit: Use BlockBackend for I/O

2016-05-24 Thread Changlong Xie
On 05/24/2016 09:47 PM, Kevin Wolf wrote: +s->base = blk_new(); blk_new(errp); +blk_insert_bs(s->base, base); + +s->top = blk_new(); blk_new(errp);

Re: [Qemu-devel] [PATCH v2 08/14] mirror: Use BlockBackend for I/O

2016-05-24 Thread Changlong Xie
On 05/24/2016 09:47 PM, Kevin Wolf wrote: +s->target = blk_new(); blk_new(errp);

Re: [Qemu-devel] [PATCH v2 12/14] backup: Use BlockBackend for I/O

2016-05-24 Thread Changlong Xie
On 05/24/2016 09:47 PM, Kevin Wolf wrote: +job->target = blk_new(); blk_new(errp);

Re: [Qemu-devel] [PATCH v2 08/14] mirror: Use BlockBackend for I/O

2016-05-24 Thread Changlong Xie
On 05/25/2016 12:01 PM, Eric Blake wrote: On 05/24/2016 09:51 PM, Changlong Xie wrote: On 05/24/2016 09:47 PM, Kevin Wolf wrote: +s->target = blk_new(); blk_new(errp); Depends on Kevin's block/next branch, which currently includes: commit 5d7dd50566a4f9786b95f49448f48fead0bb34d

Re: [Qemu-devel] [PATCH v2 14/14] blockjob: Remove BlockJob.bs

2016-05-24 Thread Changlong Xie
On 05/24/2016 09:47 PM, Kevin Wolf wrote: There is a single remaining user in qemu-img, which can be trivially converted to using BlockJob.blk instead. Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz --- blockjob.c | 1 - include/block/blockjob.h | 1 - qemu-img.c

Re: [Qemu-devel] [PATCH v4 0/1] Introduce "xen-load-devices-state"

2016-05-26 Thread Changlong Xie
On 04/11/2016 11:56 AM, Changlong Xie wrote: Changelog v4: 1. Rebased to the lastest code v3: 1. Addressed on David's commets, fix a bug v2: 1. Rebased to the lastest code 2. Addressed on Eric's comments, fixed coding style Wen Congyang (1): Introduce "xen-load-devices-stat

Re: [Qemu-devel] [PATCH v19 09/10] tests: add unit test case for replication

2016-05-26 Thread Changlong Xie
On 05/20/2016 03:36 PM, Changlong Xie wrote: +static void io_write(BlockDriverState *bs, long pattern, int64_t pattern_count, + int64_t offset, int64_t count, bool expect_failed) +{ +void *pattern_buf; Should initialize as NULL to avoid below warnning: tests/test

Re: [Qemu-devel] [PATCH v19 00/10] Block replication for continuous checkpoints

2016-05-26 Thread Changlong Xie
Ping here : ) Hi fam, do you have time to help reviewing this patchset? Consider of we are in the same time zone what will speed up code reviewing process, any feedback will be appreciated. Thanks -Xie On 05/20/2016 03:36 PM, Changlong Xie wrote: Block replication is a very

Re: [Qemu-devel] [PATCH] docs: Fix a couple of typos in throttle.txt

2016-05-29 Thread Changlong Xie
l-max' is unset then the bucket size is 100. Sorry to brother, why the bucket size is 100 rather than 100 x 60? Thanks -Xie The bucket is initially empty, therefore water can be added until it's full at a rate of 2000 IOPS (the burst rate). Once the bucket is full

[Qemu-devel] [PATCH] iostatus: fix comments for block_job_iostatus_reset

2016-05-30 Thread Changlong Xie
Signed-off-by: Changlong Xie --- include/block/blockjob.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/block/blockjob.h b/include/block/blockjob.h index 86d2807..00ac418 100644 --- a/include/block/blockjob.h +++ b/include/block/blockjob.h @@ -397,7 +397,7 @@ int

Re: [Qemu-devel] [PATCH] docs: Fix a couple of typos in throttle.txt

2016-05-30 Thread Changlong Xie
On 05/30/2016 06:00 PM, Alberto Garcia wrote: On Mon 30 May 2016 08:49:18 AM CEST, Changlong Xie wrote: - Water leaks from the bucket at a rate of 100 IOPS. - Water can be added to the bucket at a rate of 2000 IOPS. - The size of the bucket is 2000 x 60 = 12 - - If '

Re: [Qemu-devel] [Qemu-block] [PATCH v19 08/10] Implement new driver for block replication

2016-05-30 Thread Changlong Xie
On 05/31/2016 02:14 AM, Stefan Hajnoczi wrote: On Fri, May 20, 2016 at 03:36:18PM +0800, Changlong Xie wrote: +/* start backup job now */ +error_setg(&s->blocker, + "block device is in use by internal backup job"); + +top_bs = bdrv_lo

Re: [Qemu-devel] [Qemu-block] [PATCH v19 09/10] tests: add unit test case for replication

2016-05-31 Thread Changlong Xie
On 05/31/2016 01:34 AM, Stefan Hajnoczi wrote: On Fri, May 20, 2016 at 03:36:19PM +0800, Changlong Xie wrote: +/* primary */ +#define P_LOCAL_DISK "/tmp/p_local_disk.XX" +#define P_COMMAND "driver=replication,mode=primary,node-name=xxx,"\ +

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

2016-05-31 Thread Changlong Xie
On 05/31/2016 02:20 AM, Stefan Hajnoczi wrote: On Fri, May 20, 2016 at 03:36:10PM +0800, Changlong Xie 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: http

[Qemu-devel] [PATCH v5 1/1] Introduce "xen-load-devices-state"

2016-06-02 Thread Changlong Xie
1. suspend both primary vm and secondary vm 2. sync the state 3. resume both primary vm and secondary vm In such case, we need to update all devices' state in any time. Signed-off-by: Wen Congyang Signed-off-by: Changlong Xie --- migration/savevm.c | 37

[Qemu-devel] [PATCH v5 0/1] Introduce "xen-load-devices-state"

2016-06-02 Thread Changlong Xie
Changelog v5: 1. Introduce qio channel since 8925839f v4: 1. Rebased to the lastest code v3: 1. Addressed on David's commets, fix a bug v2: 1. Rebased to the lastest code 2. Addressed on Eric's comments, fixed coding style Wen Congyang (1): Introduce "xen-load-devices-state" migration/savevm.

Re: [Qemu-devel] [PATCH v4 1/1] Introduce "xen-load-devices-state"

2016-06-02 Thread Changlong Xie
On 06/02/2016 06:16 PM, Dr. David Alan Gilbert wrote: * Stefano Stabellini (sstabell...@kernel.org) wrote: On Thu, 2 Jun 2016, Stefano Stabellini wrote: On Wed, 1 Jun 2016, Dr. David Alan Gilbert wrote: * Amit Shah (amit.s...@redhat.com) wrote: Dave, can you take a look? Yes, I think I'm ha

Re: [Qemu-devel] [PATCH v5 1/1] Introduce "xen-load-devices-state"

2016-06-02 Thread Changlong Xie
On 06/02/2016 11:14 PM, Anthony PERARD wrote: On Thu, Jun 02, 2016 at 06:36:46PM +0800, Changlong Xie wrote: +void qmp_xen_load_devices_state(const char *filename, Error **errp) +{ +QEMUFile *f; +QIOChannelFile *ioc; +int ret; + +/* Guest must be paused before loading the device

Re: [Qemu-devel] [PATCH v5 1/1] Introduce "xen-load-devices-state"

2016-06-02 Thread Changlong Xie
On 06/02/2016 11:14 PM, Anthony PERARD wrote: On Thu, Jun 02, 2016 at 06:36:46PM +0800, Changlong Xie wrote: +void qmp_xen_load_devices_state(const char *filename, Error **errp) +{ +QEMUFile *f; +QIOChannelFile *ioc; +int ret; + +/* Guest must be paused before loading the device

Re: [Qemu-devel] [PATCH v5 1/1] Introduce "xen-load-devices-state"

2016-06-02 Thread Changlong Xie
On 06/03/2016 09:45 AM, Eric Blake wrote: On 06/02/2016 07:26 PM, Changlong Xie wrote: + +ioc = qio_channel_file_new_path(filename, O_WRONLY | O_CREAT, 0660, errp); This does not look right, it looks like it's going to open the file to write to it. You probably want O_RDONLY, a

Re: [Qemu-devel] [PATCH v5 1/1] Introduce "xen-load-devices-state"

2016-06-02 Thread Changlong Xie
On 06/03/2016 10:13 AM, Changlong Xie wrote: On 06/03/2016 09:45 AM, Eric Blake wrote: On 06/02/2016 07:26 PM, Changlong Xie wrote: + +ioc = qio_channel_file_new_path(filename, O_WRONLY | O_CREAT, 0660, errp); This does not look right, it looks like it's going to open the file to

[Qemu-devel] [PATCH v6 1/1] Introduce "xen-load-devices-state"

2016-06-03 Thread Changlong Xie
1. suspend both primary vm and secondary vm 2. sync the state 3. resume both primary vm and secondary vm In such case, we need to update all devices' state in any time. Signed-off-by: Wen Congyang Signed-off-by: Changlong Xie --- migration/savevm.c | 37

[Qemu-devel] [PATCH v6 0/1] Introduce "xen-load-devices-state"

2016-06-03 Thread Changlong Xie
Changelog v6: 1. Fix channel open flag v5: 1. Introduce qio channel since 8925839f v4: 1. Rebased to the lastest code v3: 1. Addressed on David's commets, fix a bug v2: 1. Rebased to the lastest code 2. Addressed on Eric's comments, fixed coding style Wen Congyang (1): Introduce "xen-load-device

Re: [Qemu-devel] [PATCH v19 08/10] Implement new driver for block replication

2016-06-06 Thread Changlong Xie
On 05/20/2016 03:36 PM, Changlong Xie wrote: + +/* + * Must protect backup target if backup job was stopped/cancelled + * unexpectedly + */ +bdrv_ref(s->hidden_disk->bs); + +backup_start(s->secondary_disk->bs, s->hid

Re: [Qemu-devel] [PATCH v19 08/10] Implement new driver for block replication

2016-06-06 Thread Changlong Xie
On 05/20/2016 03:36 PM, Changlong Xie wrote: +if (!failover) { +/* + * This BDS will be closed, and the job should be completed + * before the BDS is closed, because we will access hidden + * disk, secondary disk in backup_job_completed

[Qemu-devel] [PATCH v20 05/10] docs: block replication's description

2016-06-07 Thread Changlong Xie
From: Wen Congyang Signed-off-by: Wen Congyang Signed-off-by: zhanghailiang Signed-off-by: Gonglei Signed-off-by: Changlong Xie --- docs/block-replication.txt | 239 + 1 file changed, 239 insertions(+) create mode 100644 docs/block

[Qemu-devel] [PATCH v20 01/10] unblock backup operations in backing file

2016-06-07 Thread Changlong Xie
From: Wen Congyang Signed-off-by: Wen Congyang Signed-off-by: Changlong Xie --- block.c | 17 + 1 file changed, 17 insertions(+) diff --git a/block.c b/block.c index 736432f..dcf63f4 100644 --- a/block.c +++ b/block.c @@ -1310,6 +1310,23 @@ void bdrv_set_backing_hd

[Qemu-devel] [PATCH v20 02/10] Backup: clear all bitmap when doing block checkpoint

2016-06-07 Thread Changlong Xie
From: Wen Congyang Signed-off-by: Wen Congyang Signed-off-by: zhanghailiang Signed-off-by: Gonglei Signed-off-by: Changlong Xie --- block/backup.c | 18 ++ include/block/block_backup.h | 3 +++ 2 files changed, 21 insertions(+) create mode 100644 include

[Qemu-devel] [PATCH v20 00/10] Block replication for continuous checkpoints

2016-06-07 Thread Changlong Xie
ror_setg() instead of error_set() 2. Add a new block job API 3. Active disk, hidden disk and nbd target uses the same AioContext 4. Add a testcase to test new hbitmap API V2: 1. Redesign the secondary qemu(use image-fleecing) 2. Use Error objects to return error message 3. Address the comments

[Qemu-devel] [PATCH v20 04/10] Link backup into block core

2016-06-07 Thread Changlong Xie
From: Wen Congyang Some programs that add a dependency on it will use the block layer directly. Signed-off-by: Wen Congyang Signed-off-by: zhanghailiang Signed-off-by: Gonglei Signed-off-by: Changlong Xie Reviewed-by: Stefan Hajnoczi Reviewed-by: Jeff Cody --- block/Makefile.objs | 2

[Qemu-devel] [PATCH v20 03/10] Backup: export interfaces for extra serialization

2016-06-07 Thread Changlong Xie
} ret = bdrv_co_readv(); out: return ret; } Signed-off-by: Changlong Xie Signed-off-by: Wen Congyang --- block/backup.c | 41 ++--- include/block/block_backup.h | 14 ++ 2 files changed, 48 insertions(+), 7 deletions(-)

[Qemu-devel] [PATCH v20 09/10] tests: add unit test case for replication

2016-06-07 Thread Changlong Xie
Signed-off-by: Wen Congyang Signed-off-by: Changlong Xie --- tests/.gitignore | 1 + tests/Makefile | 4 + tests/test-replication.c | 555 +++ 3 files changed, 560 insertions(+) create mode 100644 tests/test-replication.c diff

[Qemu-devel] [PATCH v20 08/10] Implement new driver for block replication

2016-06-07 Thread Changlong Xie
From: Wen Congyang Signed-off-by: Wen Congyang Signed-off-by: zhanghailiang Signed-off-by: Gonglei Signed-off-by: Changlong Xie --- block/Makefile.objs | 1 + block/replication.c | 657 2 files changed, 658 insertions(+) create mode

[Qemu-devel] [PATCH v20 07/10] Introduce new APIs to do replication operation

2016-06-07 Thread Changlong Xie
Signed-off-by: Wen Congyang Signed-off-by: zhanghailiang Signed-off-by: Gonglei Signed-off-by: Changlong Xie --- Makefile.objs| 1 + qapi/block-core.json | 13 replication.c| 105 ++ replication.h| 176

[Qemu-devel] [PATCH v20 06/10] auto complete active commit

2016-06-07 Thread Changlong Xie
From: Wen Congyang Auto complete mirror job in background to prevent from blocking synchronously Signed-off-by: Wen Congyang Signed-off-by: Changlong Xie --- block/mirror.c| 13 + blockdev.c| 2 +- include/block/block_int.h | 3 ++- qemu-img.c

[Qemu-devel] [PATCH v20 10/10] support replication driver in blockdev-add

2016-06-07 Thread Changlong Xie
From: Wen Congyang Signed-off-by: Wen Congyang Signed-off-by: zhanghailiang Signed-off-by: Gonglei Signed-off-by: Changlong Xie Reviewed-by: Eric Blake --- qapi/block-core.json | 20 ++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/qapi/block-core.json b

Re: [Qemu-devel] [PATCH v20 00/10] Block replication for continuous checkpoints

2016-06-12 Thread Changlong Xie
On 06/10/2016 09:22 PM, Michael Tokarev wrote: 08.06.2016 04:11, Changlong Xie wrote: Block replication is a very important feature which is used for continuous checkpoints(for example: COLO). ... I'm not sure I understand why this has been sent to qemu-trivial? :) $HOME/.gitconfig mi

Re: [Qemu-devel] [PATCH v20 07/10] Introduce new APIs to do replication operation

2016-06-12 Thread Changlong Xie
On 06/08/2016 09:41 PM, Eric Blake wrote: On 06/07/2016 07:11 PM, Changlong Xie wrote: Signed-off-by: Wen Congyang Signed-off-by: zhanghailiang Signed-off-by: Gonglei Signed-off-by: Changlong Xie No mention of the API names in the commit message? Grepping 'git log' is easier i

Re: [Qemu-devel] [PATCH v20 00/10] Block replication for continuous checkpoints

2016-06-12 Thread Changlong Xie
On 06/08/2016 09:36 PM, Eric Blake wrote: On 06/07/2016 07:11 PM, Changlong Xie wrote: Block replication is a very important feature which is used for continuous checkpoints(for example: COLO). Side note: Including qemu-trivial in CC: on a patch series at v20 feels wrong. Obviously it is

[Qemu-devel] [PATCH] qom/object: fix comment typo

2016-06-14 Thread Changlong Xie
Signed-off-by: Changlong Xie --- include/qom/object.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/qom/object.h b/include/qom/object.h index 99de539..925c279 100644 --- a/include/qom/object.h +++ b/include/qom/object.h @@ -901,7 +901,7 @@ GSList

[Qemu-devel] [PATCH v20 Resend 02/10] Backup: clear all bitmap when doing block checkpoint

2016-06-14 Thread Changlong Xie
From: Wen Congyang Signed-off-by: Wen Congyang Signed-off-by: zhanghailiang Signed-off-by: Gonglei Signed-off-by: Changlong Xie --- block/backup.c | 18 ++ include/block/block_backup.h | 3 +++ 2 files changed, 21 insertions(+) create mode 100644 include

[Qemu-devel] [PATCH v20 Resend 03/10] Backup: export interfaces for extra serialization

2016-06-14 Thread Changlong Xie
} ret = bdrv_co_readv(); out: return ret; } Signed-off-by: Changlong Xie Signed-off-by: Wen Congyang --- block/backup.c | 41 ++--- include/block/block_backup.h | 14 ++ 2 files changed, 48 insertions(+), 7 deletions(-)

[Qemu-devel] [PATCH v20 Resend 01/10] unblock backup operations in backing file

2016-06-14 Thread Changlong Xie
From: Wen Congyang Signed-off-by: Wen Congyang Signed-off-by: Changlong Xie --- block.c | 17 + 1 file changed, 17 insertions(+) diff --git a/block.c b/block.c index 736432f..dcf63f4 100644 --- a/block.c +++ b/block.c @@ -1310,6 +1310,23 @@ void bdrv_set_backing_hd

[Qemu-devel] [PATCH v20 Resend 00/10] Block replication for continuous checkpoints

2016-06-14 Thread Changlong Xie
d a testcase to test new hbitmap API V2: 1. Redesign the secondary qemu(use image-fleecing) 2. Use Error objects to return error message 3. Address the comments from Max Reitz and Eric Blake Changlong Xie (3): Backup: export interfaces for extra serialization Introduce new APIs to do replicati

[Qemu-devel] [PATCH v20 Resend 06/10] auto complete active commit

2016-06-14 Thread Changlong Xie
From: Wen Congyang Auto complete mirror job in background to prevent from blocking synchronously Signed-off-by: Wen Congyang Signed-off-by: Changlong Xie --- block/mirror.c| 13 + blockdev.c| 2 +- include/block/block_int.h | 3 ++- qemu-img.c

[Qemu-devel] [PATCH v20 Resend 04/10] Link backup into block core

2016-06-14 Thread Changlong Xie
From: Wen Congyang Some programs that add a dependency on it will use the block layer directly. Signed-off-by: Wen Congyang Signed-off-by: zhanghailiang Signed-off-by: Gonglei Signed-off-by: Changlong Xie Reviewed-by: Stefan Hajnoczi Reviewed-by: Jeff Cody --- block/Makefile.objs | 2

[Qemu-devel] [PATCH v20 Resend 10/10] support replication driver in blockdev-add

2016-06-14 Thread Changlong Xie
From: Wen Congyang Signed-off-by: Wen Congyang Signed-off-by: zhanghailiang Signed-off-by: Gonglei Signed-off-by: Changlong Xie Reviewed-by: Eric Blake --- qapi/block-core.json | 20 ++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/qapi/block-core.json b

[Qemu-devel] [PATCH v20 Resend 05/10] docs: block replication's description

2016-06-14 Thread Changlong Xie
From: Wen Congyang Signed-off-by: Wen Congyang Signed-off-by: zhanghailiang Signed-off-by: Gonglei Signed-off-by: Changlong Xie --- docs/block-replication.txt | 239 + 1 file changed, 239 insertions(+) create mode 100644 docs/block

[Qemu-devel] [PATCH v20 Resend 08/10] Implement new driver for block replication

2016-06-14 Thread Changlong Xie
From: Wen Congyang Signed-off-by: Wen Congyang Signed-off-by: zhanghailiang Signed-off-by: Gonglei Signed-off-by: Changlong Xie --- block/Makefile.objs | 1 + block/replication.c | 657 2 files changed, 658 insertions(+) create mode

[Qemu-devel] [PATCH v20 Resend 07/10] Introduce new APIs to do replication operation

2016-06-14 Thread Changlong Xie
please refer to replication.h Signed-off-by: Wen Congyang Signed-off-by: zhanghailiang Signed-off-by: Gonglei Signed-off-by: Changlong Xie --- Makefile.objs| 1 + qapi/block-core.json | 13 replication.c| 107 +++ replication.h| 174

[Qemu-devel] [PATCH v20 Resend 09/10] tests: add unit test case for replication

2016-06-14 Thread Changlong Xie
Signed-off-by: Wen Congyang Signed-off-by: Changlong Xie --- tests/.gitignore | 1 + tests/Makefile | 4 + tests/test-replication.c | 555 +++ 3 files changed, 560 insertions(+) create mode 100644 tests/test-replication.c diff

Re: [Qemu-devel] [PATCH v20 Resend 00/10] Block replication for continuous checkpoints

2016-06-16 Thread Changlong Xie
For v19, Stefan said he had reviewed most part of this patchsets. So, this series need more comments from block and block job maintainers. @Jeff and/or Kevin, ping... On 06/14/2016 03:53 PM, Changlong Xie wrote: Block replication is a very important feature which is used for continuous

Re: [Qemu-devel] [PATCH v3 0/2] Let PKGVERSION include the "git describe" output

2016-06-19 Thread Changlong Xie
For this patch, i think you forget to add qemu-version.h and/or qemu-version.h.tmp in .gitignore changlox ~/w/qemu/qemu% gs On branch master Your branch is up-to-date with 'origin/master'. Untracked files: (use "git add ..." to include in what will be committed) qemu-version.h

[Qemu-devel] [PATCH 2/2] mirror: fix misleading comments

2016-06-22 Thread Changlong Xie
s/target bs/to_replace/, also we check to_replace bs is not blocked in qmp_drive_mirror() not here Signed-off-by: Changlong Xie --- block/mirror.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/mirror.c b/block/mirror.c index fa2bdab..335ddd2 100644 --- a/block

[Qemu-devel] [PATCH 0/2] small fix of block job

2016-06-22 Thread Changlong Xie
Changlong Xie (2): blockjob: assert(cb) in the entry functions of blockjob mirror: fix misleading comments block/commit.c | 1 + block/mirror.c | 4 +++- block/stream.c | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) -- 1.9.3

[Qemu-devel] [PATCH 1/2] blockjob: assert(cb) in the entry functions of blockjob

2016-06-22 Thread Changlong Xie
Signed-off-by: Changlong Xie --- block/commit.c | 1 + block/mirror.c | 2 ++ block/stream.c | 1 + 3 files changed, 4 insertions(+) diff --git a/block/commit.c b/block/commit.c index 444333b..13b55c1 100644 --- a/block/commit.c +++ b/block/commit.c @@ -223,6 +223,7 @@ void commit_start

Re: [Qemu-devel] [PATCH 1/2] blockjob: assert(cb) in the entry functions of blockjob

2016-06-22 Thread Changlong Xie
On 06/22/2016 05:50 PM, Paolo Bonzini wrote: On 22/06/2016 11:16, Changlong Xie wrote: Signed-off-by: Changlong Xie --- block/commit.c | 1 + block/mirror.c | 2 ++ block/stream.c | 1 + 3 files changed, 4 insertions(+) Why is this useful? commit/mirror/stream/backup use

Re: [Qemu-devel] [PATCH 1/2] blockjob: assert(cb) in the entry functions of blockjob

2016-06-22 Thread Changlong Xie
On 06/23/2016 01:31 AM, Eric Blake wrote: On 06/22/2016 04:19 AM, Paolo Bonzini wrote: On 22/06/2016 12:12, Changlong Xie wrote: commit/mirror/stream/backup use block_job_create(..., cb,..) to create relevant blockjob. When they finished, these jobs will invoke block_job_completed, then

Re: [Qemu-devel] [PATCH 1/2] blockjob: assert(cb) in the entry functions of blockjob

2016-06-22 Thread Changlong Xie
On 06/23/2016 02:21 PM, Kevin Wolf wrote: Am 23.06.2016 um 03:04 hat Changlong Xie geschrieben: On 06/23/2016 01:31 AM, Eric Blake wrote: On 06/22/2016 04:19 AM, Paolo Bonzini wrote: On 22/06/2016 12:12, Changlong Xie wrote: commit/mirror/stream/backup use block_job_create(..., cb,..) to

[Qemu-devel] [PATCH v2 2/2] mirror: fix misleading comments

2016-06-23 Thread Changlong Xie
s/target bs/to_replace/, also we check to_replace bs is not blocked in qmp_drive_mirror() not here Signed-off-by: Changlong Xie --- block/mirror.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/mirror.c b/block/mirror.c index a04ed9c..4420a15 100644 --- a/block

[Qemu-devel] [PATCH v2 0/2] small fix of block job

2016-06-23 Thread Changlong Xie
V2 p1: put assert(cb) in block_job_create Changlong Xie (2): blockjob: assert(cb) when create job mirror: fix misleading comments block/backup.c | 1 - block/mirror.c | 2 +- blockjob.c | 1 + 3 files changed, 2 insertions(+), 2 deletions(-) -- 1.9.3

[Qemu-devel] [PATCH v2 1/2] blockjob: assert(cb) when create job

2016-06-23 Thread Changlong Xie
Callback for block job should always exist Suggested-by: Paolo Bonzini Suggested-by: Kevin Wolf Signed-off-by: Changlong Xie --- block/backup.c | 1 - blockjob.c | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/block/backup.c b/block/backup.c index 581269b..f87f8d5

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

2016-05-11 Thread Changlong Xie
On 05/06/2016 11:51 PM, Stefan Hajnoczi wrote: On Fri, Apr 15, 2016 at 04:10:30PM +0800, Changlong Xie 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: http

Re: [Qemu-devel] [PATCH v18 7/8] Implement new driver for block replication

2016-05-18 Thread Changlong Xie
On 05/06/2016 11:46 PM, Stefan Hajnoczi wrote: On Fri, Apr 15, 2016 at 04:10:37PM +0800, Changlong Xie wrote: +static void replication_close(BlockDriverState *bs) +{ +BDRVReplicationState *s = bs->opaque; + +if (s->mode == REPLICATION_MODE_SECONDARY) { +g_free(s-&

[Qemu-devel] [RFC] backup: export interfaces for extra serialization

2016-05-18 Thread Changlong Xie
36a2899f229a7e26ac Mon Sep 17 00:00:00 2001 From: Changlong Xie Date: Wed, 18 May 2016 16:19:51 +0800 Subject: [PATCH] [RFC] backup: export interfaces for extra serialization Normal backup(sync='none') workflow: step 1. NBD peformance I/O write from client to server qcow2_

[Qemu-devel] [PATCH v19 04/10] Link backup into block core

2016-05-20 Thread Changlong Xie
From: Wen Congyang Some programs that add a dependency on it will use the block layer directly. Signed-off-by: Wen Congyang Signed-off-by: zhanghailiang Signed-off-by: Gonglei Signed-off-by: Changlong Xie Reviewed-by: Stefan Hajnoczi Reviewed-by: Jeff Cody --- block/Makefile.objs | 2

[Qemu-devel] [PATCH v19 00/10] Block replication for continuous checkpoints

2016-05-20 Thread Changlong Xie
sign the secondary qemu(use image-fleecing) 2. Use Error objects to return error message 3. Address the comments from Max Reitz and Eric Blake Changlong Xie (3): Backup: export interfaces for extra serialization Introduce new APIs to do replication operation tests: add unit test case for replic

[Qemu-devel] [PATCH v19 06/10] auto complete active commit

2016-05-20 Thread Changlong Xie
From: Wen Congyang Auto complete mirror job in background to prevent from blocking synchronously Signed-off-by: Wen Congyang Signed-off-by: Changlong Xie --- block/mirror.c| 13 + blockdev.c| 2 +- include/block/block_int.h | 3 ++- qemu-img.c

[Qemu-devel] [PATCH v19 02/10] Backup: clear all bitmap when doing block checkpoint

2016-05-20 Thread Changlong Xie
From: Wen Congyang Signed-off-by: Wen Congyang Signed-off-by: zhanghailiang Signed-off-by: Gonglei Signed-off-by: Changlong Xie --- block/backup.c | 18 ++ include/block/block_backup.h | 3 +++ 2 files changed, 21 insertions(+) create mode 100644 include

[Qemu-devel] [PATCH v19 09/10] tests: add unit test case for replication

2016-05-20 Thread Changlong Xie
Signed-off-by: Wen Congyang Signed-off-by: Changlong Xie --- tests/.gitignore | 1 + tests/Makefile | 4 + tests/test-replication.c | 523 +++ 3 files changed, 528 insertions(+) create mode 100644 tests/test-replication.c diff

[Qemu-devel] [PATCH v19 01/10] unblock backup operations in backing file

2016-05-20 Thread Changlong Xie
From: Wen Congyang Signed-off-by: Wen Congyang Signed-off-by: Changlong Xie --- block.c | 17 + 1 file changed, 17 insertions(+) diff --git a/block.c b/block.c index 1205ef8..8c4c2c2 100644 --- a/block.c +++ b/block.c @@ -1271,6 +1271,23 @@ void bdrv_set_backing_hd

[Qemu-devel] [PATCH v19 05/10] docs: block replication's description

2016-05-20 Thread Changlong Xie
From: Wen Congyang Signed-off-by: Wen Congyang Signed-off-by: zhanghailiang Signed-off-by: Gonglei Signed-off-by: Changlong Xie --- docs/block-replication.txt | 239 + 1 file changed, 239 insertions(+) create mode 100644 docs/block

[Qemu-devel] [PATCH v19 10/10] support replication driver in blockdev-add

2016-05-20 Thread Changlong Xie
From: Wen Congyang Signed-off-by: Wen Congyang Signed-off-by: zhanghailiang Signed-off-by: Gonglei Signed-off-by: Changlong Xie Reviewed-by: Eric Blake --- qapi/block-core.json | 20 ++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/qapi/block-core.json b

[Qemu-devel] [PATCH v19 07/10] Introduce new APIs to do replication operation

2016-05-20 Thread Changlong Xie
Signed-off-by: Wen Congyang Signed-off-by: zhanghailiang Signed-off-by: Gonglei Signed-off-by: Changlong Xie --- Makefile.objs| 1 + qapi/block-core.json | 13 replication.c| 105 ++ replication.h| 176

[Qemu-devel] [PATCH v19 03/10] Backup: export interfaces for extra serialization

2016-05-20 Thread Changlong Xie
} ret = bdrv_co_readv(); out: return ret; } Signed-off-by: Changlong Xie Signed-off-by: Wen Congyang --- block/backup.c | 41 ++--- include/block/block_backup.h | 14 ++ 2 files changed, 48 insertions(+), 7 deletions(-)

[Qemu-devel] [PATCH v19 08/10] Implement new driver for block replication

2016-05-20 Thread Changlong Xie
From: Wen Congyang Signed-off-by: Wen Congyang Signed-off-by: zhanghailiang Signed-off-by: Gonglei Signed-off-by: Changlong Xie --- block/Makefile.objs | 1 + block/replication.c | 666 2 files changed, 667 insertions(+) create mode

[Qemu-devel] [RFC PATCH] vfio: Add support for mmapping sub-page MMIO BARs

2016-05-24 Thread Yongji Xie
BARs' memory regions to zero in case of overlap with BARs which share the same page with sub-page BARs in guest. [1] http://www.spinics.net/lists/kvm/msg132382.html Signed-off-by: Yongji Xie --- hw/vfio/common.c |3 +-- hw/vfio/pci.c|

Re: Discrepancy between mmap call on DPDK/libvduse and rust vm-memory crate

2024-04-15 Thread Yongji Xie
libvduse.c:vduse_iova_add_region() I see it > > handles the offset by adding it up to the size, instead of using it > > directly as a parameter in the mmap: > > > > void *mmap_addr = mmap(0, size + offset, prot, MAP_SHARED, fd, 0); > > > CC Xie Yongji who wrote this cod

Re: [Qemu-devel] [PATCH v7 6/7] vhost-user-blk: Add support to reconnect backend

2019-03-12 Thread Yongji Xie
On Wed, 13 Mar 2019 at 00:49, Michael S. Tsirkin wrote: > > On Thu, Feb 28, 2019 at 04:53:54PM +0800, elohi...@gmail.com wrote: > > From: Xie Yongji > > > > Since we now support the message VHOST_USER_GET_INFLIGHT_FD > > and VHOST_USER_SET_INFLIGHT_FD. The backend

Re: [Qemu-devel] [PATCH v7 6/7] vhost-user-blk: Add support to reconnect backend

2019-03-12 Thread Yongji Xie
On Wed, 13 Mar 2019 at 09:16, Michael S. Tsirkin wrote: > > On Thu, Feb 28, 2019 at 04:53:54PM +0800, elohi...@gmail.com wrote: > > From: Xie Yongji > > > > Since we now support the message VHOST_USER_GET_INFLIGHT_FD > > and VHOST_USER_SET_INFLIGHT_FD. The backend

Re: [Qemu-devel] [PATCH v7 0/7] vhost-user-blk: Add support for backend reconnecting

2019-03-12 Thread Yongji Xie
On Wed, 13 Mar 2019 at 09:08, Michael S. Tsirkin wrote: > > On Thu, Feb 28, 2019 at 04:53:48PM +0800, elohi...@gmail.com wrote: > > From: Xie Yongji > > > > This patchset is aimed at supporting qemu to reconnect > > vhost-user-blk backend after vhost-user-bl

Re: [Qemu-devel] [PATCH v7 6/7] vhost-user-blk: Add support to reconnect backend

2019-03-14 Thread Yongji Xie
On Thu, 14 Mar 2019 at 19:18, Michael S. Tsirkin wrote: > > On Wed, Mar 13, 2019 at 10:47:08AM +0800, Yongji Xie wrote: > > On Wed, 13 Mar 2019 at 09:16, Michael S. Tsirkin wrote: > > > > > > On Thu, Feb 28, 2019 at 04:53:54PM +0800, elohi...@gmail.com w

Re: [Qemu-devel] [PATCH v7 6/7] vhost-user-blk: Add support to reconnect backend

2019-03-14 Thread Yongji Xie
t; > On Tue, Mar 12, 2019 at 12:49:35PM -0400, Michael S. Tsirkin wrote: > >> > > On Thu, Feb 28, 2019 at 04:53:54PM +0800, elohi...@gmail.com wrote: > >> > > > From: Xie Yongji > >> > > > > >> > > > Since we now sup

Re: [Qemu-devel] [PATCH v7 6/7] vhost-user-blk: Add support to reconnect backend

2019-03-14 Thread Yongji Xie
gt; > > > On Thu, Feb 28, 2019 at 04:53:54PM +0800, elohi...@gmail.com wrote: > > > > > From: Xie Yongji > > > > > > > > > > Since we now support the message VHOST_USER_GET_INFLIGHT_FD > > > > > and VHOST_USER_SET_INFLIGHT_FD

Re: [Qemu-devel] [PATCH v7 6/7] vhost-user-blk: Add support to reconnect backend

2019-03-14 Thread Yongji Xie
On Fri, 15 Mar 2019 at 11:09, Michael S. Tsirkin wrote: > > On Fri, Mar 15, 2019 at 10:46:34AM +0800, Yongji Xie wrote: > > On Thu, 14 Mar 2019 at 19:18, Michael S. Tsirkin wrote: > > > > > > On Wed, Mar 13, 2019 at 10:47:08AM +0800, Yongji Xie wrote: > &

Re: [Qemu-devel] [PATCH v7 6/7] vhost-user-blk: Add support to reconnect backend

2019-03-15 Thread Yongji Xie
> On Thu, Mar 14, 2019 at 07:34:03AM -0400, Michael S. Tsirkin wrote: > >> >> On Thu, Mar 14, 2019 at 11:24:22AM +, Daniel P. Berrangé wrote: > >> >> > On Tue, Mar 12, 2019 at 12:49:35PM -0400, Michael S. Tsirkin wrote: > >> &

Re: [PATCH] vhost-user-scsi: implement handle_output

2019-10-17 Thread Yongji Xie
On Fri, 18 Oct 2019 at 01:17, Felipe Franciosi wrote: > > Originally, vhost-user-scsi did not implement a handle_output callback > as that didn't seem necessary. Turns out it is. > > Depending on which other devices are presented to a VM, SeaBIOS may > decide to map vhost-user-scsi devices on the

Re: [PATCH] vhost-user-scsi: implement handle_output

2019-10-20 Thread Yongji Xie
On Fri, 18 Oct 2019 at 19:14, Felipe Franciosi wrote: > > > > > On Oct 18, 2019, at 3:59 AM, Yongji Xie wrote: > > > > On Fri, 18 Oct 2019 at 01:17, Felipe Franciosi wrote: > >> > >> Originally, vhost-user-scsi did not implement a handle_output callb

Re: [PATCH] vhost-user-scsi: implement handle_output

2019-10-21 Thread Yongji Xie
On Mon, 21 Oct 2019 at 16:00, Felipe Franciosi wrote: > > > > > On Oct 21, 2019, at 5:01 AM, Yongji Xie wrote: > > > > On Fri, 18 Oct 2019 at 19:14, Felipe Franciosi wrote: > >> > >> > >> > >>> On Oct 18, 2019, at 3:59 AM, Y

Re: [PATCH] vhost-user-scsi: implement handle_output

2019-10-21 Thread Yongji Xie
On Mon, 21 Oct 2019 at 16:20, Liu, Changpeng wrote: > > There is some logic in vhost_user_blk_handle_output() for now, it's not empty > as vhost-user-scsi. > There should be other issue if it can't start from SeaBIOS. > No, it's the same issue. We can see the notify is triggered from the VIRTIO_

Re: [PATCH] virtio: notify virtqueue via host notifier when available

2019-10-23 Thread Yongji Xie
On Mon, 21 Oct 2019 at 19:40, Stefan Hajnoczi wrote: > > Host notifiers are used in several cases: > 1. Traditional ioeventfd where virtqueue notifications are handled in >the main loop thread. > 2. IOThreads (aio_handle_output) where virtqueue notifications are >handled in an IOThread Aio

Re: [PULL v2 10/20] libvduse: Add VDUSE (vDPA Device in Userspace) library

2022-06-27 Thread Yongji Xie
On Mon, Jun 27, 2022 at 12:45 PM Markus Armbruster wrote: > > Kevin Wolf writes: > > > From: Xie Yongji > > > > VDUSE [1] is a linux framework that makes it possible to implement > > software-emulated vDPA devices in userspace. This adds a library > > as

[PATCH 1/4] libvduse: Fix the incorrect function name

2022-06-27 Thread Xie Yongji
In vduse_name_is_valid(), we actually check whether the name is invalid or not. So let's change the function name to vduse_name_is_invalid() to match the behavior. Signed-off-by: Xie Yongji --- subprojects/libvduse/libvduse.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)

[PATCH 0/4] Fix some coverity issues on VDUSE

2022-06-27 Thread Xie Yongji
This series fixes some issues reported by coverity. Patch 1 fixes an incorrect function name. Patch 2 fixes Coverity CID 1490224. Patch 3 fixes Coverity CID 1490226, 1490223. Patch 4 fixes Coverity CID 1490222, 1490227. Xie Yongji (4): libvduse: Fix the incorrect function name libvduse

[PATCH 2/4] libvduse: Replace strcpy() with strncpy()

2022-06-27 Thread Xie Yongji
y() with strncpy() to fix the coverity complaint. Fixes: Coverity CID 1490224 Signed-off-by: Xie Yongji --- subprojects/libvduse/libvduse.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/subprojects/libvduse/libvduse.c b/subprojects/libvduse/libvduse.c index 6374933881..1e3622

[PATCH 4/4] libvduse: Check the return value of some ioctls

2022-06-27 Thread Xie Yongji
Coverity pointed out (CID 1490222, 1490227) that we called ioctl somewhere without checking the return value. This patch fixes these issues. Fixes: Coverity CID 1490222, 1490227 Signed-off-by: Xie Yongji --- subprojects/libvduse/libvduse.c | 10 -- 1 file changed, 8 insertions(+), 2

[PATCH 3/4] libvduse: Pass positive value to strerror()

2022-06-27 Thread Xie Yongji
The value passed to strerror() should be positive. So let's fix it. Fixes: Coverity CID 1490226, 1490223 Signed-off-by: Xie Yongji --- subprojects/libvduse/libvduse.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/subprojects/libvduse/libvduse.c b/subprojects/lib

<    1   2   3   4   5   6   7   >