[PATCH v4 6/6] libvduse: Add support for reconnecting

2022-04-06 Thread Xie Yongji
To support reconnecting after restart or crash, VDUSE backend might need to resubmit inflight I/Os. This stores the metadata such as the index of inflight I/O's descriptors to a shm file so that VDUSE backend can restore them during reconnecting. Signed-off-by: Xie Yongji --- block/export/

[PATCH v4 5/6] vduse-blk: Add vduse-blk resize support

2022-04-06 Thread Xie Yongji
To support block resize, this uses vduse_dev_update_config() to update the capacity field in configuration space and inject config interrupt on the block resize callback. Signed-off-by: Xie Yongji Reviewed-by: Stefan Hajnoczi --- block/export/vduse-blk.c | 20 1 file

[PATCH v4 1/6] block: Support passing NULL ops to blk_set_dev_ops()

2022-04-06 Thread Xie Yongji
This supports passing NULL ops to blk_set_dev_ops() so that we can remove stale ops in some cases. Signed-off-by: Xie Yongji --- block/block-backend.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/block-backend.c b/block/block-backend.c index e0e1aff4b1..35457a6a1d

[PATCH v4 4/6] vduse-blk: implements vduse-blk export

2022-04-06 Thread Xie Yongji
emon. Signed-off-by: Xie Yongji --- MAINTAINERS | 4 +- block/export/export.c | 6 + block/export/meson.build | 5 + block/export/vduse-blk.c | 425 ++ block/export/vduse-blk.h | 20 ++ meson.build

Re: [RFC PATCH] libvduse: Do not truncate terminating NUL character with strncpy()

2022-09-20 Thread Yongji Xie
t; > ninja: build stopped: cannot make progress due to previous errors. > > > > Fixes: d9cf16c0be ("libvduse: Replace strcpy() with strncpy()") > > Signed-off-by: Philippe Mathieu-Daudé > > The subject feels a bit too alarming to me. This patch suppresses a &

Re: ublk-qcow2: ublk-qcow2 is available

2022-10-07 Thread Yongji Xie
> > > empty image and pre-allocated image, for example of pre-allocated > > > > > > > qcow2 > > > > > > > image(8GB): > > > > > > > > > > > > > > - qemu-nbd (make test T=qcow2/002) > > > > > > > > > > >

Re: ublk-qcow2: ublk-qcow2 is available

2022-10-07 Thread Yongji Xie
On Fri, Oct 7, 2022 at 6:51 PM Ming Lei wrote: > > On Fri, Oct 07, 2022 at 06:04:29PM +0800, Yongji Xie wrote: > > On Thu, Oct 6, 2022 at 7:24 PM Ming Lei wrote: > > > > > > On Wed, Oct 05, 2022 at 08:21:45AM -0400, Stefan Hajnoczi wrote: > > > > On

Re: [PATCH v4 4/6] vduse-blk: implements vduse-blk export

2022-04-26 Thread Yongji Xie
On Wed, Apr 27, 2022 at 1:03 AM Kevin Wolf wrote: > > Am 06.04.2022 um 09:59 hat Xie Yongji geschrieben: > > This implements a VDUSE block backends based on > > the libvduse library. We can use it to export the BDSs > > for both VM and container (host) usage. > > &

Re: [PATCH] libvduse: Fix compiler warning with -Wshadow=local

2023-10-07 Thread Yongji Xie
On Fri, Oct 6, 2023 at 8:08 PM Thomas Huth wrote: > > No need to declare a new variable with the same name here, > we can simple re-use the one from the top of the function. > With this change, the file now compiles fine with -Wshadow=local. > > Signed-off-by: Thomas Huth >

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

2016-10-25 Thread Changlong Xie
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: Zhang Chen --- docs/block-replication.txt | 131 +++-- 1

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

2016-10-25 Thread Changlong Xie
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 vhdx_write_header() bypasses the BlockBacke

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

2016-10-25 Thread Changlong Xie
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 --- block/replication.c | 33 + 1 file changed, 33 insertions(+) diff -

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

2016-10-25 Thread Changlong Xie
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 and normally stop replication path. This

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

2016-10-25 Thread Changlong Xie
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 --- block/replication.c | 33 + 1 file changed, 33 insertions(+) diff -

Re: [Qemu-devel] [PATCH RFC 0/7] COLO block replication supports shared disk case

2016-10-25 Thread Changlong Xie
I did't review p5/p6, I think you can merge p5/p6 into a single one. Also don't forget update qapi/block-core.json with p3. Thanks -Xie On 10/20/2016 09:57 PM, zhanghailiang wrote: COLO block replication doesn't support the shared disk case, Here we try to implement i

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

2016-10-26 Thread Yongji Xie
age BAR is changed and not page aligned any more in guest. And we also set the priority of these BARs' memory regions to zero in case of overlap with BARs which share the same page with sub-page BARs in guest. Signed-off-by: Yongji Xie --- hw/vfio/common.c |3 +-- hw/vfio/

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

2016-10-30 Thread Yongji Xie
On 2016/10/31 3:59, Alex Williamson wrote: On Wed, 26 Oct 2016 16:56:13 +0800 Yongji Xie wrote: Now the kernel commit 05f0c03fbac1 ("vfio-pci: Allow to mmap sub-page MMIO BARs if the mmio page is exclusive") allows VFIO to mmap sub-page BARs. This is the corresponding QEMU patch.

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

2016-10-30 Thread Yongji Xie
age BAR is changed and not page aligned any more in guest. And we also set the priority of these BARs' memory regions to zero in case of overlap with BARs which share the same page with sub-page BARs in guest. Signed-off-by: Yongji Xie --- hw/vfio/common.c |3 +-- hw/vfio/

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

2016-09-05 Thread Yongji Xie
Ping? On 2016/8/11 19:05, Yongji Xie wrote: Now the kernel commit 05f0c03fbac1 ("vfio-pci: Allow to mmap sub-page MMIO BARs if the mmio page is exclusive") allows VFIO to mmap sub-page BARs. This is the corresponding QEMU patch. With those patches applied, we could passthrough sub-pa

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

2016-11-27 Thread Changlong Xie
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 Signed-off-by: Wen Congyang Signed-off-by: Zhang

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

2016-09-13 Thread Yongji Xie
On 2016/9/14 6:55, Alex Williamson wrote: [cc +Paolo] On Thu, 11 Aug 2016 19:05:57 +0800 Yongji Xie wrote: Now the kernel commit 05f0c03fbac1 ("vfio-pci: Allow to mmap sub-page MMIO BARs if the mmio page is exclusive") allows VFIO to mmap sub-page BARs. This is the corresponding

[Qemu-devel] [PATCH] docs/block-replication.txt: Introduce nbd qmp commands

2016-11-06 Thread Changlong Xie
Signed-off-by: Changlong Xie --- docs/block-replication.txt | 22 +- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/docs/block-replication.txt b/docs/block-replication.txt index 6bde673..6b9c77b 100644 --- a/docs/block-replication.txt +++ b/docs/block

[Qemu-devel] [PATCH] tests/.gitignore: Ignore test-char

2016-11-06 Thread Changlong Xie
Signed-off-by: Changlong Xie --- tests/.gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/.gitignore b/tests/.gitignore index c0d7857..e9b182e 100644 --- a/tests/.gitignore +++ b/tests/.gitignore @@ -16,6 +16,7 @@ test-bitops test-blockjob test-blockjob-txn test-bufferiszero

Re: [Qemu-devel] [PATCH] docs/block-replication.txt: Introduce nbd qmp commands

2016-11-07 Thread Changlong Xie
On 11/07/2016 03:50 PM, Markus Armbruster wrote: Changlong Xie writes: Signed-off-by: Changlong Xie --- docs/block-replication.txt | 22 +- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/docs/block-replication.txt b/docs/block-replication.txt index

Re: [Qemu-devel] [PATCH] memory: make ram device read/write endian sensitive

2017-02-21 Thread Yongji Xie
on 2017/2/22 2:44, Alex Williamson wrote: On Tue, 21 Feb 2017 18:09:04 + Peter Maydell wrote: On 21 February 2017 at 16:34, Paolo Bonzini wrote: On 21/02/2017 17:21, Alex Williamson wrote: On Tue, 21 Feb 2017 14:46:55 +0800 Yongji Xie wrote: At the moment ram device's m

Re: [Qemu-devel] [PATCH] memory: make ram device read/write endian sensitive

2017-02-23 Thread Yongji Xie
on 2017/2/24 0:15, Paolo Bonzini wrote: On 23/02/2017 17:08, Peter Maydell wrote: On 23 February 2017 at 15:58, Paolo Bonzini wrote: However, DEVICE_NATIVE_ENDIAN would have to be paired with tswap, which the current code does not do, hence the bug. To have no swap at all, you'd need DEVICE

Re: [Qemu-devel] [PATCH] memory: make ram device read/write endian sensitive

2017-02-26 Thread Yongji Xie
on 2017/2/27 11:25, Alexey Kardashevskiy wrote: On 27/02/17 13:25, Michael Roth wrote: Quoting Alexey Kardashevskiy (2017-02-22 22:20:25) On 21/02/17 17:46, Yongji Xie wrote: At the moment ram device's memory regions are NATIVE_ENDIAN. This does not work on PPC64 because VFIO PCI devi

[Qemu-devel] [PATCH v2] memory: Introduce DEVICE_HOST_ENDIAN for ram device

2017-02-26 Thread Yongji Xie
work when target and host endianness are different which is the most common case on PPC64. To fix it, this introduces DEVICE_HOST_ENDIAN for the ram device. This has been tested on PPC64 BE/LE host/guest in all possible combinations including TCG. Suggested-by: Paolo Bonzini Signed-off-by:

Re: [Qemu-devel] [PATCH v2] memory: Introduce DEVICE_HOST_ENDIAN for ram device

2017-02-28 Thread Yongji Xie
on 2017/2/28 8:41, David Gibson wrote: On Mon, Feb 27, 2017 at 12:52:44PM +0800, Yongji Xie wrote: At the moment ram device's memory regions are DEVICE_NATIVE_ENDIAN. It's incorrect. This memory region is backed by a MMIO area in host, so the uint64_t data that MemoryRegionOps read

Re: [Qemu-devel] [PATCH v2] memory: Introduce DEVICE_HOST_ENDIAN for ram device

2017-02-28 Thread Yongji Xie
on 2017/3/1 8:35, David Gibson wrote: On Tue, Feb 28, 2017 at 06:12:56PM +0800, Yongji Xie wrote: on 2017/2/28 8:41, David Gibson wrote: On Mon, Feb 27, 2017 at 12:52:44PM +0800, Yongji Xie wrote: At the moment ram device's memory regions are DEVICE_NATIVE_ENDIAN. It's incor

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

2016-10-04 Thread Yongji Xie
On 2016/10/1 0:05, Paolo Bonzini wrote: On 14/09/2016 00:55, Alex Williamson wrote: Paolo, as the reigning memory API expert, do you see any issues with this? Expanding the size of a container MemoryRegion and the contained mmap'd subregion and manipulating priorities so that we don't interfer

[Qemu-devel] [PATCH] filter-dump: add missing "["

2016-10-10 Thread Changlong Xie
Signed-off-by: Changlong Xie --- qemu-options.hx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qemu-options.hx b/qemu-options.hx index b1fbdb0..c209b53 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -3902,7 +3902,7 @@ colo secondary: -object filter-redirector,id=f2

[Qemu-devel] [PATCH v1 2/2] block/replication: Clarify 'top-id' parameter usage

2016-10-10 Thread Changlong Xie
Replication driver only support 'top-id' parameter in secondary side, and it must not be supplied in primary side Signed-off-by: Changlong Xie --- block/replication.c | 5 + qapi/block-core.json | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/block/repli

[Qemu-devel] [PATCH v1 0/2] block/replication fixes

2016-10-10 Thread Changlong Xie
Changlong Xie (2): block/replication: prefect the logic to acquire 'top_id' block/replication: Clarify 'top-id' parameter usage block/replication.c | 9 +++-- qapi/block-core.json | 3 ++- 2 files changed, 9 insertions(+), 3 deletions(-) -- 1.9.3

[Qemu-devel] [PATCH v1 1/2] block/replication: prefect the logic to acquire 'top_id'

2016-10-10 Thread Changlong Xie
Only g_strdup(top_id) if 'top_id' is not NULL, although there is no memory leak here Signed-off-by: Changlong Xie --- block/replication.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/block/replication.c b/block/replication.c index 3bd1cf1..5b432d9 100644 -

[Qemu-devel] [Questions] NBD issue or CoMutex->holder issue?

2016-10-11 Thread Changlong Xie
7;s just add it. Signed-off-by: Kevin Wolf Reviewed-by: Paolo Bonzini Reviewed-by: Stefan Hajnoczi Any ideas? Is it a nbd bug or should we revert commit 0e438cdc? Thanks -Xie

Re: [Qemu-devel] [PATCH v1 2/2] block/replication: Clarify 'top-id' parameter usage

2016-10-11 Thread Changlong Xie
On 10/11/2016 02:30 PM, Fam Zheng wrote: On Tue, 10/11 13:39, Changlong Xie wrote: Replication driver only support 'top-id' parameter in secondary side, and it must not be supplied in primary side Signed-off-by: Changlong Xie --- block/replication.c | 5 + qapi/block-cor

[Qemu-devel] [PATCH v2 2/2] block/replication: Clarify 'top-id' parameter usage

2016-10-11 Thread Changlong Xie
Replication driver only support 'top-id' parameter in secondary side, and it must not be supplied in primary side Signed-off-by: Changlong Xie --- block/replication.c | 5 + qapi/block-core.json | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/block/repli

[Qemu-devel] [PATCH v2 0/2] block/replication fixes

2016-10-11 Thread Changlong Xie
V2: 1. fix typo Changlong Xie (2): block/replication: prefect the logic to acquire 'top_id' block/replication: Clarify 'top-id' parameter usage block/replication.c | 9 +++-- qapi/block-core.json | 3 ++- 2 files changed, 9 insertions(+), 3 deletions(-) -- 1.9.3

[Qemu-devel] [PATCH v2 1/2] block/replication: prefect the logic to acquire 'top_id'

2016-10-11 Thread Changlong Xie
Only g_strdup(top_id) if 'top_id' is not NULL, although there is no memory leak here Signed-off-by: Changlong Xie --- block/replication.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/block/replication.c b/block/replication.c index 3bd1cf1..5b432d9 100644 -

Re: [Qemu-devel] [PATCH v2 1/2] block/replication: prefect the logic to acquire 'top_id'

2016-10-11 Thread Changlong Xie
On 10/11/2016 10:52 PM, Eric Blake wrote: On 10/11/2016 05:46 AM, Changlong Xie wrote: Only g_strdup(top_id) if 'top_id' is not NULL, although there is no memory leak here Signed-off-by: Changlong Xie --- block/replication.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletion

Re: [Qemu-devel] [PATCH v2 2/2] block/replication: Clarify 'top-id' parameter usage

2016-10-11 Thread Changlong Xie
On 10/11/2016 10:54 PM, Eric Blake wrote: The replication driver only supports the 'top-id' parameter for the secondary side; it must not be supplied for the primary side. Will apply in next version. Thanks -Xie

Re: [Qemu-devel] [Questions] NBD issue or CoMutex->holder issue?

2016-10-11 Thread Changlong Xie
g if in_flight >= MAX_NBD_REQUESTS - 1, wait on the queue while in_flight == MAX_NBD_REQUESTS. Instead of unlocking, use qemu_co_queue_next to wake up one request. Thanks for your explanation! will send out a patch later. Thanks -Xie Thanks for the report! Paolo >For example

[Qemu-devel] [PATCH v3] block/replication: Clarify 'top-id' parameter usage

2016-10-11 Thread Changlong Xie
The replication driver only supports the 'top-id' parameter for the secondary side; it must not be supplied for the primary side. Reviewed-by: Eric Blake Signed-off-by: Changlong Xie --- block/replication.c | 5 + qapi/block-core.json | 3 ++- 2 files changed, 7 insertions(+),

Re: [Qemu-devel] [PATCH] replication: interrupt failover if the main device is closed

2016-10-11 Thread Changlong Xie
-by: Paolo Bonzini Reviewed-by: Changlong Xie --- block/replication.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/block/replication.c b/block/replication.c index 3bd1cf1..5231a00 100644 --- a/block/replication.c +++ b/block/replication.c @@ -133,6 +133,9 @@ static void

[Qemu-devel] [PATCH] nbd: Use CoQueue for free_sema instead of CoMutex

2016-10-12 Thread Changlong Xie
;locked=false Per Paolo's suggestion "The simplest fix is to change it to CoQueue, which is like a condition variable", this patch replaces CoMutex with CoQueue. Cc: Wen Congyang Reported-by: zhan

Re: [Qemu-devel] [PATCH] nbd: Use CoQueue for free_sema instead of CoMutex

2016-10-12 Thread Changlong Xie
On 10/12/2016 06:18 PM, Changlong Xie wrote: time request Actions 29 15(most case) in_flight=15, Coroutine=C15, free_sema->holder=C17, mutex->locked

Re: [Qemu-devel] [PATCH] nbd: Use CoQueue for free_sema instead of CoMutex

2016-10-23 Thread Changlong Xie
Ping. Any comments? It's really a problem for NBD. Thanks -Xie On 10/12/2016 06:18 PM, Changlong Xie wrote: NBD is using the CoMutex in a way that wasn't anticipated. For example, if there are N(N=26, MAX_NBD_REQUESTS=16) nbd write requests, so we will invoke nbd_client_co

Re: [Qemu-devel] [PATCH] nbd: Use CoQueue for free_sema instead of CoMutex

2016-10-24 Thread Changlong Xie
On 10/24/2016 05:36 PM, Paolo Bonzini wrote: On 24/10/2016 03:44, Changlong Xie wrote: Ping. Any comments? It's really a problem for NBD. Sorry, I haven't been sending pull requests. I'll do it this week. Thanks : ) Paolo Thanks -Xie On 10/12/2016 06:18 PM, Chan

[Qemu-devel] [PATCH] checkpatch: rename README to README.md

2016-07-20 Thread Changlong Xie
Since commit e5dfc5e broke the logic of @top_of_kernel_tree Cc: Pranith Kumar Cc: Paolo Bonzini Cc: Stefan Hajnoczi Signed-off-by: Changlong Xie --- scripts/checkpatch.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index

Re: [Qemu-devel] [PULL 15/15] translate-all: add tb hash bucket info to 'info jit' dump

2016-07-22 Thread Changlong Xie
_statistics_init(&tcg_ctx.tb_ctx.htable, &hst); Hi Emilio If we use kvm accelerator, we will encouter segment fault. slave:~/.xie # gdb --args qemu-colo/x86_64-softmmu/qemu-system-x86_64 --enable-kvm -drive driver=qcow2,file.filename=fd16.qcow2 -monitor stdio -vnc :1 (qemu) info jit

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

2016-07-24 Thread Changlong Xie
. I've ping so many times, but no response until now. All i have to do is rebase them to the lastest code. Do you have time to review this? Any response would be appreciate. Thanks -Xie On 07/22/2016 06:15 PM, Wang WeiWei wrote: Block replication is a very important feature whi

[Qemu-devel] [PATCH] hw/net/e1000: Fix compiler warning

2016-07-24 Thread Changlong Xie
slave:~/.xie/qemu-colo # gcc --version gcc (SUSE Linux) 4.3.4 [gcc-4_3-branch revision 152973] slave:~/.xie/qemu-colo # make -j8 CChw/net/e1000e_core.o hw/net/e1000e_core.c:56: warning: ‘e1000e_set_interrupt_cause’ declared inline after being called hw/net/e1000e_core.c:56: warning: previous

[Qemu-devel] [PATCH v2] hw/net/e1000e: Fix compiler warning

2016-07-24 Thread Changlong Xie
slave:~/.xie/qemu-colo # gcc --version gcc (SUSE Linux) 4.3.4 [gcc-4_3-branch revision 152973] slave:~/.xie/qemu-colo # make -j8 CChw/net/e1000e_core.o hw/net/e1000e_core.c:56: warning: ‘e1000e_set_interrupt_cause’ declared inline after being called hw/net/e1000e_core.c:56: warning: previous

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

2016-07-25 Thread Changlong Xie
On 07/26/2016 05:18 AM, Max Reitz wrote: On 22.07.2016 12:15, Wang WeiWei wrote: From: Wen Congyang Signed-off-by: Wen Congyang Signed-off-by: zhanghailiang Signed-off-by: Gonglei Signed-off-by: Changlong Xie Signed-off-by: Wang WeiWei --- block/backup.c | 18

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

2016-07-25 Thread Changlong Xie
On 07/26/2016 05:50 AM, Max Reitz wrote: On 22.07.2016 12:16, Wang WeiWei wrote: From: Changlong Xie Normal backup(sync='none') workflow: step 1. NBD peformance I/O write from client to server qcow2_co_writev bdrv_co_writev ... bdrv_align

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

2016-07-25 Thread Changlong Xie
On 07/26/2016 06:23 AM, Max Reitz wrote: +# @primary: Primary mode, the vm's state will be sent to secondary QEMU. >+# >+# @secondary: Secondary mode, receive the vm's state from primary QEMU. >+# >+# Since: 2.7 Probably 2.8 now. I'll update 2.7 to 2.8 for all these series Max

Re: [Qemu-devel] [PATCH v22 10/10] support replication driver in blockdev-add

2016-07-25 Thread Changlong Xie
On 07/26/2016 07:00 AM, Max Reitz wrote: On 22.07.2016 12:16, Wang WeiWei wrote: 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 Signed-off-by: Wang WeiWei --- qapi/block-core.json

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

2016-07-25 Thread Changlong Xie
On 07/25/2016 10:34 PM, Stefan Hajnoczi wrote: On Mon, Jul 25, 2016 at 11:44:34AM +0800, Changlong Xie wrote: COLO block is the necessary prerequisite of COLO framework and COLO network, what are blocked by these patchsets now. Since v19, Stefan said he had reviewed most part of this patchsets

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

2016-07-26 Thread Changlong Xie
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 ++ include/block/block_backup.h | 25 + 2 files changed

[Qemu-devel] [PATCH v23 01/12] unblock backup operations in backing file

2016-07-26 Thread Changlong Xie
From: Wen Congyang Signed-off-by: Wen Congyang Signed-off-by: Changlong Xie Signed-off-by: Wang WeiWei --- block.c | 17 + 1 file changed, 17 insertions(+) diff --git a/block.c b/block.c index 30d64e6..194a060 100644 --- a/block.c +++ b/block.c @@ -1311,6 +1311,23 @@ void

[Qemu-devel] [PATCH v23 03/12] Backup: export interfaces for extra serialization

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

[Qemu-devel] [PATCH v23 00/12] Block replication for continuous checkpoints

2016-07-26 Thread Changlong Xie
ce a new driver replication to avoid touch nbd and qcow2. V3: 1: use error_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. U

[Qemu-devel] [PATCH v23 08/12] Introduce new APIs to do replication operation

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

[Qemu-devel] [PATCH v23 09/12] Implement new driver for block replication

2016-07-26 Thread Changlong Xie
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/Makefile.objs | 1 + block/replication.c | 658 2 files changed, 659

[Qemu-devel] [PATCH v23 04/12] Link backup into block core

2016-07-26 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: Changlong Xie Signed-off-by: Wang WeiWei Signed-off-by: zhanghailiang Signed-off-by: Gonglei Reviewed-by: Stefan Hajnoczi Reviewed-by: Jeff Cody

[Qemu-devel] [PATCH v23 06/12] auto complete active commit

2016-07-26 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 Signed-off-by: Wang WeiWei --- block/mirror.c| 13 + blockdev.c| 2 +- include/block/block_int.h

[Qemu-devel] [PATCH v23 07/12] configure: support replication

2016-07-26 Thread Changlong Xie
configure --(enable/disable)-replication to switch replication support on/off, and it is on by default. We later introduce replation support. Signed-off-by: Wen Congyang Signed-off-by: Changlong Xie Signed-off-by: Wang WeiWei --- configure | 11 +++ 1 file changed, 11 insertions

[Qemu-devel] [PATCH v23 12/12] MAINTAINERS: add maintainer for replication

2016-07-26 Thread Changlong Xie
As per Stefan's suggestion, add Wen and I as co-maintainers of replication. Cc: Stefan Hajnoczi Signed-off-by: Wen Congyang Signed-off-by: Changlong Xie --- MAINTAINERS | 8 1 file changed, 8 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index d1439a8..8fa2a25 100644

[Qemu-devel] [PATCH v23 05/12] docs: block replication's description

2016-07-26 Thread Changlong Xie
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 --- docs/block-replication.txt | 239 + 1 file changed, 239 insertions(+) create mode

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

2016-07-26 Thread Changlong Xie
Signed-off-by: Wen Congyang Signed-off-by: Changlong Xie Signed-off-by: Wang WeiWei --- tests/.gitignore | 1 + tests/Makefile.include | 4 + tests/test-replication.c | 575 +++ 3 files changed, 580 insertions(+) create mode 100644

[Qemu-devel] [PATCH v23 11/12] support replication driver in blockdev-add

2016-07-26 Thread Changlong Xie
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 Reviewed-by: Eric Blake --- qapi/block-core.json | 22 -- 1 file changed, 20 insertions(+), 2 deletions(-) diff

Re: [Qemu-devel] [PATCH v23 09/12] Implement new driver for block replication

2016-07-26 Thread Changlong Xie
On 07/27/2016 12:17 AM, Max Reitz wrote: On 26.07.2016 10:15, 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/Makefile.objs | 1 + block

Re: [Qemu-devel] [PATCH v23 11/12] support replication driver in blockdev-add

2016-07-26 Thread Changlong Xie
On 07/27/2016 12:22 AM, Max Reitz wrote: On 26.07.2016 10:15, 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 Reviewed-by: Eric Blake --- qapi/block

Re: [Qemu-devel] [PATCH v23 12/12] MAINTAINERS: add maintainer for replication

2016-07-26 Thread Changlong Xie
liation" is good for me. >+M: Wen Congyang >+M: Changlong Xie >+S: Supported >+F: replication* >+F: block/replication.c >+F: test/test-replication.c docs/block-replication.txt should probably be mentioned as well. Surely Max >+ > Build and test automation > - > M: Alex Bennée >

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

2016-07-27 Thread Changlong Xie
From: Wen Congyang Signed-off-by: Wen Congyang Signed-off-by: Changlong Xie Signed-off-by: Wang WeiWei --- block.c | 17 + 1 file changed, 17 insertions(+) diff --git a/block.c b/block.c index 9f037db..63e4636 100644 --- a/block.c +++ b/block.c @@ -1310,6 +1310,23 @@ void

[Qemu-devel] [PATCH v24 04/12] Link backup into block core

2016-07-27 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: Changlong Xie Signed-off-by: Wang WeiWei Signed-off-by: zhanghailiang Signed-off-by: Gonglei Reviewed-by: Stefan Hajnoczi Reviewed-by: Jeff Cody

[Qemu-devel] [PATCH v24 09/12] Implement new driver for block replication

2016-07-27 Thread Changlong Xie
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/Makefile.objs | 1 + block/replication.c | 659 2 files changed, 660

[Qemu-devel] [PATCH v24 06/12] auto complete active commit

2016-07-27 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 Signed-off-by: Wang WeiWei --- block/mirror.c| 13 + blockdev.c| 2 +- include/block/block_int.h

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

2016-07-27 Thread Changlong Xie
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 ++ include/block/block_backup.h | 25 + 2 files changed

[Qemu-devel] [PATCH v24 00/12] Block replication for continuous checkpoints

2016-07-27 Thread Changlong Xie
en if there are too many I/O requests. V4: 1. Introduce a new driver replication to avoid touch nbd and qcow2. V3: 1: use error_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

[Qemu-devel] [PATCH v24 05/12] docs: block replication's description

2016-07-27 Thread Changlong Xie
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 --- docs/block-replication.txt | 239 + 1 file changed, 239 insertions(+) create mode

[Qemu-devel] [PATCH v24 07/12] configure: support replication

2016-07-27 Thread Changlong Xie
configure --(enable/disable)-replication to switch replication support on/off, and it is on by default. We later introduce replation support. Signed-off-by: Wen Congyang Signed-off-by: Changlong Xie Signed-off-by: Wang WeiWei --- configure | 11 +++ 1 file changed, 11 insertions

[Qemu-devel] [PATCH v24 03/12] Backup: export interfaces for extra serialization

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

[Qemu-devel] [PATCH v24 12/12] MAINTAINERS: add maintainer for replication

2016-07-27 Thread Changlong Xie
As per Stefan's suggestion, add Wen and I as co-maintainers of replication. Cc: Stefan Hajnoczi Signed-off-by: Wen Congyang Signed-off-by: Changlong Xie --- MAINTAINERS | 9 + 1 file changed, 9 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 1d0e2c3..25b9438 100644

[Qemu-devel] [PATCH v24 11/12] support replication driver in blockdev-add

2016-07-27 Thread Changlong Xie
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 Reviewed-by: Eric Blake --- qapi/block-core.json | 23 +-- 1 file changed, 21 insertions(+), 2 deletions(-) diff

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

2016-07-27 Thread Changlong Xie
Signed-off-by: Wen Congyang Signed-off-by: Changlong Xie Signed-off-by: Wang WeiWei --- tests/.gitignore | 1 + tests/Makefile.include | 4 + tests/test-replication.c | 575 +++ 3 files changed, 580 insertions(+) create mode 100644

[Qemu-devel] [PATCH v24 08/12] Introduce new APIs to do replication operation

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

Re: [Qemu-devel] [PATCH COLO-Frame v17 00/34] COarse-grain LOck-stepping(COLO) Virtual Machines for Non-stop Service (FT)

2016-07-28 Thread Changlong Xie
reminder. Since colo framework bases on replication, and the replication feature is #optional. Maybe you need check CONFIG_REPLICATION in your new version. https://github.com//Pating/qemu/tree/block-replication-v24, see "configure: support replication" Thanks -Xie

[Qemu-devel] [PATCH] virtio-blk: rename virtio_device_info to virtio_blk_info

2016-08-03 Thread Changlong Xie
The old one is confusing with @virtio_device_info in virtio.c, so make it more appropriate. Signed-off-by: Changlong Xie --- hw/block/virtio-blk.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c index 475a822..a3a9e63 100644

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

2016-07-06 Thread Changlong Xie
On 07/06/2016 03:21 PM, Andreas Färber wrote: Am 06.07.2016 um 07:52 schrieb Changlong Xie: Would any maintainer pick this one? Please in the future use just "qom:" in the subject. How to find out? Ok git log --oneline -- include/qom/object.h Useful git command, i'll ad

[Qemu-devel] [Question] How can we confirm hot-plug disk succesfully?

2017-06-18 Thread Xie Changlong
can we confirm hotplug('device_add') successfully? 2) It seems when hot-plug disk, we don't care acpiphp module status on the guest, am I right? 3) Why there is no DEVICE_ADDED like event? Any answer would be appreciated, thanks. -- Thanks -Xie

Re: [Qemu-devel] [Question] How can we confirm hot-plug disk succesfully?

2017-06-18 Thread Xie Changlong
Resend 在 6/18/2017 3:21 PM, Xie Changlong 写道: Hi all In device hot-remove scenario, if we don't probe acpiphp module on the guest, 'device_del' will never emit DEVICE_DELETED event(because guest will not write to __EJ0) . So we can confirm that hot-remove failed. But IIUC, th

Re: [Qemu-devel] [Question] How can we confirm hot-plug disk succesfully?

2017-06-19 Thread Xie Changlong
在 6/19/2017 3:27 PM, Kevin Wolf 写道: Am 18.06.2017 um 09:21 hat Xie Changlong geschrieben: In device hot-remove scenario, if we don't probe acpiphp module on the guest, 'device_del' will never emit DEVICE_DELETED event(because guest will not write to __EJ0) . So we can confirm

Re: [Qemu-devel] [Question] How can we confirm hot-plug disk succesfully?

2017-06-21 Thread Xie Changlong
nown that. BTW, is it possible to force destroy the BlockBackend in this situation? -- Thanks -Xie

Re: [Qemu-devel] [PATCH v3 15/20] backup: Switch block_backup.h to byte-based

2017-06-27 Thread Xie Changlong
--- include/block/block_backup.h | 11 +-- block/backup.c | 33 - block/replication.c | 12 Reviewed-by: Xie Changlong 3 files changed, 29 insertions(+), 27 deletions(-) diff --git a/include/block/block_backup.h b/include

Re: [Qemu-devel] [PATCH v3 20/20] block: Make bdrv_is_allocated_above() byte-based

2017-06-27 Thread Xie Changlong
o.c| 42 -- block/mirror.c| 5 - block/replication.c | 17 - For replication part: Reviewed-by: Xie Changlong block/stream.c| 21 + qemu-img.c| 10 +++--- 7 fi

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

2017-04-17 Thread Xie Changlong
On 04/18/2017 09:36 AM, Hailiang Zhang wrote: 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

[Qemu-devel] [PATCH] MAINTAINERS: update Wen's email address

2017-04-17 Thread Changlong Xie
So he can get CC'ed on future patches and bugs for this feature Signed-off-by: Changlong Xie --- MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index c60235e..5638992 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1817,7 +1817,7

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

2017-04-17 Thread Xie Changlong
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 --- v4: - Add proper comment for primary_disk (Stefan) v2: - Move g_free(s->shared_disk_id) to the common

<    1   2   3   4   5   6   7   >