Re: [Qemu-block] [PATCH 0/2] nvme: fix two issues in nvme unhotplug

2018-11-07 Thread Kevin Wolf
Am 29.10.2018 um 07:29 hat Li Qiang geschrieben: > The first corrent the refcount and second fix a memory leak. Thanks, applied to the block branch. Kevin

Re: [Qemu-block] [PATCH v4 03/11] block: allow serialized reads to intersect

2018-11-07 Thread Vladimir Sementsov-Ogievskiy
06.11.2018 20:57, Kevin Wolf wrote: > Am 15.10.2018 um 18:06 hat Vladimir Sementsov-Ogievskiy geschrieben: >> Otherwise, if we have serialized read-part in copy_range from backing >> file to its parent if CoW take place, this CoW's sub-reads will >> intersect with firstly created serialized read re

Re: [Qemu-block] ping Re: [PATCH v4 00/11] backup-top filter driver for backup

2018-11-07 Thread Vladimir Sementsov-Ogievskiy
07.11.2018 01:35, John Snow wrote: > > On 11/06/2018 12:21 PM, Kevin Wolf wrote: >> Am 02.11.2018 um 17:41 hat Vladimir Sementsov-Ogievskiy geschrieben: >>> ping >>> >>> 15.10.2018 19:06, Vladimir Sementsov-Ogievskiy wrote: Hi all! These series introduce backup-top driver. It's a fil

Re: [Qemu-block] [PATCH] tests: Fix Python 3 detection on older GNU make versions

2018-11-07 Thread Peter Maydell
On 7 November 2018 at 06:05, Markus Armbruster wrote: > Eduardo Habkost writes: > >> The $(SHELLSTATUS) variable requires GNU make >= 4.2, but Travis >> seems to provide an older version. Change the existing rules to >> use command output instead of exit code, to make it compatible >> with older

[Qemu-block] Change in qemu 2.12 causes qemu-img convert to NBD to write more data

2018-11-07 Thread Richard W.M. Jones
(I'm not going to claim this is a bug, but it causes a large, easily measurable performance regression in virt-v2v). In qemu 2.10, when you do ‘qemu-img convert’ to an NBD target, qemu interleaves write and zero requests. We can observe this as follows: $ virt-builder fedora-28 $ nbdkit --fi

Re: [Qemu-block] [Qemu-devel] [PATCH v6 00/10] hw/m68k: add Apple Machintosh Quadra 800 machine

2018-11-07 Thread no-reply
Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20181102152257.20637-1-mark.cave-ayl...@ilande.co.uk Subject: [Qemu-devel] [PATCH v6 00/10] hw/m68k: add Apple Machintosh Quadra 800 machine === TEST SCRIPT BEGIN === #!/bin

Re: [Qemu-block] [PATCH] tests: Fix Python 3 detection on older GNU make versions

2018-11-07 Thread Eduardo Habkost
On Wed, Nov 07, 2018 at 07:05:03AM +0100, Markus Armbruster wrote: > Eduardo Habkost writes: > > > The $(SHELLSTATUS) variable requires GNU make >= 4.2, but Travis > > seems to provide an older version. Change the existing rules to > > use command output instead of exit code, to make it compatib

[Qemu-block] [PATCH v4 08/15] block: Use bdrv_reopen_set_read_only() in the mirror driver

2018-11-07 Thread Alberto Garcia
The 'block-commit' QMP command is implemented internally using two different drivers. If the source image is the active layer then the mirror driver is used (commit_active_start()), otherwise the commit driver is used (commit_start()). In both cases the destination image must be put temporarily in

[Qemu-block] [PATCH v4 00/15] Don't pass flags to bdrv_reopen_queue()

2018-11-07 Thread Alberto Garcia
Hi all, when reopening a BlockDriverState using bdrv_reopen() and friends the new options can be specified either with a QDict or with flags. Both methods overlap and that makes the semantics and the implementation unnecessarily complicated. This series removes the 'flags' parameter from these fu

[Qemu-block] [PATCH v4 05/15] block: Use bdrv_reopen_set_read_only() in stream_start/complete()

2018-11-07 Thread Alberto Garcia
This patch replaces the bdrv_reopen() calls that set and remove the BDRV_O_RDWR flag with the new bdrv_reopen_set_read_only() function. Signed-off-by: Alberto Garcia Reviewed-by: Max Reitz --- block/stream.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --gi

[Qemu-block] [PATCH v4 11/15] block: Clean up reopen_backing_file() in block/replication.c

2018-11-07 Thread Alberto Garcia
This function is used to put the hidden and secondary disks in read-write mode before launching the backup job, and back in read-only mode afterwards. This patch does the following changes: - Use an options QDict with the "read-only" option instead of passing the changes as flags only. -

[Qemu-block] [PATCH v4 07/15] block: Use bdrv_reopen_set_read_only() in external_snapshot_commit()

2018-11-07 Thread Alberto Garcia
This patch replaces the bdrv_reopen() call that set and remove the BDRV_O_RDWR flag with the new bdrv_reopen_set_read_only() function. Signed-off-by: Alberto Garcia Reviewed-by: Max Reitz --- blockdev.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/blockdev.c b/blockdev.

[Qemu-block] [PATCH v4 15/15] block: Assert that flags are up-to-date in bdrv_reopen_prepare()

2018-11-07 Thread Alberto Garcia
Towards the end of bdrv_reopen_queue_child(), before starting to process the children, the update_flags_from_options() function is called in order to have BDRVReopenState.flags in sync with the options from the QDict. This is necessary because during the reopen process flags must be updated for al

[Qemu-block] [PATCH v4 10/15] qemu-io: Put flag changes in the options QDict in reopen_f()

2018-11-07 Thread Alberto Garcia
When reopen_f() puts a block device in the reopen queue, some of the new options are passed using a QDict, but others ("read-only" and the cache options) are passed as flags. This patch puts those flags in the QDict. This way the flags parameter becomes redundant and we'll be able to get rid of it

[Qemu-block] [PATCH v4 02/15] block: Use bdrv_reopen_set_read_only() in bdrv_backing_update_filename()

2018-11-07 Thread Alberto Garcia
This patch replaces the bdrv_reopen() calls that set and remove the BDRV_O_RDWR flag with the new bdrv_reopen_set_read_only() function. Signed-off-by: Alberto Garcia Reviewed-by: Max Reitz --- block.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/block.c b/block

[Qemu-block] [PATCH v4 01/15] block: Add bdrv_reopen_set_read_only()

2018-11-07 Thread Alberto Garcia
Most callers of bdrv_reopen() only use it to switch a BlockDriverState between read-only and read-write, so this patch adds a new function that does just that. We also want to get rid of the flags parameter in the bdrv_reopen() API, so this function sets the "read-only" option and passes the origi

[Qemu-block] [PATCH v4 04/15] block: Use bdrv_reopen_set_read_only() in bdrv_commit()

2018-11-07 Thread Alberto Garcia
This patch replaces the bdrv_reopen() calls that set and remove the BDRV_O_RDWR flag with the new bdrv_reopen_set_read_only() function. Signed-off-by: Alberto Garcia Reviewed-by: Max Reitz --- block/commit.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/block/commit

[Qemu-block] [PATCH v4 03/15] block: Use bdrv_reopen_set_read_only() in commit_start/complete()

2018-11-07 Thread Alberto Garcia
This patch replaces the bdrv_reopen() calls that set and remove the BDRV_O_RDWR flag with the new bdrv_reopen_set_read_only() function. Signed-off-by: Alberto Garcia Reviewed-by: Max Reitz --- block/commit.c | 16 ++-- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/b

[Qemu-block] [PATCH v4 14/15] block: Remove assertions from update_flags_from_options()

2018-11-07 Thread Alberto Garcia
This function takes three options (cache.direct, cache.no-flush and read-only) from a QemuOpts object and updates the flags accordingly. If any of those options is not set (because it was missing from the original QDict or because it had an invalid value) then the function aborts with a failed ass

[Qemu-block] [PATCH v4 06/15] block: Use bdrv_reopen_set_read_only() in qmp_change_backing_file()

2018-11-07 Thread Alberto Garcia
This patch replaces the bdrv_reopen() calls that set and remove the BDRV_O_RDWR flag with the new bdrv_reopen_set_read_only() function. Signed-off-by: Alberto Garcia Reviewed-by: Max Reitz --- blockdev.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/blockdev.c b/bl

[Qemu-block] [PATCH v4 09/15] block: Drop bdrv_reopen()

2018-11-07 Thread Alberto Garcia
No one is using this function anymore, so we can safely remove it. Signed-off-by: Alberto Garcia Reviewed-by: Max Reitz --- block.c | 21 - include/block/block.h | 1 - 2 files changed, 22 deletions(-) diff --git a/block.c b/block.c index cfa53f7114..31de7b22

[Qemu-block] [PATCH v4 12/15] block: Remove flags parameter from bdrv_reopen_queue()

2018-11-07 Thread Alberto Garcia
Now that all callers are passing all flag changes as QDict options, the flags parameter is no longer necessary, so we can get rid of it. Signed-off-by: Alberto Garcia Reviewed-by: Max Reitz --- block.c | 5 +++-- block/replication.c | 6 ++ include/block/block.h | 3 +-- qem

[Qemu-block] [PATCH v4 13/15] block: Stop passing flags to bdrv_reopen_queue_child()

2018-11-07 Thread Alberto Garcia
Now that all callers are passing the new options using the QDict we no longer need the 'flags' parameter. This patch makes the following changes: 1) The update_options_from_flags() call is no longer necessary so it can be removed. 2) The update_flags_from_options() call is now used i

Re: [Qemu-block] [PATCH v2] block: Make more block drivers compile-time configurable

2018-11-07 Thread Max Reitz
On 07.11.18 07:36, Markus Armbruster wrote: > From: Jeff Cody > > This adds configure options to control the following block drivers: > > * Bochs > * Cloop > * Dmg > * Qcow (V1) > * Vdi > * Vvfat > * qed > * parallels > * sheepdog > > Each of these defaults to being enabled. > > Signed-off-by:

Re: [Qemu-block] [PATCH] tests: Fix Python 3 detection on older GNU make versions

2018-11-07 Thread Peter Maydell
On 7 November 2018 at 12:49, Eduardo Habkost wrote: > Now, why do we need --with-python, and why do we need to use > $(PYTHON) when running tests? If somebody wants to use a > different Python binary when running tests, they can already use > $PATH for that. > > (That's the same argument I used f

Re: [Qemu-block] [PATCH 3/7] qcow2: split out reading normal clusters from qcow2_co_preadv

2018-11-07 Thread Max Reitz
On 01.11.18 13:17, Vladimir Sementsov-Ogievskiy wrote: > 27.09.2018 20:35, Max Reitz wrote: >> On 07.08.18 19:43, Vladimir Sementsov-Ogievskiy wrote: >>> Memory allocation may become less efficient for encrypted case. It's a >>> payment for further asynchronous scheme. >>> >>> Signed-off-by: Vladim

Re: [Qemu-block] Change in qemu 2.12 causes qemu-img convert to NBD to write more data

2018-11-07 Thread Richard W.M. Jones
Another thing I tried was to change the NBD server (nbdkit) so that it doesn't advertise zero support to the client: $ nbdkit --filter=log --filter=nozero memory size=6G logfile=/tmp/log \ --run './qemu-img convert ./fedora-28.img -n $nbd' $ grep '\.\.\.$' /tmp/log | sed 's/.*\([A-Z][a-z

Re: [Qemu-block] Change in qemu 2.12 causes qemu-img convert to NBD to write more data

2018-11-07 Thread Nir Soffer
Wed, Nov 7, 2018 at 4:36 PM Richard W.M. Jones wrote: > Another thing I tried was to change the NBD server (nbdkit) so that it > doesn't advertise zero support to the client: > > $ nbdkit --filter=log --filter=nozero memory size=6G logfile=/tmp/log \ > --run './qemu-img convert ./fedora-2

Re: [Qemu-block] Change in qemu 2.12 causes qemu-img convert to NBD to write more data

2018-11-07 Thread Richard W.M. Jones
On Wed, Nov 07, 2018 at 04:56:48PM +0200, Nir Soffer wrote: > Wed, Nov 7, 2018 at 4:36 PM Richard W.M. Jones wrote: > > > Another thing I tried was to change the NBD server (nbdkit) so that it > > doesn't advertise zero support to the client: > > > > $ nbdkit --filter=log --filter=nozero memory

Re: [Qemu-block] [PATCH] tests: Fix Python 3 detection on older GNU make versions

2018-11-07 Thread Eduardo Habkost
On Wed, Nov 07, 2018 at 01:45:35PM +, Peter Maydell wrote: > On 7 November 2018 at 12:49, Eduardo Habkost wrote: > > Now, why do we need --with-python, and why do we need to use > > $(PYTHON) when running tests? If somebody wants to use a > > different Python binary when running tests, they c

Re: [Qemu-block] [Qemu-devel] [PATCH] tests: Fix Python 3 detection on older GNU make versions

2018-11-07 Thread Markus Armbruster
Eduardo Habkost writes: > On Wed, Nov 07, 2018 at 01:45:35PM +, Peter Maydell wrote: >> On 7 November 2018 at 12:49, Eduardo Habkost wrote: >> > Now, why do we need --with-python, and why do we need to use >> > $(PYTHON) when running tests? If somebody wants to use a >> > different Python b

Re: [Qemu-block] Change in qemu 2.12 causes qemu-img convert to NBD to write more data

2018-11-07 Thread Eric Blake
On 11/7/18 6:13 AM, Richard W.M. Jones wrote: (I'm not going to claim this is a bug, but it causes a large, easily measurable performance regression in virt-v2v). I haven't closely looked at at this email thread yet, but a quick first impression: In qemu 2.12 this behaviour changed: $

Re: [Qemu-block] Change in qemu 2.12 causes qemu-img convert to NBD to write more data

2018-11-07 Thread Kevin Wolf
Am 07.11.2018 um 15:56 hat Nir Soffer geschrieben: > Wed, Nov 7, 2018 at 4:36 PM Richard W.M. Jones wrote: > > > Another thing I tried was to change the NBD server (nbdkit) so that it > > doesn't advertise zero support to the client: > > > > $ nbdkit --filter=log --filter=nozero memory size=6G

Re: [Qemu-block] Change in qemu 2.12 causes qemu-img convert to NBD to write more data

2018-11-07 Thread Nir Soffer
On Wed, Nov 7, 2018 at 7:27 PM Kevin Wolf wrote: > Am 07.11.2018 um 15:56 hat Nir Soffer geschrieben: > > Wed, Nov 7, 2018 at 4:36 PM Richard W.M. Jones > wrote: > > > > > Another thing I tried was to change the NBD server (nbdkit) so that it > > > doesn't advertise zero support to the client: >

Re: [Qemu-block] [PATCH 3/7] qcow2: split out reading normal clusters from qcow2_co_preadv

2018-11-07 Thread Kevin Wolf
(Broken quoting in text/plain again) Am 01.11.2018 um 13:17 hat Vladimir Sementsov-Ogievskiy geschrieben: > 27.09.2018 20:35, Max Reitz wrote: > > On 07.08.18 19:43, Vladimir Sementsov-Ogievskiy wrote: > > Memory allocation may become less efficient for encrypted case. It's a >

Re: [Qemu-block] [PATCH] tests: Fix Python 3 detection on older GNU make versions

2018-11-07 Thread Cleber Rosa
On 11/7/18 1:05 AM, Markus Armbruster wrote: > Eduardo Habkost writes: > >> The $(SHELLSTATUS) variable requires GNU make >= 4.2, but Travis >> seems to provide an older version. Change the existing rules to >> use command output instead of exit code, to make it compatible >> with older GNU m

Re: [Qemu-block] [Qemu-devel] [PATCH v5 0/3] file-posix: Simplifications on image locking

2018-11-07 Thread Fam Zheng
On Thu, 10/11 15:21, Fam Zheng wrote: > v5: Address Max's comments (Thanks for reviewing): > - Clean up after test done. > - Add rev-by to patch 1 and 2. Ping? Fam