[Qemu-devel] [PATCH v7 05/10] file-posix: Implement bdrv_co_copy_range

2018-05-29 Thread Fam Zheng
With copy_file_range(2), we can implement the bdrv_co_copy_range semantics. Signed-off-by: Fam Zheng Reviewed-by: Stefan Hajnoczi --- block/file-posix.c | 96 +++-- include/block/raw-aio.h | 10 -- 2 files changed, 101 insertions(+), 5

[Qemu-devel] [PATCH v7 06/10] iscsi: Query and save device designator when opening

2018-05-29 Thread Fam Zheng
The device designator data returned in INQUIRY command will be useful to fill in source/target fields during copy offloading. Do this when connecting to the target and save the data for later use. Signed-off-by: Fam Zheng Reviewed-by: Stefan Hajnoczi --- block/iscsi.c| 41

[Qemu-devel] [PATCH v7 10/10] qemu-img: Convert with copy offloading

2018-05-29 Thread Fam Zheng
The new blk_co_copy_range interface offers a more efficient way in the case of network based storage. Make use of it to allow faster convert operation. Since copy offloading cannot do zero detection ('-S') and compression (-c), only try it when these options are not used. Signed-off-by: Fam

[Qemu-devel] [PATCH v7 02/10] raw: Check byte range uniformly

2018-05-29 Thread Fam Zheng
So there is no visible behavior change in adding the check code. The int64_t -> uint64_t inconsistency, as shown by the type casting, is pre-existing due to the interface. Reviewed-by: Stefan Hajnoczi Reviewed-by: Eric Blake Signed-off-by: Fam Zheng --- block/raw-format.

[Qemu-devel] [PATCH v7 04/10] qcow2: Implement copy offloading

2018-05-29 Thread Fam Zheng
igned-off-by: Fam Zheng --- block/qcow2.c | 229 ++ 1 file changed, 199 insertions(+), 30 deletions(-) diff --git a/block/qcow2.c b/block/qcow2.c index 6d532470a8..8f89c4fe72 100644 --- a/block/qcow2.c +++ b/block/qcow2.c @@ -1762,6 +1762,39

[Qemu-devel] [PATCH v7 07/10] iscsi: Create and use iscsi_co_wait_for_task

2018-05-29 Thread Fam Zheng
This loop is repeated a growing number times. Make a helper. Signed-off-by: Fam Zheng Reviewed-by: Stefan Hajnoczi Reviewed-by: Eric Blake --- block/iscsi.c | 54 +- 1 file changed, 17 insertions(+), 37 deletions(-) diff --git a/block

[Qemu-devel] [PATCH v7 09/10] block-backend: Add blk_co_copy_range

2018-05-29 Thread Fam Zheng
It's a BlockBackend wrapper of the BDS interface. Signed-off-by: Fam Zheng Reviewed-by: Stefan Hajnoczi --- block/block-backend.c | 18 ++ include/sysemu/block-backend.h | 4 2 files changed, 22 insertions(+) diff --git a/block/block-backend.c b/block/block

[Qemu-devel] [PATCH v7 03/10] raw: Implement copy offloading

2018-05-29 Thread Fam Zheng
Just pass down to ->file. Signed-off-by: Fam Zheng Reviewed-by: Stefan Hajnoczi --- block/raw-format.c | 32 1 file changed, 32 insertions(+) diff --git a/block/raw-format.c b/block/raw-format.c index b69a0674b3..f2e468df6f 100644 --- a/block/raw-forma

[Qemu-devel] [PATCH v7 00/10] qemu-img convert with copy offloading

2018-05-29 Thread Fam Zheng
-img convert, we can emulate offloading in scsi-disk (handle EXTENDED COPY command), and use the API in block jobs too. Fam Zheng (10): block: Introduce API for copy offloading raw: Check byte range uniformly raw: Implement copy offloading qcow2: Implement copy offloading file-posix

[Qemu-devel] [PATCH v7 01/10] block: Introduce API for copy offloading

2018-05-29 Thread Fam Zheng
copy_file_range(2). Signed-off-by: Fam Zheng Reviewed-by: Stefan Hajnoczi --- block/io.c| 97 +++ include/block/block.h | 32 include/block/block_int.h | 38 +++ 3 files changed, 167 insertions

Re: [Qemu-devel] [PATCH v6 04/10] qcow2: Implement copy offloading

2018-05-28 Thread Fam Zheng
On Mon, 05/28 11:36, Fam Zheng wrote: > The two callbacks are implemented quite similarly to the read/write > functions: bdrv_co_copy_range_from maps for read and calls into bs->file > or bs->backing depending on the allocation status; bdrv_co_copy_range_to > maps for write and c

Re: [Qemu-devel] [PATCH v5 43/49] docker: move debian-powerpc-cross to sid based build

2018-05-28 Thread Fam Zheng
an8.docker > b/tests/docker/dockerfiles/debian8.docker > index 1bcf2e3d2f..52945631cd 100644 > --- a/tests/docker/dockerfiles/debian8.docker > +++ b/tests/docker/dockerfiles/debian8.docker > @@ -32,6 +32,3 @@ RUN DEBIAN_FRONTEND=noninteractive eatmydata \ > pkg-config \ > python-minimal > > -# Setup Emdebian [emdebian-archive-keyring] > -RUN echo "deb http://emdebian.org/tools/debian/ jessie main" > > /etc/apt/sources.list.d/emdebian.list && \ > -curl http://emdebian.org/tools/debian/emdebian-toolchain-archive.key | > apt-key add - > -- > 2.17.0 > Nice clean up! Reviewed-by: Fam Zheng <f...@redhat.com>

[Qemu-devel] [PATCH v6 08/10] iscsi: Implement copy offloading

2018-05-27 Thread Fam Zheng
Issue EXTENDED COPY (LID1) command to implement the copy_range API. The parameter data construction code is modified from libiscsi's iscsi-dd.c. Signed-off-by: Fam Zheng <f...@redhat.com> Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com> --- block/iscsi.c

[Qemu-devel] [PATCH v6 09/10] block-backend: Add blk_co_copy_range

2018-05-27 Thread Fam Zheng
It's a BlockBackend wrapper of the BDS interface. Signed-off-by: Fam Zheng <f...@redhat.com> Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com> --- block/block-backend.c | 18 ++ include/sysemu/block-backend.h | 4 2 files changed, 22 insertions(+)

[Qemu-devel] [PATCH v6 04/10] qcow2: Implement copy offloading

2018-05-27 Thread Fam Zheng
zi <stefa...@redhat.com> Signed-off-by: Fam Zheng <f...@redhat.com> --- block/qcow2.c | 226 ++ 1 file changed, 196 insertions(+), 30 deletions(-) diff --git a/block/qcow2.c b/block/qcow2.c index 6d532470a8..e32a3c1518 100644 --- a/bloc

[Qemu-devel] [PATCH v6 10/10] qemu-img: Convert with copy offloading

2018-05-27 Thread Fam Zheng
The new blk_co_copy_range interface offers a more efficient way in the case of network based storage. Make use of it to allow faster convert operation. Since copy offloading cannot do zero detection ('-S') and compression (-c), only try it when these options are not used. Signed-off-by: Fam

[Qemu-devel] [PATCH v6 07/10] iscsi: Create and use iscsi_co_wait_for_task

2018-05-27 Thread Fam Zheng
This loop is repeated a growing number times. Make a helper. Signed-off-by: Fam Zheng <f...@redhat.com> Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com> Reviewed-by: Eric Blake <ebl...@redhat.com> --- block/iscsi.c | 54 +-

[Qemu-devel] [PATCH v6 02/10] raw: Check byte range uniformly

2018-05-27 Thread Fam Zheng
So there is no visible behavior change in adding the check code. The int64_t -> uint64_t inconsistency, as shown by the type casting, is pre-existing due to the interface. Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com> Reviewed-by: Eric Blake <ebl...@redhat.com> Signed-off-by: Fam Zhen

[Qemu-devel] [PATCH v6 03/10] raw: Implement copy offloading

2018-05-27 Thread Fam Zheng
Just pass down to ->file. Signed-off-by: Fam Zheng <f...@redhat.com> Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com> --- block/raw-format.c | 32 1 file changed, 32 insertions(+) diff --git a/block/raw-format.c b/block/raw-format.c i

[Qemu-devel] [PATCH v6 06/10] iscsi: Query and save device designator when opening

2018-05-27 Thread Fam Zheng
The device designator data returned in INQUIRY command will be useful to fill in source/target fields during copy offloading. Do this when connecting to the target and save the data for later use. Signed-off-by: Fam Zheng <f...@redhat.com> Reviewed-by: Stefan Hajnoczi <stefa...@r

[Qemu-devel] [PATCH v6 05/10] file-posix: Implement bdrv_co_copy_range

2018-05-27 Thread Fam Zheng
With copy_file_range(2), we can implement the bdrv_co_copy_range semantics. Signed-off-by: Fam Zheng <f...@redhat.com> Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com> --- block/file-posix.c | 96 +++-- include/block/raw-aio.h |

[Qemu-devel] [PATCH v6 00/10] qemu-img convert with copy offloading

2018-05-27 Thread Fam Zheng
can emulate offloading in scsi-disk (handle EXTENDED COPY command), and use the API in block jobs too. Fam Zheng (10): block: Introduce API for copy offloading raw: Check byte range uniformly raw: Implement copy offloading qcow2: Implement copy offloading file-posix: Implement

[Qemu-devel] [PATCH v6 01/10] block: Introduce API for copy offloading

2018-05-27 Thread Fam Zheng
copy_file_range(2). Signed-off-by: Fam Zheng <f...@redhat.com> Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com> --- block/io.c| 97 +++ include/block/block.h | 32 include/block/bloc

Re: [Qemu-devel] [PATCH] nvme: Make nvme_init error handling code more readable

2018-05-25 Thread Fam Zheng
On Fri, 05/25 07:47, Markus Armbruster wrote: > Fam Zheng <f...@redhat.com> writes: > > > On Thu, 05/24 19:16, Paolo Bonzini wrote: > >> On 21/05/2018 08:35, Fam Zheng wrote: > >> > Coverity doesn't like the tests under fail label (report CID 1385847).

Re: [Qemu-devel] [PATCH 0/5] Acceptance/functional tests

2018-05-25 Thread Fam Zheng
On Thu, 05/24 20:58, Cleber Rosa wrote: > TL;DR > = > > Another version, with a minimalist approach, to the acceptance tests > infrastructure for QEMU, based on the Avocado Testing Framework. > > Background > == > > The previous version, still considered an RFC, was sent to the list

Re: [Qemu-devel] [PATCH 4/5] scripts/qemu.py: introduce set_console() method

2018-05-24 Thread Fam Zheng
On Thu, 05/24 20:58, Cleber Rosa wrote: > The set_console() method is intended to ease higher level use cases > that require a console device. > > The amount of inteligence is limited on purpose, requiring either the > device type explicitly, or the existence of a machine (pattern) > definition.

Re: [Qemu-devel] [PATCH 3/5] Acceptance tests: add quick VNC tests

2018-05-24 Thread Fam Zheng
On Thu, 05/24 20:58, Cleber Rosa wrote: > This patch adds a few simple behavior tests for VNC. These tests > introduce manipulation of the QEMUMachine arguments, by setting > the arguments, instead of adding to the existing ones. I'm confused by this. The code uses 'add_args', so it does add to

Re: [Qemu-devel] [PATCH 1/5] Add functional/acceptance tests infrastructure

2018-05-24 Thread Fam Zheng
On Thu, 05/24 20:58, Cleber Rosa wrote: > This patch adds the very minimum infrastructure necessary for writing > and running functional/acceptance tests, including: > > * Documentation > * The avocado_qemu.Test base test class > * One example tests (test_version.py) > > Additional

Re: [Qemu-devel] [PATCH] nvme: Make nvme_init error handling code more readable

2018-05-24 Thread Fam Zheng
On Thu, 05/24 19:16, Paolo Bonzini wrote: > On 21/05/2018 08:35, Fam Zheng wrote: > > Coverity doesn't like the tests under fail label (report CID 1385847). > > Reset the fields so the clean up order is more apparent. > > > > Signed-off-by: Fam Zheng <f...@redhat.

Re: [Qemu-devel] [PATCH v5 02/10] raw: Check byte range uniformly

2018-05-24 Thread Fam Zheng
On Wed, 05/23 13:28, Eric Blake wrote: > On 05/22/2018 10:04 PM, Fam Zheng wrote: > > We don't verify the request range against s->size in the I/O callbacks > > except for raw_co_pwritev. This is wrong (especially for > > raw_co_pwrite_zeroes and raw_co_pdiscard), so

Re: [Qemu-devel] [PATCH v2] nvme: Make nvme_init error handling code more readable

2018-05-24 Thread Fam Zheng
On Mon, 05/21 16:58, Fam Zheng wrote: > Coverity doesn't like the tests under fail label (report CID 1385847). > Reset the fields so the clean up order is more apparent. > > Signed-off-by: Fam Zheng <f...@redhat.com> Queued, thanks. Fam

Re: [Qemu-devel] [PATCH v2] tests/docker/Makefile.include: handle empty TARGET_LIST

2018-05-23 Thread Fam Zheng
On Mon, 05/21 11:35, Alex Bennée wrote: > If the user doesn't specify a TARGET_LIST they get the current > configuration but with spaces and hilarity ensues. This adds some make > magic to turn the TARGET_LIST back into a comma separated list. > > Signed-off-by: Alex Bennée

[Qemu-devel] [PATCH v5 09/10] block-backend: Add blk_co_copy_range

2018-05-22 Thread Fam Zheng
It's a BlockBackend wrapper of the BDS interface. Signed-off-by: Fam Zheng <f...@redhat.com> Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com> --- block/block-backend.c | 18 ++ include/sysemu/block-backend.h | 4 2 files changed, 22 insertions(+)

[Qemu-devel] [PATCH v5 10/10] qemu-img: Convert with copy offloading

2018-05-22 Thread Fam Zheng
The new blk_co_copy_range interface offers a more efficient way in the case of network based storage. Make use of it to allow faster convert operation. Since copy offloading cannot do zero detection ('-S') and compression (-c), only try it when these options are not used. Signed-off-by: Fam

[Qemu-devel] [PATCH v5 08/10] iscsi: Implement copy offloading

2018-05-22 Thread Fam Zheng
Issue EXTENDED COPY (LID1) command to implement the copy_range API. The parameter data construction code is modified from libiscsi's iscsi-dd.c. Signed-off-by: Fam Zheng <f...@redhat.com> Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com> --- block/iscsi.c

[Qemu-devel] [PATCH v5 07/10] iscsi: Create and use iscsi_co_wait_for_task

2018-05-22 Thread Fam Zheng
This loop is repeated a growing number times. Make a helper. Signed-off-by: Fam Zheng <f...@redhat.com> Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com> Reviewed-by: Eric Blake <ebl...@redhat.com> --- block/iscsi.c | 54 +-

[Qemu-devel] [PATCH v5 04/10] qcow2: Implement copy offloading

2018-05-22 Thread Fam Zheng
The two callbacks are implemented quite similarly to the read/write functions: bdrv_co_copy_range_from maps for read and calls into bs->file or bs->backing depending on the allocation status; bdrv_co_copy_range_to maps for write and calls into bs->file. Signed-off-by: Fam Zheng <f..

[Qemu-devel] [PATCH v5 06/10] iscsi: Query and save device designator when opening

2018-05-22 Thread Fam Zheng
The device designator data returned in INQUIRY command will be useful to fill in source/target fields during copy offloading. Do this when connecting to the target and save the data for later use. Signed-off-by: Fam Zheng <f...@redhat.com> Reviewed-by: Stefan Hajnoczi <stefa...@r

[Qemu-devel] [PATCH v5 05/10] file-posix: Implement bdrv_co_copy_range

2018-05-22 Thread Fam Zheng
With copy_file_range(2), we can implement the bdrv_co_copy_range semantics. Signed-off-by: Fam Zheng <f...@redhat.com> Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com> --- block/file-posix.c | 96 +++-- include/block/raw-aio.h |

[Qemu-devel] [PATCH v5 02/10] raw: Check byte range uniformly

2018-05-22 Thread Fam Zheng
We don't verify the request range against s->size in the I/O callbacks except for raw_co_pwritev. This is wrong (especially for raw_co_pwrite_zeroes and raw_co_pdiscard), so fix them. Signed-off-by: Fam Zheng <f...@redhat.com> --- block/raw-form

[Qemu-devel] [PATCH v5 00/10] qemu-img convert with copy offloading

2018-05-22 Thread Fam Zheng
the API in block jobs too. Fam Zheng (10): block: Introduce API for copy offloading raw: Check byte range uniformly raw: Implement copy offloading qcow2: Implement copy offloading file-posix: Implement bdrv_co_copy_range iscsi: Query and save device designator when opening iscsi

[Qemu-devel] [PATCH v5 01/10] block: Introduce API for copy offloading

2018-05-22 Thread Fam Zheng
copy_file_range(2). Signed-off-by: Fam Zheng <f...@redhat.com> Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com> --- block/io.c| 97 +++ include/block/block.h | 32 include/block/bloc

[Qemu-devel] [PATCH v5 03/10] raw: Implement copy offloading

2018-05-22 Thread Fam Zheng
Just pass down to ->file. Signed-off-by: Fam Zheng <f...@redhat.com> Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com> --- block/raw-format.c | 32 1 file changed, 32 insertions(+) diff --git a/block/raw-format.c b/block/raw-format.c i

Re: [Qemu-devel] [PATCH v2 2/3] qemu-iotests: Filter NFS paths

2018-05-22 Thread Fam Zheng
ST_IMG="ssh://127.0.0.1$TEST_IMG_FILE" > elif [ "$IMGPROTO" = "nfs" ]; then > TEST_IMG_FILE=$TEST_DIR/t.$IMGFMT > +REMOTE_TEST_DIR="nfs://127.0.0.1$TEST_DIR" > TEST_IMG="nfs://127.0.0.1$TEST_IMG_FILE" >

Re: [Qemu-devel] [PATCH v2 3/3] qemu-iotests: 086 doesn't work with NFS

2018-05-22 Thread Fam Zheng
On Fri, 05/18 16:26, Kevin Wolf wrote: > The reference output file only works for file. 'qemu-img convert -p' > makes a lot more progress updates for NFS than for file, so disable the > test for NFS. > > Signed-off-by: Kevin Wolf <kw...@redhat.com> Reviewed-by: Fam Zheng <f...@redhat.com>

Re: [Qemu-devel] [PATCH v2 1/3] qemu-iotests: Fix paths for NFS

2018-05-22 Thread Fam Zheng
hat.com> Reviewed-by: Fam Zheng <f...@redhat.com>

Re: [Qemu-devel] [PATCH 1/2] sheepdog: cleanup repeated expression

2018-05-22 Thread Fam Zheng
On Tue, 05/22 22:10, Paolo Bonzini wrote: > The expression "SD_INODE_SIZE - sizeof(inode.data_vdi_id)" already has a macro > defined for the same value (though with a nicer definition using offsetof). > Replace it. > > Signed-off-by: Paolo Bonzini <pbonz...@redhat.com

Re: [Qemu-devel] storing machine data in qcow images?

2018-05-22 Thread Fam Zheng
On Tue, 05/22 17:02, Kevin Wolf wrote: > Am 22.05.2018 um 16:19 hat Michael S. Tsirkin geschrieben: > > On Tue, May 22, 2018 at 09:35:55AM +0200, Gerd Hoffmann wrote: > > > Hi, > > > > > > > You must /sometimes/ supply the correct machine type. > > > > > > > > It is quite dependent on the

Re: [Qemu-devel] [PATCH 2/2] sheepdog: remove huge BSS object

2018-05-22 Thread Fam Zheng
On Tue, 05/22 22:10, Paolo Bonzini wrote: > block/sheepdog.o has a 4M static variable that is 90% of QEMU's whole .bss > section. Replace it with a heap-allocated block, and make it smaller too > since only the inode header is actually being used. > > bss size goes down from 4464280 to 269976. >

[Qemu-devel] [PATCH v2] nvme: Make nvme_init error handling code more readable

2018-05-21 Thread Fam Zheng
Coverity doesn't like the tests under fail label (report CID 1385847). Reset the fields so the clean up order is more apparent. Signed-off-by: Fam Zheng <f...@redhat.com> --- v2: Don't play stupid. [Peter] --- block/nvme.c | 4 1 file changed, 4 insertions(+) diff --git a/block/nv

Re: [Qemu-devel] [PATCH] nvme: Make nvme_init error handling code more readable

2018-05-21 Thread Fam Zheng
On Mon, 05/21 09:35, Peter Maydell wrote: > On 21 May 2018 at 07:35, Fam Zheng <f...@redhat.com> wrote: > > Coverity doesn't like the tests under fail label (report CID 1385847). > > Reset the fields so the clean up order is more apparent. > > > > Signed-o

[Qemu-devel] [PATCH] nvme: Make nvme_init error handling code more readable

2018-05-21 Thread Fam Zheng
Coverity doesn't like the tests under fail label (report CID 1385847). Reset the fields so the clean up order is more apparent. Signed-off-by: Fam Zheng <f...@redhat.com> --- block/nvme.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/block/nvme.c b/block/nvme.c index 6f71

Re: [Qemu-devel] [PULL 1/1] block/nvme: fix Coverity reports

2018-05-21 Thread Fam Zheng
On Fri, 05/18 19:01, Peter Maydell wrote: > On 1 March 2018 at 07:54, Fam Zheng <f...@redhat.com> wrote: > > From: Paolo Bonzini <pbonz...@redhat.com> > > > > 1) string not null terminated in sysfs_find_group_file > > > > 2) NULL pointer der

Re: [Qemu-devel] [PATCH] tests/docker/Makefile.include: handle empty TARGET_LIST

2018-05-20 Thread Fam Zheng
On Fri, 05/18 16:22, Alex Bennée wrote: > If the user doesn't specify a TARGET_LIST they get the current > configuration but with spaces and hilarity ensues. This adds some make > magic to turn the TARGET_LIST back into a comma separated list. > > Signed-off-by: Alex Bennée

Re: [Qemu-devel] [PATCH v2 1/1] tests/docker: Add a Avocado Docker test

2018-05-20 Thread Fam Zheng
On Fri, 05/18 11:34, Alistair Francis wrote: > Avocado is not trivial to setup on non-Fedora systems. To simplfying > future testing add a docker test image that runs Avocado tests. > > Signed-off-by: Alistair Francis > --- > v2: > - Add a seperate fedora-avocado

[Qemu-devel] [PULL 2/2] iothread: fix epollfd leak in the process of delIOThread

2018-05-18 Thread Fam Zheng
; Message-Id: <1526517763-11108-1-git-send-email-wangji...@huawei.com> Reviewed-by: Fam Zheng <f...@redhat.com> Reviewed-by: Peter Xu <pet...@redhat.com> [Mention change to aio_epoll_disable in commit message. - Fam] Signed-off-by: Fam Zheng <f...@redhat.com> --- include/block/a

[Qemu-devel] [PULL 1/2] docker: Fix trivial typo

2018-05-18 Thread Fam Zheng
From: Philippe Mathieu-Daudé <f4...@amsat.org> Signed-off-by: Philippe Mathieu-Daudé <f4...@amsat.org> Message-Id: <20180508144358.13530-1-f4...@amsat.org> Reviewed-by: Laurent Vivier <laur...@vivier.eu> Signed-off-by: Fam Zheng <f...@redhat.com> --- tests/docker/M

[Qemu-devel] [PULL 0/2] Docker and block patches

2018-05-18 Thread Fam Zheng
The following changes since commit a4207e3b00e89f934adb231057dcf9a75ac2ae45: Merge remote-tracking branch 'remotes/cody/tags/block-pull-request' into staging (2018-05-17 11:59:50 +0100) are available in the Git repository at: git://github.com/famz/qemu.git

Re: [Qemu-devel] Ping? Re: [PATCH v6 2/2] iothread: let aio_epoll_disable fit to aio_context_destroy

2018-05-18 Thread Fam Zheng
On Fri, 05/18 16:24, WangJie (Pluto) wrote: > Ping I'll send a pull request with v5. Fam

Re: [Qemu-devel] [RFC 00/10] [TESTING NEEDED] python: futurize --stage1 (Python 3 compatibility)

2018-05-17 Thread Fam Zheng
es look good to me: Acked-by: Fam Zheng <f...@redhat.com>

Re: [Qemu-devel] [PATCH v6 2/2] iothread: let aio_epoll_disable fit to aio_context_destroy

2018-05-16 Thread Fam Zheng
On Thu, 05/17 10:26, Jie Wang wrote: > epoll_available will only be set if epollfd != -1, os we s/os/so/ > can swap the two variables in aio_epoll_disable, and > aio_context_destroy can call aio_epoll_disable directly. If you put this as 1/2 in v7, you do not want to mention the

Re: [Qemu-devel] [PATCH v6 1/2] iothread: fix epollfd leak in the process of delIOThread

2018-05-16 Thread Fam Zheng
Thanks for the quick iterations. A note on the patch submission: When sending patch series with git, please use git-send-email's "--thread --no-chain-reply-to" options, and also create a cover letter using "git format-patch --cover-letter". Or you can use git-publish. For more complete

Re: [Qemu-devel] [PATCH v5] iothread: fix epollfd leak in the process of delIOThread

2018-05-16 Thread Fam Zheng
> @@ -298,6 +298,7 @@ aio_ctx_finalize(GSource *source) > qemu_rec_mutex_destroy(>lock); > qemu_lockcnt_destroy(>list_lock); > timerlistgroup_deinit(>tlg); > +aio_context_destroy(ctx); > } > > static GSourceFuncs aio_source_funcs = { > -- > 1.8.3.1 > Reviewed-by: Fam Zheng <f...@redhat.com>

Re: [Qemu-devel] [PATCH v4] iothread: fix epollfd leak in the process of delIOThread

2018-05-16 Thread Fam Zheng
On Wed, 05/16 19:43, Peter Xu wrote: > On Wed, May 16, 2018 at 07:14:53PM +0800, WangJie (Pluto) wrote: > > Hi, Peter Xu: > > If call aio_epoll_disable() here, aio_epoll_disable() will return > > before close ctx->epollfd, > > Because the ctx->epoll_enabled is false in the moment. > >

Re: [Qemu-devel] Restoring bitmaps after failed/cancelled migration

2018-05-16 Thread Fam Zheng
ementsov-Ogievskiy geschrieben: > > > > > 14.05.2018 09:41, Fam Zheng wrote: > > > > > > On Wed, 04/18 17:00, Vladimir Sementsov-Ogievskiy wrote: > > > > > > > Is it possible, that target will change the disk, and then we > > > > &g

Re: [Qemu-devel] [PATCH v2] iothread: fix epollfd leak in the process of delIOThread

2018-05-16 Thread Fam Zheng
On Wed, 05/16 14:39, Jie Wang wrote: > From: w00251574 > > When we call addIOThread, the epollfd created in aio_context_setup, > but not close it in the process of delIOThread, so the epollfd will leak. > > Signed-off-by: Jie Wang > --- >

Re: [Qemu-devel] [PATCH v6 0/4] slirp: Add query-usernet QMP command

2018-05-15 Thread Fam Zheng
On Fri, 05/04 15:42, Fam Zheng wrote: > v6: Rename QAPI enum: TCPS -> UsernetTcpState. [Daniel] Ping? Fam

Re: [Qemu-devel] [PATCH] iothread: fix epollfd leak in the process of delIOThread

2018-05-15 Thread Fam Zheng
On Tue, 05/15 20:00, Jie Wang wrote: > When we call addIOThread, the epollfd created in aio_context_setup, > but not close it in the process of delIOThread, so the epollfd will leak. > > Signed-off-by: Jie Wang > --- > iothread.c | 1 + > 1 file changed, 1 insertion(+) >

[Qemu-devel] [PATCH v2 4/4] iotests: Add VMDK tests for blockdev-create

2018-05-15 Thread Fam Zheng
Signed-off-by: Fam Zheng <f...@redhat.com> --- tests/qemu-iotests/214 | 268 +++ tests/qemu-iotests/214.out | 304 + tests/qemu-iotests/group | 1 + 3 files changed, 573 insertions(+) create mode 100755

[Qemu-devel] [PATCH v2 3/4] iotests: Filter cid numbers in VMDK extent info

2018-05-15 Thread Fam Zheng
Signed-off-by: Fam Zheng <f...@redhat.com> --- tests/qemu-iotests/common.filter | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/qemu-iotests/common.filter b/tests/qemu-iotests/common.filter index c5f4bcf578..0debefed18 100644 --- a/tests/qemu-iotests/common.filter +++ b/test

[Qemu-devel] [PATCH v2 2/4] vmdk: Implement .bdrv_co_create callback

2018-05-15 Thread Fam Zheng
ialization. The QAPI command parameters are mostly the same as the old create_opts except the dropped legacy @compat6 switch, which is redundant with @hwversion. Signed-off-by: Fam Zheng <f...@redhat.com> --- block/vmdk.c | 461 -- qapi/block-

[Qemu-devel] [PATCH v2 0/4] vmdk: Implement x-blockdev-create

2018-05-15 Thread Fam Zheng
, but that isn't standardized, therefore it is not documented as part of this API. Extraneous extents in the end of the provided array are ignored. A big part of the patch is refactoring so that BlockdevRef parsing can be hooked in. Please review! Thanks. Fam Zheng (4): vmdk: Refactor vmdk_create_extent

[Qemu-devel] [PATCH v2 1/4] vmdk: Refactor vmdk_create_extent

2018-05-15 Thread Fam Zheng
in the next patch. Signed-off-by: Fam Zheng <f...@redhat.com> --- block/vmdk.c | 71 +--- 1 file changed, 44 insertions(+), 27 deletions(-) diff --git a/block/vmdk.c b/block/vmdk.c index 84f8bbe480..083942f806 100644 --- a/block/v

Re: [Qemu-devel] Restoring bitmaps after failed/cancelled migration

2018-05-14 Thread Fam Zheng
On Mon, 05/14 13:23, Vladimir Sementsov-Ogievskiy wrote: > > So, you agree, that dropping all bitmaps after inactivation is good > > idea.. The second question, is it possible to not drop them? Is there a > > way, to check that disk was not changed after pair of > > inactivate-invalidate? I have

Re: [Qemu-devel] Restoring bitmaps after failed/cancelled migration

2018-05-14 Thread Fam Zheng
On Wed, 04/18 17:00, Vladimir Sementsov-Ogievskiy wrote: > Hi all. > > We now have the following problem: > > If dirty-bitmaps migration capability is enabled, persistance flag is > dropped for all migrated bitmaps, to prevent their storing to the storage on > inactivate. Why do we prevent

Re: [Qemu-devel] [PATCH v4 02/10] raw: Check byte range uniformly

2018-05-13 Thread Fam Zheng
On Fri, 05/11 08:59, Eric Blake wrote: > On 05/11/2018 07:08 AM, Fam Zheng wrote: > > We don't verify the request range against s->size in the I/O callbacks > > except for raw_co_pwritev. This is wrong (especially for > > raw_co_pwrite_zeroes and raw_co_pdiscard), so fix t

[Qemu-devel] [PATCH v4 10/10] qemu-img: Convert with copy offloading

2018-05-11 Thread Fam Zheng
The new blk_co_copy_range interface offers a more efficient way in the case of network based storage. Make use of it to allow faster convert operation. Since copy offloading cannot do zero detection ('-S') and compression (-c), only try it when these options are not used. Signed-off-by: Fam

[Qemu-devel] [PATCH v4 09/10] block-backend: Add blk_co_copy_range

2018-05-11 Thread Fam Zheng
It's a BlockBackend wrapper of the BDS interface. Signed-off-by: Fam Zheng <f...@redhat.com> Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com> --- block/block-backend.c | 18 ++ include/sysemu/block-backend.h | 4 2 files changed, 22 insertions(+)

[Qemu-devel] [PATCH v4 07/10] iscsi: Create and use iscsi_co_wait_for_task

2018-05-11 Thread Fam Zheng
This loop is repeated a growing number times. Make a helper. Signed-off-by: Fam Zheng <f...@redhat.com> Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com> Reviewed-by: Eric Blake <ebl...@redhat.com> --- block/iscsi.c | 54 +-

[Qemu-devel] [PATCH v4 08/10] iscsi: Implement copy offloading

2018-05-11 Thread Fam Zheng
Issue EXTENDED COPY (LID1) command to implement the copy_range API. The parameter data construction code is modified from libiscsi's iscsi-dd.c. Signed-off-by: Fam Zheng <f...@redhat.com> Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com> --- block/iscsi.c

[Qemu-devel] [PATCH v4 06/10] iscsi: Query and save device designator when opening

2018-05-11 Thread Fam Zheng
The device designator data returned in INQUIRY command will be useful to fill in source/target fields during copy offloading. Do this when connecting to the target and save the data for later use. Signed-off-by: Fam Zheng <f...@redhat.com> Reviewed-by: Stefan Hajnoczi <stefa...@r

[Qemu-devel] [PATCH v4 05/10] file-posix: Implement bdrv_co_copy_range

2018-05-11 Thread Fam Zheng
With copy_file_range(2), we can implement the bdrv_co_copy_range semantics. Signed-off-by: Fam Zheng <f...@redhat.com> --- block/file-posix.c | 96 +++-- include/block/raw-aio.h | 10 -- 2 files changed, 101 insertions(+), 5 deletions(-)

[Qemu-devel] [PATCH v4 03/10] raw: Implement copy offloading

2018-05-11 Thread Fam Zheng
Just pass down to ->file. Signed-off-by: Fam Zheng <f...@redhat.com> Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com> --- block/raw-format.c | 32 1 file changed, 32 insertions(+) diff --git a/block/raw-format.c b/block/raw-format.c i

[Qemu-devel] [PATCH v4 04/10] qcow2: Implement copy offloading

2018-05-11 Thread Fam Zheng
The two callbacks are implemented quite similarly to the read/write functions: bdrv_co_copy_range_from maps for read and calls into bs->file or bs->backing depending on the allocation status; bdrv_co_copy_range_to maps for write and calls into bs->file. Signed-off-by: Fam Zheng <f..

[Qemu-devel] [PATCH v4 01/10] block: Introduce API for copy offloading

2018-05-11 Thread Fam Zheng
copy_file_range(2). Signed-off-by: Fam Zheng <f...@redhat.com> --- block/io.c| 96 +++ include/block/block.h | 32 include/block/block_int.h | 38 +++ 3 files changed, 166 insertions(+) diff

[Qemu-devel] [PATCH v4 02/10] raw: Check byte range uniformly

2018-05-11 Thread Fam Zheng
We don't verify the request range against s->size in the I/O callbacks except for raw_co_pwritev. This is wrong (especially for raw_co_pwrite_zeroes and raw_co_pdiscard), so fix them. Signed-off-by: Fam Zheng <f...@redhat.com> --- block/raw-form

[Qemu-devel] [PATCH v4 00/10] qemu-img convert with copy offloading

2018-05-11 Thread Fam Zheng
and potentially more. As far as its usage goes, in addition to qemu-img convert, we can emulate offloading in scsi-disk (handle EXTENDED COPY command), and use the API in block jobs too. Fam Zheng (10): block: Introduce API for copy offloading raw: Check byte range uniformly raw: Implement copy

Re: [Qemu-devel] [PATCH v3 4/9] file-posix: Implement bdrv_co_copy_range

2018-05-11 Thread Fam Zheng
On Thu, 05/10 09:50, Stefan Hajnoczi wrote: > On Wed, May 09, 2018 at 10:58:10PM +0800, Fam Zheng wrote: > > +static off_t copy_file_range(int in_fd, off_t *in_off, int out_fd, > > + off_t *out_off, size_t len, unsigned int > > flag

Re: [Qemu-devel] [PATCH v3 2/9] raw: Implement copy offloading

2018-05-11 Thread Fam Zheng
On Wed, 05/09 10:17, Eric Blake wrote: > On 05/09/2018 09:58 AM, Fam Zheng wrote: > > Just pass down to ->file. > > > > Signed-off-by: Fam Zheng <f...@redhat.com> > > Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com> > > --- > > block/raw-f

Re: [Qemu-devel] [PATCH v3 3/9] qcow2: Implement copy offloading

2018-05-10 Thread Fam Zheng
On Thu, 05/10 10:25, Stefan Hajnoczi wrote: > On Wed, May 09, 2018 at 10:58:09PM +0800, Fam Zheng wrote: > > +static int qcow2_co_copy_range_from(BlockDriverState *bs, > > +BdrvChild *src, uint64_t src_offset, > > +

Re: [Qemu-devel] [PATCH v2 2/3] block/file-posix: File locking during creation

2018-05-09 Thread Fam Zheng
an explicit truncation to 0, and by taking the > appropriate file locks between those two steps. > > Signed-off-by: Max Reitz <mre...@redhat.com> Reviewed-by: Fam Zheng <f...@redhat.com>

[Qemu-devel] [PATCH v3 7/9] iscsi: Implement copy offloading

2018-05-09 Thread Fam Zheng
Issue EXTENDED COPY (LID1) command to implement the copy_range API. The parameter data construction code is modified from libiscsi's iscsi-dd.c. Signed-off-by: Fam Zheng <f...@redhat.com> --- block/iscsi.c| 228 +++ includ

[Qemu-devel] [PATCH v3 6/9] iscsi: Create and use iscsi_co_wait_for_task

2018-05-09 Thread Fam Zheng
This loop is repeated a growing number times. Make a helper. Signed-off-by: Fam Zheng <f...@redhat.com> --- block/iscsi.c | 54 +- 1 file changed, 17 insertions(+), 37 deletions(-) diff --git a/block/iscsi.c b/block/iscsi.c index 5811

[Qemu-devel] [PATCH v3 3/9] qcow2: Implement copy offloading

2018-05-09 Thread Fam Zheng
The two callbacks are implemented quite similarly to the read/write functions: bdrv_co_copy_range_from maps for read and calls into bs->file or bs->backing depending on the allocation status; bdrv_co_copy_range_to maps for write and calls into bs->file. Signed-off-by: Fam Zheng <f..

[Qemu-devel] [PATCH v3 9/9] qemu-img: Convert with copy offloading

2018-05-09 Thread Fam Zheng
as we are now a little more efficient on the actual file size. Signed-off-by: Fam Zheng <f...@redhat.com> --- qemu-img.c | 50 ++-- tests/qemu-iotests/178.out.qcow2 | 8 +++ 2 files changed, 52 insertions(+), 6 deletions(-) diff

[Qemu-devel] [PATCH v3 0/9] qemu-img convert with copy offloading

2018-05-09 Thread Fam Zheng
emulate offloading in scsi-disk (handle EXTENDED COPY command), and use the API in block jobs too. Fam Zheng (9): block: Introduce API for copy offloading raw: Implement copy offloading qcow2: Implement copy offloading file-posix: Implement bdrv_co_copy_range iscsi: Query and save device

[Qemu-devel] [PATCH v3 4/9] file-posix: Implement bdrv_co_copy_range

2018-05-09 Thread Fam Zheng
With copy_file_range(2), we can implement the bdrv_co_copy_range semantics. Signed-off-by: Fam Zheng <f...@redhat.com> --- block/file-posix.c | 94 +++-- include/block/raw-aio.h | 10 -- 2 files changed, 99 insertions(+), 5 deletions(-)

[Qemu-devel] [PATCH v3 5/9] iscsi: Query and save device designator when opening

2018-05-09 Thread Fam Zheng
The device designator data returned in INQUIRY command will be useful to fill in source/target fields during copy offloading. Do this when connecting to the target and save the data for later use. Signed-off-by: Fam Zheng <f...@redhat.com> --- block/iscsi.c

[Qemu-devel] [PATCH v3 8/9] block-backend: Add blk_co_copy_range

2018-05-09 Thread Fam Zheng
It's a BlockBackend wrapper of the BDS interface. Signed-off-by: Fam Zheng <f...@redhat.com> --- block/block-backend.c | 18 ++ include/sysemu/block-backend.h | 4 2 files changed, 22 insertions(+) diff --git a/block/block-backend.c b/block/block-backend.c

[Qemu-devel] [PATCH v3 1/9] block: Introduce API for copy offloading

2018-05-09 Thread Fam Zheng
Signed-off-by: Fam Zheng <f...@redhat.com> --- block/io.c| 91 +++ include/block/block.h | 4 +++ include/block/block_int.h | 30 3 files changed, 125 insertions(+) diff --git a/block/io.c b/block/io.c

<    1   2   3   4   5   6   7   8   9   10   >