Re: [Qemu-devel] [PATCH] qemu-img.c: Add examples section

2018-08-02 Thread Fam Zheng
On Thu, 08/02 20:50, John Arbuckle wrote: > Add an examples section to the help output. > > Signed-off-by: John Arbuckle > --- > qemu-img.c | 11 +++ > 1 file changed, 11 insertions(+) > > diff --git a/qemu-img.c b/qemu-img.c > index 1acddf693c..f77c82695d 100644 > --- a/qemu-img.c >

Re: [Qemu-devel] 'make vm-build-freebsd' don't work if KVM isn't enabled

2018-08-01 Thread Fam Zheng
On Mon, 07/30 16:20, Peter Maydell wrote: > On 30 July 2018 at 14:40, Peter Maydell wrote: > > On 30 July 2018 at 14:36, Peter Maydell wrote: > >> On 30 July 2018 at 14:23, Peter Maydell wrote: > >>> The tests in tests/vm/ seem to make some attempt to cope with the > >>> host system not

Re: [Qemu-devel] [PATCH for-3.1] s390x: remove 's390-squash-mcss' option

2018-08-01 Thread Fam Zheng
On Wed, Aug 1, 2018 at 9:18 PM Cornelia Huck wrote: > > On Wed, 1 Aug 2018 15:11:23 +0200 > Cornelia Huck wrote: > > > On Wed, 1 Aug 2018 14:54:51 +0200 > > Cornelia Huck wrote: > > > > > On Wed, 1 Aug 2018 18:21:27 +0800 > > > Fam Zheng wrote:

Re: [Qemu-devel] [PATCH for-3.1] s390x: remove 's390-squash-mcss' option

2018-08-01 Thread Fam Zheng
On Tue, 07/24 11:24, Cornelia Huck wrote: > diff --git a/hw/s390x/css-bridge.c b/hw/s390x/css-bridge.c > index a02d708239..1bd6c8b458 100644 > --- a/hw/s390x/css-bridge.c > +++ b/hw/s390x/css-bridge.c > @@ -106,7 +106,6 @@ VirtualCssBus *virtual_css_bus_init(void) > /* Create bus on bridge

Re: [Qemu-devel] [PATCH] scsi: mptsas: Mark as storage device

2018-07-31 Thread Fam Zheng
= "LSI SAS 1068"; > +set_bit(DEVICE_CATEGORY_STORAGE, dc->categories); > } > > static const TypeInfo mptsas_info = { > -- > 2.7.4 > Reviewed-by: Fam Zheng

Re: [Qemu-devel] [PATCH 0/2] iotests: Fix 226 on _my_ system

2018-07-27 Thread Fam Zheng
On Fri, Jul 27, 2018 at 6:04 PM Kevin Wolf wrote: > > Am 27.07.2018 um 11:24 hat Fam Zheng geschrieben: > > On Tue, 07/24 16:47, Fam Zheng wrote: > > > Something has locked /dev/null on my system (I still don't know what to > > > do with > > > the an

Re: [Qemu-devel] [PATCH RFC for-3.0-rc3 0/3] qemu-img: Disable copy offloading by default

2018-07-27 Thread Fam Zheng
On Fri, Jul 27, 2018 at 6:29 PM Kevin Wolf wrote: > > Am 27.07.2018 um 05:33 hat Fam Zheng geschrieben: > > Kevin pointed out that both glibc and kernel provides a slow fallback of > > copy_file_range which hurts thin provisioning. This is particularly true for > > thin

Re: [Qemu-devel] [PATCH 0/2] iotests: Fix 226 on _my_ system

2018-07-27 Thread Fam Zheng
On Tue, 07/24 16:47, Fam Zheng wrote: > Something has locked /dev/null on my system (I still don't know what to do > with > the annoying incapability of lslocks, or more precisely /proc/locks, on > inspecting OFD lock information), and as a result 226 cannot pass due to the > u

Re: [Qemu-devel] [PATCH] file-posix: Handle EINTR in preallocation=full write

2018-07-27 Thread Fam Zheng
On Fri, 07/27 14:53, Fam Zheng wrote: > Cc: qemu-sta...@nongnu.org > Signed-off-by: Fam Zheng Actually cc qemu-sta...@nongnu.org

Re: [Qemu-devel] [RFC PATCH] travis: Test out-of-tree builds

2018-07-27 Thread Fam Zheng
On Thu, 06/21 09:26, Philippe Mathieu-Daudé wrote: > Force one config to build 'out-of-tree' (object files and executables > are created in a tree outside the project source code). > > Signed-off-by: Philippe Mathieu-Daudé > --- > I noticed various out-of-tree issue in the last 2 merge windows.

[Qemu-devel] [PATCH] tests/vm: Add vm-build-all/vm-clean-all in help text

2018-07-27 Thread Fam Zheng
Suggested-by: Philippe Mathieu-Daudé Signed-off-by: Fam Zheng --- tests/vm/Makefile.include | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/vm/Makefile.include b/tests/vm/Makefile.include index 5daa2a3b73..9e19f8662f 100644 --- a/tests/vm/Makefile.include +++ b/tests/vm

Re: [Qemu-devel] [PATCH RFC 00/10] docker on non-x86 hosts

2018-07-27 Thread Fam Zheng
On Wed, 07/18 11:04, Alex Bennée wrote: > Hi, > > Our existing support for docker is fairly x86 centric. While docker > itself has support for multiple architectures not all architectures > are equal. For example Debian only packages the widest range of > cross-compilers in it's x86 images

Re: [Qemu-devel] [PATCH RFC 01/10] docker: rename docker-amd64 to docker-host

2018-07-27 Thread Fam Zheng
On Wed, 07/18 11:04, Alex Bennée wrote: > When building on non-x86 systems the base system will be correct so if > we avoid too many x86'isms in the install we can still use the image. > > Signed-off-by: Alex Bennée > --- > .../dockerfiles/{debian-amd64.docker => debian-host.docker} | 4 ++--

[Qemu-devel] [PATCH] file-posix: Handle EINTR in preallocation=full write

2018-07-27 Thread Fam Zheng
Cc: qemu-sta...@nongnu.org Signed-off-by: Fam Zheng --- block/file-posix.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/block/file-posix.c b/block/file-posix.c index ad299beb38..928b863ced 100644 --- a/block/file-posix.c +++ b/block/file-posix.c @@ -1646,6 +1646,9 @@ static int

[Qemu-devel] [PATCH RFC for-3.0-rc3 3/3] iotests: Add test for 'qemu-img convert -C' compatibility

2018-07-26 Thread Fam Zheng
Signed-off-by: Fam Zheng --- tests/qemu-iotests/082 | 8 tests/qemu-iotests/082.out | 11 +++ 2 files changed, 19 insertions(+) diff --git a/tests/qemu-iotests/082 b/tests/qemu-iotests/082 index a872f771a6..3e605d52d1 100755 --- a/tests/qemu-iotests/082 +++ b/tests/qemu

[Qemu-devel] [PATCH RFC for-3.0-rc3 2/3] qemu-img: Add -C option for convert with copy offloading

2018-07-26 Thread Fam Zheng
Signed-off-by: Fam Zheng --- qemu-img-cmds.hx | 2 +- qemu-img.c | 21 + qemu-img.texi| 8 +++- 3 files changed, 25 insertions(+), 6 deletions(-) diff --git a/qemu-img-cmds.hx b/qemu-img-cmds.hx index 69758fb6e8..1526f327a5 100644 --- a/qemu-img-cmds.hx +++ b

[Qemu-devel] [PATCH RFC for-3.0-rc3 1/3] Revert "qemu-img: Document copy offloading implications with -S and -c"

2018-07-26 Thread Fam Zheng
This reverts commit eb461485f4558e362fab905735b50987505bca44. Now that we introduce an explicit option, these implicit rules are not used. Signed-off-by: Fam Zheng --- qemu-img.texi | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/qemu-img.texi b/qemu-img.texi index

[Qemu-devel] [PATCH RFC for-3.0-rc3 0/3] qemu-img: Disable copy offloading by default

2018-07-26 Thread Fam Zheng
offloading explicitly. And mark it incompatible with "-S" and "-c". Fam Zheng (3): Revert "qemu-img: Document copy offloading implications with -S and -c" qemu-img: Add -C option for convert with copy offloading iotests: Add test for 'qemu-img convert -C' compati

Re: [Qemu-devel] [PATCH v3 0/3] arm: Add nRF51 SoC and micro:bit machine

2018-07-25 Thread Fam Zheng
On Thu, 07/26 12:06, Joel Stanley wrote: > v3: Rebase on Stefan's cortex-m0 series > Based-on: 20180725085944.11856-8-stefa...@redhat.com Correction: Based-on: 20180725085944.11856-1-stefa...@redhat.com (Point to the cover letter message) Fam

Re: [Qemu-devel] [PATCH v3 for 3.0 00/18] docker fixes (and one tcg test tweak)

2018-07-24 Thread Fam Zheng
On Tue, Jul 24, 2018 at 4:56 PM Alex Bennée wrote: > > > Fam Zheng writes: > > > On Mon, Jul 23, 2018 at 6:03 PM Alex Bennée wrote: > >> > >> > >> Alex Bennée writes: > >> > >> > Hi, > >> > > >> > I've

[Qemu-devel] [PATCH 1/2] docs: Describe using images in writing iotests

2018-07-24 Thread Fam Zheng
Signed-off-by: Fam Zheng --- docs/devel/testing.rst | 11 +++ 1 file changed, 11 insertions(+) diff --git a/docs/devel/testing.rst b/docs/devel/testing.rst index 5e19cd50da..8e1fa3a66e 100644 --- a/docs/devel/testing.rst +++ b/docs/devel/testing.rst @@ -255,6 +255,17 @@ comparable

[Qemu-devel] [PATCH 0/2] iotests: Fix 226 on _my_ system

2018-07-24 Thread Fam Zheng
locking, and add a doc text about using test images. Fam Zheng (2): docs: Describe using images in writing iotests iotests: Don't lock /dev/null in 226 docs/devel/testing.rst | 11 +++ tests/qemu-iotests/226 | 4 ++-- 2 files changed, 13 insertions(+), 2 deletions(-) -- 2.17.1

[Qemu-devel] [PATCH 2/2] iotests: Don't lock /dev/null in 226

2018-07-24 Thread Fam Zheng
On my system (Fedora 28), this script reports a 'failed to get "consistent read" lock' error. Following docs/devel/testing.rst, it's better to add locking=off here. Signed-off-by: Fam Zheng --- tests/qemu-iotests/226 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --g

Re: [Qemu-devel] [PATCH v3 for 3.0 00/18] docker fixes (and one tcg test tweak)

2018-07-24 Thread Fam Zheng
On Mon, Jul 23, 2018 at 6:03 PM Alex Bennée wrote: > > > Alex Bennée writes: > > > Hi, > > > > I've missed the boat for today's rc1 but I'd like to get this merged > > before rc2. The new docker.py change is technically new functionality > > but I'm counting it as a usability bug fix as it

Re: [Qemu-devel] [PATCH v3 for 3.0 17/18] docker: perform basic binfmt_misc validation in docker.py

2018-07-24 Thread Fam Zheng
On Wed, Jul 18, 2018 at 4:02 AM Alex Bennée wrote: > > Setting up binfmt_misc is outside of the scope of the docker.py script > but we can at least validate it with any given executable so we have a > more useful error message than the sed line of deboostrap failing > cryptically. > >

Re: [Qemu-devel] [PATCH v3 for 3.0 13/18] docker: add --hint to docker.py check

2018-07-24 Thread Fam Zheng
On Wed, Jul 18, 2018 at 4:03 AM Alex Bennée wrote: > > When a check fails we currently just report why we failed. This is not > totally helpful to people who want to boot-strap a new image. Add a > --hint option which we can pass down to give a bit more information. > > Signed-off-by: Alex Bennée

Re: [Qemu-devel] [PATCH] block: Don't lock /dev/null and /dev/zero automatically

2018-07-23 Thread Fam Zheng
On Mon, Jul 23, 2018 at 10:37 PM Max Reitz wrote: > > On 2018-07-23 03:56, Fam Zheng wrote: > > On Sun, Jul 22, 2018 at 10:06 PM Max Reitz wrote: > >> > >> On 2018-07-22 04:37, Fam Zheng wrote: > >>> On Sun, Jul 22, 2018 at 5:08 AM Max Reitz wrote: &g

Re: [Qemu-devel] qemu-system_x86-64 (32-bit binary) -M q35 can be crashed on viewing youtube.

2018-07-22 Thread Fam Zheng
On Mon, 07/23 03:42, Andrew Randrianasulu wrote: > It was crashing and crashing, so I tried to debug it a bit ... > > > valgrind --leak-check=yes /dev/shm/qemu/x86_64-softmmu/qemu-system-x86_64 > -display > sdl,gl=on -M q35 -soundhw > hda -cdrom

Re: [Qemu-devel] [PATCH] block: Don't lock /dev/null and /dev/zero automatically

2018-07-22 Thread Fam Zheng
On Sun, Jul 22, 2018 at 10:06 PM Max Reitz wrote: > > On 2018-07-22 04:37, Fam Zheng wrote: > > On Sun, Jul 22, 2018 at 5:08 AM Max Reitz wrote: > >> > >> On 2018-07-19 05:41, Fam Zheng wrote: > >>> On my Fedora 28, /dev/null is locked by some ot

Re: [Qemu-devel] [PATCH] block: Don't lock /dev/null and /dev/zero automatically

2018-07-21 Thread Fam Zheng
On Sun, Jul 22, 2018 at 5:08 AM Max Reitz wrote: > > On 2018-07-19 05:41, Fam Zheng wrote: > > On my Fedora 28, /dev/null is locked by some other process (couldn't > > inspect it due to the current lslocks limitation), so iotests 226 fails > > with some unexpected imag

Re: [Qemu-devel] [Qemu-block] [PATCH] block: Don't lock /dev/null and /dev/zero automatically

2018-07-21 Thread Fam Zheng
On Sat, Jul 21, 2018 at 12:35 AM Eric Blake wrote: > > On 07/20/2018 03:24 AM, Fam Zheng wrote: > I'm not familiar with /dev/nullb* - is that a typo? > > $ ll /dev/nullb* > ls: cannot access '/dev/nullb*': No such file or directory You probably have figured out already but

Re: [Qemu-devel] [Qemu-block] [PATCH] block: Don't lock /dev/null and /dev/zero automatically

2018-07-20 Thread Fam Zheng
On Thu, 07/19 13:57, John Snow wrote: > Should we instead modify the test in this case to not attempt to take a > lock on a device we know cannot meaningfully store state, or is it your > preference to attempt to maintain such a list in the raw driver itself? > > I guess we never want QEMU to try

Re: [Qemu-devel] [PATCH] hw/block/nvme: add optional parameter num_namespaces for nvme device

2018-07-19 Thread Fam Zheng
On Thu, 07/19 12:33, Weiping Zhang wrote: > Add an optional paramter num_namespaces for device, and set it > to 1 by default. > > Signed-off-by: Weiping Zhang > --- > hw/block/nvme.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/hw/block/nvme.c b/hw/block/nvme.c

[Qemu-devel] [PATCH] block: Don't lock /dev/null and /dev/zero automatically

2018-07-18 Thread Fam Zheng
-by: Fam Zheng --- block/file-posix.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/block/file-posix.c b/block/file-posix.c index 60af4b3d51..8bf034108a 100644 --- a/block/file-posix.c +++ b/block/file-posix.c @@ -503,7 +503,12 @@ static int raw_open_common

[Qemu-devel] [PATCH] file-posix: Skip effectiveless OFD lock operations

2018-07-18 Thread Fam Zheng
changes. This patch is an easy fix to this and the change is regardlessly reasonable, so do it. Signed-off-by: Fam Zheng --- block/file-posix.c | 27 +-- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/block/file-posix.c b/block/file-posix.c index 60af4b3d51

Re: [Qemu-devel] [PATCH 3/5] tests/vm: Do not abuse parallelism when KVM is not available

2018-07-17 Thread Fam Zheng
On Mon, 07/16 23:48, Philippe Mathieu-Daudé wrote: > Signed-off-by: Philippe Mathieu-Daudé > --- > tests/vm/basevm.py | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/tests/vm/basevm.py b/tests/vm/basevm.py > index 1f4ad04c32..715e433142 100755 > ---

Re: [Qemu-devel] [PATCH v3 4/4] tests: Add centos VM testing

2018-07-15 Thread Fam Zheng
On Sun, 07/15 22:34, Philippe Mathieu-Daudé wrote: > Hi Fam, > > On 07/11/2018 10:28 PM, Fam Zheng wrote: > > This one does docker testing in the VM. It is intended to replace the > > native docker testing on patchew testers. > > > > Signed-off-by:

[Qemu-devel] [PATCH] tests: vm: Add vm-clean-all

2018-07-15 Thread Fam Zheng
The images are big. Add a rule to clean up easily. Suggested-by: Philippe Mathieu-Daudé Signed-off-by: Fam Zheng --- tests/vm/Makefile.include | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/vm/Makefile.include b/tests/vm/Makefile.include index 5daa2a3b73

Re: [Qemu-devel] [PATCH v3 4/4] tests: Add centos VM testing

2018-07-13 Thread Fam Zheng
On Thu, 07/12 12:02, Philippe Mathieu-Daudé wrote: > Hi Fam, > > On 07/11/2018 10:28 PM, Fam Zheng wrote: > > This one does docker testing in the VM. It is intended to replace the > > native docker testing on patchew testers. > > > > Signed-off-by:

[Qemu-devel] [PATCH v2] nvme: Fix nvme_init error handling

2018-07-11 Thread Fam Zheng
ose(). A third problem is nvme_close() misses g_free() and event_notifier_cleanup(). Fix all of them. Cc: qemu-sta...@nongnu.org Signed-off-by: Fam Zheng --- v2: Adopt the suggested fix by Kevin. --- block/nvme.c | 37 - 1 file changed, 12 insertions(+), 25 deleti

[Qemu-devel] [PATCH v3 4/4] tests: Add centos VM testing

2018-07-11 Thread Fam Zheng
This one does docker testing in the VM. It is intended to replace the native docker testing on patchew testers. Signed-off-by: Fam Zheng --- tests/vm/Makefile.include | 3 +- tests/vm/centos | 84 +++ 2 files changed, 86 insertions(+), 1 deletion

[Qemu-devel] [PATCH v3 2/4] tests/vm: Pass verbose flag into VM make commands

2018-07-11 Thread Fam Zheng
pass this to the BUILD_SCRIPT format. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Fam Zheng --- tests/vm/basevm.py | 3 ++- tests/vm/freebsd | 4 ++-- tests/vm/netbsd | 4 ++-- tests/vm/openbsd | 4 ++-- tests/vm/ubuntu.i386 | 4 ++-- 5 files changed, 10 insertions(+), 9

[Qemu-devel] [PATCH v3 1/4] tests: Add an option for snapshot (default: off)

2018-07-11 Thread Fam Zheng
Not using snapshot has the benefit of automatically persisting useful test harnesses, such as docker images and ccache database. Although it will lose some cleanness, it is imaginably useful for patchew. Signed-off-by: Fam Zheng --- tests/vm/basevm.py | 7 ++- 1 file changed, 6 insertions

[Qemu-devel] [PATCH v3 0/4] Add a CentOS test image to run docker tests

2018-07-11 Thread Fam Zheng
patch adds the new image that does the job. Two out of three docker tests running on patchew.org are added to the image. I'll wait for Peter to fix the 'docker-test-quick@centos6' hanging (oob test) before adding it too. Fam Fam Zheng (4): tests: Add an option for snapshot (default: off) tests/vm

[Qemu-devel] [PATCH v3 3/4] tests: Allow overriding archive path with SRC_ARCHIVE

2018-07-11 Thread Fam Zheng
In VM based tests, the source archive is created in host, we don't have to run archive-source.sh again, as it complicates the Makefile and scripts. Signed-off-by: Fam Zheng --- tests/docker/Makefile.include | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/docker

Re: [Qemu-devel] [PATCH] docker: Install more packages in centos7

2018-07-11 Thread Fam Zheng
On Wed, 07/11 14:58, Fam Zheng wrote: > This makes test-block work. > > Signed-off-by: Fam Zheng Queued, thanks.

[Qemu-devel] [PATCH v2 4/4] tests: Add centos VM testing

2018-07-11 Thread Fam Zheng
This one does docker testing in the VM. It is intended to replace the native docker testing on patchew testers. Signed-off-by: Fam Zheng --- tests/vm/Makefile.include | 2 +- tests/vm/centos | 84 +++ 2 files changed, 85 insertions(+), 1 deletion

[Qemu-devel] [PATCH v2 2/4] tests/vm: Pass verbose flag into VM make commands

2018-07-11 Thread Fam Zheng
pass this to the BUILD_SCRIPT format. Signed-off-by: Fam Zheng --- tests/vm/basevm.py | 3 ++- tests/vm/freebsd | 4 ++-- tests/vm/netbsd | 4 ++-- tests/vm/openbsd | 4 ++-- tests/vm/ubuntu.i386 | 4 ++-- 5 files changed, 10 insertions(+), 9 deletions(-) diff --git a/tests/vm

[Qemu-devel] [PATCH v2 3/4] tests: Allow overriding archive path with SRC_ARCHIVE

2018-07-11 Thread Fam Zheng
In VM based tests, the source archive is created in host, we don't have to run archive-source.sh again, as it complicates the Makefile and scripts. Signed-off-by: Fam Zheng --- tests/docker/Makefile.include | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/docker

[Qemu-devel] [PATCH v2 0/4] Add a CentOS test image to run docker tests

2018-07-11 Thread Fam Zheng
. Two out of three docker tests running on patchew.org are added to the image. I'll wait for Peter to fix the 'docker-test-quick@centos6' hanging (oob test) before adding it too. Fam Fam Zheng (4): tests: Add an option for snapshot (default: off) tests/vm: Pass verbose flag into VM make commands

[Qemu-devel] [PATCH v2 1/4] tests: Add an option for snapshot (default: off)

2018-07-11 Thread Fam Zheng
Not using snapshot has the benefit of automatically persisting useful test harnesses, such as docker images and ccache database. Although it will lose some cleanness, it is imaginably useful for patchew. Signed-off-by: Fam Zheng --- tests/vm/basevm.py | 7 ++- 1 file changed, 6 insertions

Re: [Qemu-devel] [PATCH] docker: Update debootstrap script after Debian migration from Alioth to Salsa

2018-07-11 Thread Fam Zheng
On Tue, 07/03 12:35, Philippe Mathieu-Daudé wrote: > This silents the following warning: > > Cloning into './debootstrap.git'... > warning: redirecting to > https://salsa.debian.org/installer-team/debootstrap.git/ > > See https://lists.debian.org/debian-devel-announce/2018/01/msg4.html

[Qemu-devel] [PATCH] iotests: 153: Fix dead code

2018-07-11 Thread Fam Zheng
This step was left behind my mistake. As suggested by the echoed text, the intention was to test two devices with the same image, with different options. The behavior should be the same as two QEMU processes. Complete it. Signed-off-by: Fam Zheng --- tests/qemu-iotests/153 | 2 ++ tests

[Qemu-devel] [PATCH] docker: Install more packages in centos7

2018-07-11 Thread Fam Zheng
This makes test-block work. Signed-off-by: Fam Zheng --- tests/docker/dockerfiles/centos7.docker | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/docker/dockerfiles/centos7.docker b/tests/docker/dockerfiles/centos7.docker index 575de29a0a..83462b7205 100644 --- a/tests/docker

[Qemu-devel] [PATCH v2] iotests: nbd: Stop qemu-nbd before remaking image

2018-07-11 Thread Fam Zheng
the image? Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1024 +Failed to find an available port: Address already in use read 1024/1024 bytes at offset 0 Patch _make_test_img to stop the old qemu-nbd before starting a new one, which fixes this problem, and similarly 215. Signed-off-by:

Re: [Qemu-devel] [PATCH 2/4] tests/vm: Add a dependency to qemu-img

2018-07-10 Thread Fam Zheng
On Tue, 07/03 12:56, Philippe Mathieu-Daudé wrote: > Hi Fam, > > On 07/02/2018 12:19 PM, Philippe Mathieu-Daudé wrote: > > On 07/02/2018 04:18 AM, Fam Zheng wrote: > >> On Thu, 06/28 12:35, Philippe Mathieu-Daudé wrote: > >>> Before the first use, th

Re: [Qemu-devel] [PATCH 0/2] virtio-scsi: fix hotplug ->reset() vs event race

2018-07-10 Thread Fam Zheng
virtio-scsi: fix hotplug ->reset() vs event race > > include/hw/hotplug.h | 12 > hw/core/hotplug.c | 11 +++ > hw/core/qdev.c| 7 +++ > hw/scsi/virtio-scsi.c | 11 ++- > 4 files changed, 40 insertions(+), 1 deletion(-) > > -- > 2.17.1 Reviewed-by: Fam Zheng

Re: [Qemu-devel] [PATCH for 3.0 10/10] docker: add expansion for docker-test-FOO to Makefile.include

2018-07-10 Thread Fam Zheng
On Tue, 07/10 22:04, Alex Bennée wrote: > > Philippe Mathieu-Daudé writes: > > > On 07/09/2018 12:21 PM, Alex Bennée wrote: > >> This allows us to run a particular test on all docker images. For > >> example: > >> > >> make docker-test-unit > >> > >> Will run the unit tests on every supported

[Qemu-devel] [PATCH] qemu-img: Document copy offloading implications with -S and -c

2018-07-10 Thread Fam Zheng
Explicitly enabling zero detection or compression suppresses copy offloading during convert. Document it. Suggested-by: Kevin Wolf Signed-off-by: Fam Zheng --- qemu-img.texi | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/qemu-img.texi b/qemu-img.texi index aeb1b9e66c

[Qemu-devel] [PATCH] iotests: 222: Don't run with luks

2018-07-10 Thread Fam Zheng
Luks needs special parameters to operate the image. Since this test is focusing on image fleecing, skip skip that format. Signed-off-by: Fam Zheng --- tests/qemu-iotests/222 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/qemu-iotests/222 b/tests/qemu-iotests/222 index ff3bfc1470

Re: [Qemu-devel] [PATCH for 3.0 01/10] tests/.gitignore: don't ignore docker tests

2018-07-10 Thread Fam Zheng
On Tue, 07/10 08:54, Alex Bennée wrote: > > Fam Zheng writes: > > > On Mon, 07/09 16:21, Alex Bennée wrote: > >> This was being a little over enthusiastic hiding files. > > > > What is "this" that hides test-* and calls for this patch? >

Re: [Qemu-devel] [PATCH for 3.0 00/10] various docker fixes

2018-07-10 Thread Fam Zheng
On Mon, 07/09 16:21, Alex Bennée wrote: > Hi, > > The addition of the cross compilers for check-tcg broke the ability to > run "make docker-test". In truth this was probably already broken as > it attempts to run every single test with every single docker image > which isn't something that gets

Re: [Qemu-devel] [PATCH for 3.0 09/10] docker: add test-unit runner

2018-07-10 Thread Fam Zheng
On Mon, 07/09 16:21, Alex Bennée wrote: > This test doesn't even build QEMU, it just runs all the unit tests. > Intended to make checking unit tests on all docker images easier. > > Signed-off-by: Alex Bennée > --- > tests/docker/test-unit | 19 +++ > 1 file changed, 19

Re: [Qemu-devel] [PATCH for 3.0 05/10] docker: move make check into check_qemu helper

2018-07-10 Thread Fam Zheng
On Mon, 07/09 16:21, Alex Bennée wrote: > Not all docker images can run the check step. Let's everything into a "move everything"? > common helper so we don't need to replicate checks in the future. > > Signed-off-by: Alex Bennée > --- > tests/docker/common.rc | 10 ++ >

Re: [Qemu-devel] [PATCH for 3.0 01/10] tests/.gitignore: don't ignore docker tests

2018-07-10 Thread Fam Zheng
On Mon, 07/09 16:21, Alex Bennée wrote: > This was being a little over enthusiastic hiding files. What is "this" that hides test-* and calls for this patch? > > Signed-off-by: Alex Bennée > --- > tests/.gitignore | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/tests/.gitignore

[Qemu-devel] [PATCH v3 10/10] block: Use common write req handling in truncate

2018-07-10 Thread Fam Zheng
Error parameter. Signed-off-by: Fam Zheng --- block/io.c | 57 ++ 1 file changed, 36 insertions(+), 21 deletions(-) diff --git a/block/io.c b/block/io.c index e3e2d5286d..abcb8b3de6 100644 --- a/block/io.c +++ b/block/io.c @@ -1582,14 +1

[Qemu-devel] [PATCH v3 08/10] block: Use common req handling in copy offloading

2018-07-10 Thread Fam Zheng
This brings the request handling logic inline with write and discard, fixing write_gen, resize_cb, dirty bitmaps and image size refreshing. The last of these issues broke iotest case 222, which is now fixed. Signed-off-by: Fam Zheng --- block/io.c | 22 +- 1 file changed, 9

[Qemu-devel] [PATCH v3 07/10] block: Use common req handling for discard

2018-07-10 Thread Fam Zheng
Reuse the new bdrv_co_write_req_prepare/finish helpers. The variation here is that discard requests don't affect bs->wr_highest_offset, and it cannot extend the image. Signed-off-by: Fam Zheng --- block/io.c | 32 ++-- 1 file changed, 22 insertions(+), 10 deleti

[Qemu-devel] [PATCH v3 09/10] block: Fix bdrv_co_truncate overlap check

2018-07-10 Thread Fam Zheng
If we are growing the image and potentially using preallocation for the new area, we need to make sure that no write requests are made to the "preallocated" area which is [@old_size, @offset), not [@offset, offset * 2 - @old_size). Signed-off-by: Fam Zheng Reviewed-by: Eric Blake

[Qemu-devel] [PATCH v3 05/10] block: Extract common write req handling

2018-07-10 Thread Fam Zheng
and truncate. Suggested-by: Kevin Wolf Signed-off-by: Fam Zheng --- block/io.c | 91 ++ 1 file changed, 57 insertions(+), 34 deletions(-) diff --git a/block/io.c b/block/io.c index c56e329bb5..960e1492d0 100644 --- a/block/io.c +++ b/block/io.c

[Qemu-devel] [PATCH v3 03/10] block: Use BdrvChild to discard

2018-07-10 Thread Fam Zheng
paths. Signed-off-by: Fam Zheng --- block/blkdebug.c | 2 +- block/blklogwrites.c | 2 +- block/blkreplay.c | 2 +- block/block-backend.c | 2 +- block/copy-on-read.c | 2 +- block/io.c | 18 +- block/mirror.c | 2 +- block/qcow2-refcount.c

[Qemu-devel] [PATCH v3 04/10] block: Use uint64_t for BdrvTrackedRequest byte fields

2018-07-10 Thread Fam Zheng
This matches the types used for bytes in the rest parts of block layer. In the case of bdrv_co_truncate, new_bytes can be the image size which probably doesn't fit in a 32 bit int. Signed-off-by: Fam Zheng --- block/io.c| 8 +--- include/block/block_int.h | 4 ++-- 2 files

[Qemu-devel] [PATCH v3 06/10] block: Fix handling of image enlarging write

2018-07-10 Thread Fam Zheng
-by: Fam Zheng --- block/io.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/block/io.c b/block/io.c index 960e1492d0..10a475302a 100644 --- a/block/io.c +++ b/block/io.c @@ -40,6 +40,7 @@ static AioWait drain_all_aio_wait; +static void bdrv_parent_cb_resize

[Qemu-devel] [PATCH v3 02/10] block: Add copy offloading trace points

2018-07-10 Thread Fam Zheng
A few trace points that can help reveal what is happening in a copy offloading I/O path. Signed-off-by: Fam Zheng --- block/file-posix.c | 2 ++ block/io.c | 4 block/iscsi.c | 3 +++ block/trace-events | 6 ++ 4 files changed, 15 insertions(+) diff --git a/block/file

[Qemu-devel] [PATCH v3 01/10] block: Prefix file driver trace points with "file_"

2018-07-10 Thread Fam Zheng
with a glob. Rename them. Suggested-by: Kevin Wolf Signed-off-by: Fam Zheng --- block/file-posix.c | 2 +- block/file-win32.c | 2 +- block/trace-events | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/block/file-posix.c b/block/file-posix.c index 4fec8cb53c..1185c7c5cc 100644

[Qemu-devel] [PATCH v3 00/10] block: Fix dst reading after tail copy offloading

2018-07-10 Thread Fam Zheng
caught by iotests 222. Follow the logic in the normal write code and update bs->total_sectors after I/O is done. While at it, add a few convenient trace points to aid future debug experiences in the topic. Fam Zheng (10): block: Prefix file driver trace points with "file_" bloc

Re: [Qemu-devel] [PATCH v2 8/9] block: Fix bdrv_co_truncate overlap check

2018-07-09 Thread Fam Zheng
On Fri, 07/06 17:09, Eric Blake wrote: > On 07/05/2018 02:37 AM, Fam Zheng wrote: > > If we are growing the image and potentially using preallocation for the > > new area, we need to make sure that no write requests are made to the > > "preallocated" area which [@o

Re: [Qemu-devel] [PATCH v5 4/4] block/backup: fix fleecing scheme: use serialized writes

2018-07-09 Thread Fam Zheng
st char *job_id, > BlockDriverState *bs, > sync_bitmap : NULL; > job->compress = compress; > > +/* Detect image-fleecing (and similar) schemes */ > +job->serialize_target_writes = bdrv_chain_contains(target, bs); > + > /* If there is no backing file on the target, we cannot rely on COW if > our > * backup cluster size is smaller than the target cluster size. Even for > * targets with a backing file, try to avoid COW if possible. */ I always thought mirror is by far the most complicated job, but now backup is catching up quickly! Reviewed-by: Fam Zheng

Re: [Qemu-devel] [PATCH v5 3/4] block: add BDRV_REQ_SERIALISING flag

2018-07-09 Thread Fam Zheng
BDRV_REQ_NO_SERIALISING)) { > wait_serialising_requests(); > } > @@ -2948,6 +2969,9 @@ static int coroutine_fn bdrv_co_copy_range_internal( > > /* BDRV_REQ_NO_SERIALISING is only for read operation */ > assert(!(write_flags & BDRV_REQ_NO_SERIALISING)); > +if (write_flags & BDRV_REQ_SERIALISING) { > +mark_request_serialising(, bdrv_get_cluster_size(dst->bs)); > +} > wait_serialising_requests(); > > ret = dst->bs->drv->bdrv_co_copy_range_to(dst->bs, > -- > 2.11.1 > Reviewed-by: Fam Zheng Fam

Re: [Qemu-devel] [PATCH v5 2/4] block: split flags in copy_range

2018-07-09 Thread Fam Zheng
On Mon, 07/09 19:37, Vladimir Sementsov-Ogievskiy wrote: > Pass read flags and write flags separately. This is needed to handle > coming BDRV_REQ_NO_SERIALISING clearly in following patches. > > Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Fam Zheng

Re: [Qemu-devel] [PATCH v5 1/4] block/io: fix copy_range

2018-07-09 Thread Fam Zheng
unsubstantiated and potentially dangerous, let's > drop it and add additional asserts and documentation. > > Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Fam Zheng

Re: [Qemu-devel] [PATCH v4 1/4] block/io: fix copy_range

2018-07-09 Thread Fam Zheng
On Mon, 07/09 17:38, Vladimir Sementsov-Ogievskiy wrote: > 09.07.2018 16:17, Fam Zheng wrote: > > On Mon, 07/09 12:43, Vladimir Sementsov-Ogievskiy wrote: > > > 09.07.2018 04:15, Fam Zheng wrote: > > > > On Fri, 07/06 21:30, Vladimir Sementsov-Ogievskiy wrote: >

Re: [Qemu-devel] [PATCH v4 1/4] block/io: fix copy_range

2018-07-09 Thread Fam Zheng
On Mon, 07/09 12:43, Vladimir Sementsov-Ogievskiy wrote: > 09.07.2018 04:15, Fam Zheng wrote: > > On Fri, 07/06 21:30, Vladimir Sementsov-Ogievskiy wrote: > > > Here two things are fixed: > > > > > > 1. Architecture > > > > > > On each

Re: [Qemu-devel] [PATCH v2 9/9] block: Use common write req handling in truncate

2018-07-08 Thread Fam Zheng
On Fri, 07/06 17:12, Eric Blake wrote: > On 07/05/2018 02:37 AM, Fam Zheng wrote: > > Truncation is the last to convert from open coded req handling to > > reusing helpers. This time the permission check in prepare has to adapt > > to the new caller: it checks a different perm

Re: [Qemu-devel] [PATCH v4 1/4] block/io: fix copy_range

2018-07-08 Thread Fam Zheng
On Fri, 07/06 21:30, Vladimir Sementsov-Ogievskiy wrote: > Here two things are fixed: > > 1. Architecture > > On each recursion step, we go to the child of src or dst, only for one > of them. So, it's wrong to create tracked requests for both on each > step. It leads to tracked requests

Re: [Qemu-devel] [PATCH v3 0/4] fix image fleecing

2018-07-06 Thread Fam Zheng
On Thu, 07/05 10:46, Vladimir Sementsov-Ogievskiy wrote: > Hi all. > > This fixes image fleecing scheme for 3.0, details are in 04 patch. Looks like this breaks 'test-replication': http://patchew.org/QEMU/20180705074638.770905-1-vsement...@virtuozzo.com/ test-replication:

Re: [Qemu-devel] [PATCH v2 6/9] block: Use common req handling for discard

2018-07-06 Thread Fam Zheng
On Thu, 07/05 14:44, Kevin Wolf wrote: > Am 05.07.2018 um 09:36 hat Fam Zheng geschrieben: > > Reuse the new bdrv_co_write_req_prepare/finish helpers. The variation > > here is that discard requests don't affect bs->wr_highest_offset. > > > > Signed-off-by: Fam Zheng

Re: [Qemu-devel] [PATCH v2 1/9] block: Add copy offloading trace points

2018-07-06 Thread Fam Zheng
On Thu, 07/05 13:08, Kevin Wolf wrote: > Am 05.07.2018 um 09:36 hat Fam Zheng geschrieben: > > A few trace points that can help reveal what is happening in a copy > > offloading I/O path. > > > > Signed-off-by: Fam Zheng > > --- > > block/file-pos

Re: [Qemu-devel] [PATCH v4] module: Use QEMU_MODULE_DIR as a search path

2018-07-05 Thread Fam Zheng
0; i < ARRAY_SIZE(dirs); i++) { > +for (i = 0; i < n_dirs; i++) { > fname = g_strdup_printf("%s/%s%s", > dirs[i], module_name, HOST_DSOSUF); > ret = module_load_file(fname); > @@ -205,7 +211,7 @@ void module_load_one(const char *prefix, const char > *lib_name) > } > } > > -for (i = 0; i < ARRAY_SIZE(dirs); i++) { > +for (i = 0; i < n_dirs; i++) { > g_free(dirs[i]); > } > > -- > 2.7.4 > Reviewed-by: Fam Zheng

[Qemu-devel] [PATCH v2 9/9] block: Use common write req handling in truncate

2018-07-05 Thread Fam Zheng
Error parameter. Signed-off-by: Fam Zheng --- block/io.c | 54 +- 1 file changed, 33 insertions(+), 21 deletions(-) diff --git a/block/io.c b/block/io.c index ed18eb0ca3..53f2bf4103 100644 --- a/block/io.c +++ b/block/io.c @@ -1556,13 +1

[Qemu-devel] [PATCH v2 5/9] block: Fix handling of image enlarging write

2018-07-05 Thread Fam Zheng
-by: Fam Zheng --- block/io.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/block/io.c b/block/io.c index 03d9eb0a65..f06978dda0 100644 --- a/block/io.c +++ b/block/io.c @@ -40,6 +40,7 @@ static AioWait drain_all_aio_wait; +static void bdrv_parent_cb_resize

[Qemu-devel] [PATCH v2 6/9] block: Use common req handling for discard

2018-07-05 Thread Fam Zheng
Reuse the new bdrv_co_write_req_prepare/finish helpers. The variation here is that discard requests don't affect bs->wr_highest_offset. Signed-off-by: Fam Zheng --- block/io.c | 21 ++--- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/block/io.c b/block/i

[Qemu-devel] [PATCH v2 8/9] block: Fix bdrv_co_truncate overlap check

2018-07-05 Thread Fam Zheng
If we are growing the image and potentially using preallocation for the new area, we need to make sure that no write requests are made to the "preallocated" area which [@old_size, @offset), not [@offset, offset * 2 - @old_size). Signed-off-by: Fam Zheng --- block/io.c | 3 ++- 1 file

[Qemu-devel] [PATCH v2 3/9] block: Use uint64_t for BdrvTrackedRequest byte fields

2018-07-05 Thread Fam Zheng
This matches the types used for bytes in the rest parts of block layer. In the case of bdrv_co_truncate, new_bytes can be the image size which probably doesn't fit in a 32 bit int. Signed-off-by: Fam Zheng --- block/io.c| 2 +- include/block/block_int.h | 4 ++-- 2 files changed

[Qemu-devel] [PATCH v2 4/9] block: Extract common write req handling

2018-07-05 Thread Fam Zheng
and truncate. Suggested-by: Kevin Wolf Signed-off-by: Fam Zheng --- block/io.c | 70 ++ 1 file changed, 44 insertions(+), 26 deletions(-) diff --git a/block/io.c b/block/io.c index 443a8584c4..03d9eb0a65 100644 --- a/block/io.c +++ b/block/io.c

[Qemu-devel] [PATCH v2 7/9] block: Use common req handling in copy offloading

2018-07-05 Thread Fam Zheng
This brings the request handling logic inline with write and discard, fixing write_gen, resize_cb, dirty bitmaps and image size refreshing. The last of these issues broke iotest case 222, which is now fixed. Signed-off-by: Fam Zheng --- block/io.c | 8 +++- 1 file changed, 7 insertions

[Qemu-devel] [PATCH v2 2/9] block: Use BdrvChild to discard

2018-07-05 Thread Fam Zheng
paths. Signed-off-by: Fam Zheng --- block/blkdebug.c | 2 +- block/blkreplay.c | 2 +- block/block-backend.c | 2 +- block/copy-on-read.c | 2 +- block/io.c | 18 +- block/mirror.c | 2 +- block/qcow2-refcount.c | 2 +- block/raw-format.c

[Qemu-devel] [PATCH v2 1/9] block: Add copy offloading trace points

2018-07-05 Thread Fam Zheng
A few trace points that can help reveal what is happening in a copy offloading I/O path. Signed-off-by: Fam Zheng --- block/file-posix.c | 2 ++ block/io.c | 2 ++ block/iscsi.c | 3 +++ block/trace-events | 6 ++ 4 files changed, 13 insertions(+) diff --git a/block/file

[Qemu-devel] [PATCH v2 0/9] block: Fix dst reading after tail copy offloading

2018-07-05 Thread Fam Zheng
ic in the normal write code and update bs->total_sectors after I/O is done. While at it, add a few convenient trace points to aid future debug experiences in the topic. Fam Zheng (9): block: Add copy offloading trace points block: Use BdrvChild to discard block: Use uint64_t for BdrvTracked

Re: [Qemu-devel] [PATCH 1/2] block: Fix dst total_sectors after copy offloading

2018-07-04 Thread Fam Zheng
On Wed, 07/04 09:44, Kevin Wolf wrote: > Am 04.07.2018 um 08:13 hat Fam Zheng geschrieben: > > This was noticed by the new image fleecing tests case 222. The issue is > > apparent and we should just do the same right things as in > > bdrv_aligned_pwritev. > >

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