Re: [Qemu-block] [PATCH] nvme: do not advertise support for unsupported arbitration mechanism

2019-06-14 Thread Max Reitz
On 06.06.19 11:25, Klaus Birkelund Jensen wrote: > The device mistakenly reports that the Weighted Round Robin with Urgent > Priority Class arbitration mechanism is supported. > > It is not. I believe you based on the fact that there is no “weight” or “priority” anywhere in nvme.c, and that it

Re: [Qemu-block] [PATCH v5 21/42] block: Use CAFs for debug breakpoints

2019-06-14 Thread Eric Blake
On 6/14/19 11:12 AM, Max Reitz wrote: > On 14.06.19 17:29, Vladimir Sementsov-Ogievskiy wrote: >> 13.06.2019 1:09, Max Reitz wrote: >>> When looking for a blkdebug node (which implements debug breakpoints), >>> use bdrv_primary_bs() to iterate through the graph, because that is >>> where a

Re: [Qemu-block] [PATCH v8 4/7] block: introduce backup-top filter driver

2019-06-14 Thread Max Reitz
On 14.06.19 18:22, Vladimir Sementsov-Ogievskiy wrote: > 14.06.2019 15:57, Max Reitz wrote: >> On 14.06.19 11:04, Vladimir Sementsov-Ogievskiy wrote: >>> 13.06.2019 18:57, Max Reitz wrote: On 29.05.19 17:46, Vladimir Sementsov-Ogievskiy wrote: > Backup-top filter does copy-before-write

Re: [Qemu-block] [PATCH v5 23/42] blockdev: Use CAF in external_snapshot_prepare()

2019-06-14 Thread Vladimir Sementsov-Ogievskiy
14.06.2019 19:20, Max Reitz wrote: > On 14.06.19 17:46, Vladimir Sementsov-Ogievskiy wrote: >> 13.06.2019 1:09, Max Reitz wrote: >>> This allows us to differentiate between filters and nodes with COW >>> backing files: Filters cannot be used as overlays at all (for this >>> function). >>> >>>

Re: [Qemu-block] [PATCH v5 14/42] block: Use CAFs when working with backing chains

2019-06-14 Thread Vladimir Sementsov-Ogievskiy
14.06.2019 19:02, Max Reitz wrote: > On 14.06.19 16:31, Vladimir Sementsov-Ogievskiy wrote: >> 14.06.2019 16:50, Max Reitz wrote: >>> On 14.06.19 15:26, Vladimir Sementsov-Ogievskiy wrote: 13.06.2019 1:09, Max Reitz wrote: > Use child access functions when iterating through backing chains

Re: [Qemu-block] [PATCH v5 20/42] block/snapshot: Fall back to storage child

2019-06-14 Thread Vladimir Sementsov-Ogievskiy
14.06.2019 19:10, Max Reitz wrote: > On 14.06.19 17:22, Vladimir Sementsov-Ogievskiy wrote: >> 13.06.2019 1:09, Max Reitz wrote: >>> If the top node's driver does not provide snapshot functionality and we >>> want to go down the chain, we should go towards the child which stores >>> the data, i.e.

Re: [Qemu-block] [PATCH v8 4/7] block: introduce backup-top filter driver

2019-06-14 Thread Vladimir Sementsov-Ogievskiy
14.06.2019 15:57, Max Reitz wrote: > On 14.06.19 11:04, Vladimir Sementsov-Ogievskiy wrote: >> 13.06.2019 18:57, Max Reitz wrote: >>> On 29.05.19 17:46, Vladimir Sementsov-Ogievskiy wrote: Backup-top filter does copy-before-write operation. It should be inserted above active disk and has

Re: [Qemu-block] [PATCH v5 15/42] block: Re-evaluate backing file handling in reopen

2019-06-14 Thread Vladimir Sementsov-Ogievskiy
14.06.2019 18:52, Max Reitz wrote: > On 14.06.19 15:42, Vladimir Sementsov-Ogievskiy wrote: >> 13.06.2019 1:09, Max Reitz wrote: >>> Reopening a node's backing child needs a bit of special handling because >>> the "backing" child has different defaults than all other children >>> (among other

Re: [Qemu-block] [PATCH v5 20/42] block/snapshot: Fall back to storage child

2019-06-14 Thread Max Reitz
On 14.06.19 17:22, Vladimir Sementsov-Ogievskiy wrote: > 13.06.2019 1:09, Max Reitz wrote: >> If the top node's driver does not provide snapshot functionality and we >> want to go down the chain, we should go towards the child which stores >> the data, i.e. the storage child. >> >>

Re: [Qemu-block] [PATCH v5 14/42] block: Use CAFs when working with backing chains

2019-06-14 Thread Max Reitz
On 14.06.19 16:31, Vladimir Sementsov-Ogievskiy wrote: > 14.06.2019 16:50, Max Reitz wrote: >> On 14.06.19 15:26, Vladimir Sementsov-Ogievskiy wrote: >>> 13.06.2019 1:09, Max Reitz wrote: Use child access functions when iterating through backing chains so filters do not break the chain.

Re: [Qemu-block] [PATCH v5 23/42] blockdev: Use CAF in external_snapshot_prepare()

2019-06-14 Thread Max Reitz
On 14.06.19 17:46, Vladimir Sementsov-Ogievskiy wrote: > 13.06.2019 1:09, Max Reitz wrote: >> This allows us to differentiate between filters and nodes with COW >> backing files: Filters cannot be used as overlays at all (for this >> function). >> >> Signed-off-by: Max Reitz > > Overlay created

Re: [Qemu-block] [PATCH v5 16/42] block: Use child access functions when flushing

2019-06-14 Thread Max Reitz
On 14.06.19 16:01, Vladimir Sementsov-Ogievskiy wrote: > 13.06.2019 1:09, Max Reitz wrote: >> If the driver does not support .bdrv_co_flush() so bdrv_co_flush() >> itself has to flush the children of the given node, it should not flush >> just bs->file->bs, but in fact both the child that stores

Re: [Qemu-block] [PATCH v5 21/42] block: Use CAFs for debug breakpoints

2019-06-14 Thread Max Reitz
On 14.06.19 17:29, Vladimir Sementsov-Ogievskiy wrote: > 13.06.2019 1:09, Max Reitz wrote: >> When looking for a blkdebug node (which implements debug breakpoints), >> use bdrv_primary_bs() to iterate through the graph, because that is >> where a blkdebug node would be. >> >> Signed-off-by: Max

Re: [Qemu-block] [PATCH v5 22/42] block: Use CAFs in bdrv_get_allocated_file_size()

2019-06-14 Thread Max Reitz
On 14.06.19 17:41, Vladimir Sementsov-Ogievskiy wrote: > 13.06.2019 1:09, Max Reitz wrote: >> Signed-off-by: Max Reitz >> --- >> block.c | 26 -- >> 1 file changed, 24 insertions(+), 2 deletions(-) >> >> diff --git a/block.c b/block.c >> index 11b7ba8cf6..856d9b58be

Re: [Qemu-block] [PATCH 0/4] block: Keep track of parent quiescing

2019-06-14 Thread Kevin Wolf
Am 05.06.2019 um 18:11 hat Max Reitz geschrieben: > We currently do not keep track of how many times a child has quiesced > its parent. We just guess based on the child’s quiesce_counter. That > keeps biting us when we try to leave drained sections or detach children > (see e.g. commit

Re: [Qemu-block] [PATCH v5 21/42] block: Use CAFs for debug breakpoints

2019-06-14 Thread Vladimir Sementsov-Ogievskiy
13.06.2019 1:09, Max Reitz wrote: > When looking for a blkdebug node (which implements debug breakpoints), > use bdrv_primary_bs() to iterate through the graph, because that is > where a blkdebug node would be. > > Signed-off-by: Max Reitz Honestly, don't know why blkdebug is always searched in

Re: [Qemu-block] [PATCH v5 22/42] block: Use CAFs in bdrv_get_allocated_file_size()

2019-06-14 Thread Vladimir Sementsov-Ogievskiy
13.06.2019 1:09, Max Reitz wrote: > Signed-off-by: Max Reitz > --- > block.c | 26 -- > 1 file changed, 24 insertions(+), 2 deletions(-) > > diff --git a/block.c b/block.c > index 11b7ba8cf6..856d9b58be 100644 > --- a/block.c > +++ b/block.c > @@ -4511,15 +4511,37 @@

Re: [Qemu-block] [PATCH v5 15/42] block: Re-evaluate backing file handling in reopen

2019-06-14 Thread Max Reitz
On 14.06.19 15:42, Vladimir Sementsov-Ogievskiy wrote: > 13.06.2019 1:09, Max Reitz wrote: >> Reopening a node's backing child needs a bit of special handling because >> the "backing" child has different defaults than all other children >> (among other things). Adding filter support here is a bit

Re: [Qemu-block] [Qemu-devel] [PATCH 0/6] configure: Try to fix --static linking

2019-06-14 Thread Philippe Mathieu-Daudé
On 6/14/19 4:30 PM, Peter Maydell wrote: > On Fri, 14 Jun 2019 at 14:58, Alex Bennée wrote: > >> It would be nice to have a --static-user config flag and deprecate the >> --static flag. I don't think there is a decent use case for system >> emulation targets. > > It would be really tricky to

Re: [Qemu-block] [PATCH v5 23/42] blockdev: Use CAF in external_snapshot_prepare()

2019-06-14 Thread Vladimir Sementsov-Ogievskiy
13.06.2019 1:09, Max Reitz wrote: > This allows us to differentiate between filters and nodes with COW > backing files: Filters cannot be used as overlays at all (for this > function). > > Signed-off-by: Max Reitz Overlay created in snapshot operation assumed to consume following writes and

Re: [Qemu-block] [PATCH v9] ssh: switch from libssh2 to libssh

2019-06-14 Thread Philippe Mathieu-Daudé
On 6/14/19 4:30 PM, Max Reitz wrote: > On 14.06.19 16:26, Philippe Mathieu-Daudé wrote: >> On 6/13/19 9:31 PM, Max Reitz wrote: >>> On 13.06.19 15:20, Pino Toscano wrote: Rewrite the implementation of the ssh block driver to use libssh instead of libssh2. The libssh library has various

Re: [Qemu-block] [PATCH v5 20/42] block/snapshot: Fall back to storage child

2019-06-14 Thread Vladimir Sementsov-Ogievskiy
13.06.2019 1:09, Max Reitz wrote: > If the top node's driver does not provide snapshot functionality and we > want to go down the chain, we should go towards the child which stores > the data, i.e. the storage child. > > bdrv_snapshot_goto() becomes a bit weird because we may have to redirect >

Re: [Qemu-block] [PATCH v5 19/42] block: Use CAF in bdrv_co_rw_vmstate()

2019-06-14 Thread Vladimir Sementsov-Ogievskiy
13.06.2019 1:09, Max Reitz wrote: > If a node whose driver does not provide VM state functions has a > metadata child, the VM state should probably go there; if it is a > filter, the VM state should probably go there. It follows that we > should generally go down to the primary child. Hmm, as I

Re: [Qemu-block] [PATCH v9] ssh: switch from libssh2 to libssh

2019-06-14 Thread Philippe Mathieu-Daudé
On 6/14/19 4:34 PM, Max Reitz wrote: > On 14.06.19 16:29, Pino Toscano wrote: >> On Thursday, 13 June 2019 21:31:40 CEST Max Reitz wrote: >>> On 13.06.19 15:20, Pino Toscano wrote: [...] -case LIBSSH2_KNOWNHOST_CHECK_NOTFOUND: +case SSH_KNOWN_HOSTS_OTHER: ret =

Re: [Qemu-block] [Qemu-devel] [PATCH v9] ssh: switch from libssh2 to libssh

2019-06-14 Thread Philippe Mathieu-Daudé
On 6/13/19 8:18 PM, Paolo Bonzini wrote: > On 13/06/19 19:15, Philippe Mathieu-Daudé wrote: >> >> On 6/13/19 6:24 PM, no-re...@patchew.org wrote: >>> === TEST SCRIPT BEGIN === >>> #!/bin/bash >>> time make docker-test-debug@fedora TARGET_LIST=x86_64-softmmu J=14 NETWORK=1 >>> === TEST SCRIPT END

Re: [Qemu-block] [PATCH v5 17/42] block: Use CAFs in bdrv_refresh_limits()

2019-06-14 Thread Vladimir Sementsov-Ogievskiy
13.06.2019 1:09, Max Reitz wrote: > Signed-off-by: Max Reitz Reviewed-by: Vladimir Sementsov-Ogievskiy -- Best regards, Vladimir

Re: [Qemu-block] [PULL 00/20] Block patches

2019-06-14 Thread Peter Maydell
On Fri, 14 Jun 2019 at 14:40, Max Reitz wrote: > > The following changes since commit 5ec2eca83dc478ddf24077e02a8b34dd26cd3ff9: > > Merge remote-tracking branch > 'remotes/awilliam/tags/vfio-updates-20190613.0' into staging (2019-06-14 > 09:33:55 +0100) > > are available in the Git repository

Re: [Qemu-block] [PATCH v5 14/42] block: Use CAFs when working with backing chains

2019-06-14 Thread Vladimir Sementsov-Ogievskiy
14.06.2019 16:50, Max Reitz wrote: > On 14.06.19 15:26, Vladimir Sementsov-Ogievskiy wrote: >> 13.06.2019 1:09, Max Reitz wrote: >>> Use child access functions when iterating through backing chains so >>> filters do not break the chain. >>> >>> Signed-off-by: Max Reitz >>> --- >>>block.c | 40

Re: [Qemu-block] [PATCH v9] ssh: switch from libssh2 to libssh

2019-06-14 Thread Philippe Mathieu-Daudé
On 6/13/19 9:31 PM, Max Reitz wrote: > On 13.06.19 15:20, Pino Toscano wrote: >> Rewrite the implementation of the ssh block driver to use libssh instead >> of libssh2. The libssh library has various advantages over libssh2: >> - easier API for authentication (for example for using ssh-agent) >>

Re: [Qemu-block] [PATCH v9] ssh: switch from libssh2 to libssh

2019-06-14 Thread Pino Toscano
On Thursday, 13 June 2019 21:31:40 CEST Max Reitz wrote: > On 13.06.19 15:20, Pino Toscano wrote: > > -switch (r) { > > -case LIBSSH2_KNOWNHOST_CHECK_MATCH: > > +switch (state) { > > +case SSH_KNOWN_HOSTS_OK: > > /* OK */ > > -

Re: [Qemu-block] [Qemu-devel] [PATCH 0/6] configure: Try to fix --static linking

2019-06-14 Thread Peter Maydell
On Fri, 14 Jun 2019 at 14:58, Alex Bennée wrote: > It would be nice to have a --static-user config flag and deprecate the > --static flag. I don't think there is a decent use case for system > emulation targets. It would be really tricky to build half with static and half without: our configure

Re: [Qemu-block] [PATCH 6/6] .travis.yml: Test static linking

2019-06-14 Thread Alex Bennée
Philippe Mathieu-Daudé writes: > Signed-off-by: Philippe Mathieu-Daudé > --- > This job currently fails: > > LINKlm32-softmmu/qemu-system-lm32 > /usr/bin/ld: cannot find -lgtk-3 > /usr/bin/ld: cannot find -latk-bridge-2.0 > /usr/bin/ld: cannot find -latspi >

Re: [Qemu-block] [PATCH v9] ssh: switch from libssh2 to libssh

2019-06-14 Thread Max Reitz
On 14.06.19 16:29, Pino Toscano wrote: > On Thursday, 13 June 2019 21:31:40 CEST Max Reitz wrote: >> On 13.06.19 15:20, Pino Toscano wrote: >>> -switch (r) { >>> -case LIBSSH2_KNOWNHOST_CHECK_MATCH: >>> +switch (state) { >>> +case SSH_KNOWN_HOSTS_OK: >>> /* OK */ >>> -

Re: [Qemu-block] [PATCH v9] ssh: switch from libssh2 to libssh

2019-06-14 Thread Max Reitz
On 14.06.19 16:26, Philippe Mathieu-Daudé wrote: > On 6/13/19 9:31 PM, Max Reitz wrote: >> On 13.06.19 15:20, Pino Toscano wrote: >>> Rewrite the implementation of the ssh block driver to use libssh instead >>> of libssh2. The libssh library has various advantages over libssh2: >>> - easier API

Re: [Qemu-block] [PATCH v6] ssh: switch from libssh2 to libssh

2019-06-14 Thread Pino Toscano
On Thursday, 13 June 2019 21:41:58 CEST Stefan Weil wrote: > On 12.06.19 15:27, Philippe Mathieu-Daudé wrote: > > Cc'ing Alex (Docker, Travis) and Stefan (MinGW) > [...] > > Note, libssh is not available on MinGW. > > Nor is it available for Mingw64: > >

[Qemu-block] [PULL 17/20] blkdebug: Add "none" event

2019-06-14 Thread Max Reitz
Together with @iotypes and @sector, this can be used to trap e.g. the first read or write access to a certain sector without having to know what happens internally in the block layer, i.e. which "real" events happen right before such an access. Signed-off-by: Max Reitz Reviewed-by: Vladimir

[Qemu-block] [PULL 19/20] iotests: Test qemu-img convert --salvage

2019-06-14 Thread Max Reitz
This test converts a simple image to another, but blkdebug injects block_status and read faults at some offsets. The resulting image should be the same as the input image, except that sectors that could not be read have to be 0. Signed-off-by: Max Reitz Message-id:

[Qemu-block] [PULL 15/20] qemu-img: Add salvaging mode to convert

2019-06-14 Thread Max Reitz
This adds a salvaging mode (--salvage) to qemu-img convert which ignores read errors and treats the respective areas as containing only zeroes. This can be used for instance to at least partially recover the data from terminally corrupted qcow2 images. Signed-off-by: Max Reitz Reviewed-by:

Re: [Qemu-block] [PATCH v5 14/42] block: Use CAFs when working with backing chains

2019-06-14 Thread Max Reitz
On 14.06.19 15:26, Vladimir Sementsov-Ogievskiy wrote: > 13.06.2019 1:09, Max Reitz wrote: >> Use child access functions when iterating through backing chains so >> filters do not break the chain. >> >> Signed-off-by: Max Reitz >> --- >> block.c | 40 >>

Re: [Qemu-block] [PATCH v3 0/8] block: Ignore loosening perm restrictions failures

2019-06-14 Thread Kevin Wolf
Am 22.05.2019 um 19:03 hat Max Reitz geschrieben: > Hi, > > This series is mainly a fix for > https://bugzilla.redhat.com/show_bug.cgi?id=1703793. The problem > described there is that mirroring to a gluster volume, then switching > off the volume makes qemu crash. There are two problems here:

Re: [Qemu-block] [PATCH v5 16/42] block: Use child access functions when flushing

2019-06-14 Thread Vladimir Sementsov-Ogievskiy
13.06.2019 1:09, Max Reitz wrote: > If the driver does not support .bdrv_co_flush() so bdrv_co_flush() > itself has to flush the children of the given node, it should not flush > just bs->file->bs, but in fact both the child that stores data, and the > one that stores metadata (if they are

[Qemu-block] [PULL 13/20] blockdev: Overlays are not snapshots

2019-06-14 Thread Max Reitz
There are error messages which refer to an overlay node as the snapshot. That is wrong, those are two different things. Signed-off-by: Max Reitz Reviewed-by: Eric Blake Message-id: 20190603202236.1342-3-mre...@redhat.com Reviewed-by: John Snow Reviewed-by: Alberto Garcia Signed-off-by: Max

Re: [Qemu-block] [Qemu-devel] [PATCH 0/6] configure: Try to fix --static linking

2019-06-14 Thread Alex Bennée
Peter Maydell writes: > On Fri, 14 Jun 2019 at 08:27, Philippe Mathieu-Daudé > wrote: >> Apparently QEMU static linking is slowly bitroting. Obviously it >> depends the libraries an user has installed, anyway it seems there >> are not much testing done. > > The main reason for supporting

[Qemu-block] [PULL 16/20] blkdebug: Add @iotype error option

2019-06-14 Thread Max Reitz
This new error option allows users of blkdebug to inject errors only on certain kinds of I/O operations. Users usually want to make a very specific operation fail, not just any; but right now they simply hope that the event that triggers the error injection is followed up with that very

[Qemu-block] [PULL 10/20] iotests: restrict 254 to support only qcow2

2019-06-14 Thread Max Reitz
From: Vladimir Sementsov-Ogievskiy Test fails at least for qcow, because of different cluster sizes in base and top (and therefore different granularities of bitmaps we are trying to merge). The test aim is to check block-dirty-bitmap-merge between different nodes functionality, no needs to

[Qemu-block] [PULL 07/20] iotests: Filter 175's allocation information

2019-06-14 Thread Max Reitz
It is possible for an empty file to take up blocks on a filesystem, for example: $ qemu-img create -f raw test.img 1G Formatting 'test.img', fmt=raw size=1073741824 $ mkfs.ext4 -I 128 -q test.img $ mkdir test-mount $ sudo mount -o loop test.img test-mount $ sudo touch test-mount/test-file $ stat

[Qemu-block] [PATCH] block/replication.c: Fix crash issue after failover

2019-06-14 Thread Zhang Chen
From: Zhang Chen No block job on active disk after failover. In the replication_stop() function have canceled the block job, we check it again here. Signed-off-by: Zhang Chen --- block/replication.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/block/replication.c

[Qemu-block] [PULL 09/20] hw/block/fdc: floppy command FIFO memory initialization

2019-06-14 Thread Max Reitz
From: Andrey Shinkevich The uninitialized memory allocated for the command FIFO of the floppy controller during the VM hardware initialization incurs many unwanted reports by Valgrind when VM state is being saved. That verbosity hardens a search for the real memory issues when the iotests run.

[Qemu-block] [PULL 18/20] blkdebug: Inject errors on .bdrv_co_block_status()

2019-06-14 Thread Max Reitz
Signed-off-by: Max Reitz Reviewed-by: Eric Blake Reviewed-by: Vladimir Sementsov-Ogievskiy Message-id: 20190507203508.18026-6-mre...@redhat.com Signed-off-by: Max Reitz --- qapi/block-core.json | 5 - block/blkdebug.c | 8 2 files changed, 12 insertions(+), 1 deletion(-)

[Qemu-block] [PULL 20/20] iotests: Test qemu-img convert -C --salvage

2019-06-14 Thread Max Reitz
We do not support this combination (yet), so this should yield an error message. Signed-off-by: Max Reitz Tested-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Vladimir Sementsov-Ogievskiy Message-id: 20190507203508.18026-8-mre...@redhat.com Signed-off-by: Max Reitz --- tests/qemu-iotests/082

Re: [Qemu-block] [PATCH v5 15/42] block: Re-evaluate backing file handling in reopen

2019-06-14 Thread Vladimir Sementsov-Ogievskiy
13.06.2019 1:09, Max Reitz wrote: > Reopening a node's backing child needs a bit of special handling because > the "backing" child has different defaults than all other children > (among other things). Adding filter support here is a bit more > difficult than just using the child access

[Qemu-block] [PULL 14/20] qemu-img: Move quiet into ImgConvertState

2019-06-14 Thread Max Reitz
Move img_convert()'s quiet flag into the ImgConvertState so it is accessible by nested functions. -q dictates that it suppresses anything but errors, so if those functions want to emit warnings, they need to query this flag first. (There currently are no such warnings, but there will be as of

[Qemu-block] [PULL 11/20] qemu-img: Fix options leakage in img_rebase()

2019-06-14 Thread Max Reitz
img_rebase() can leak a QDict in two occasions. Fix it. Coverity: CID 1401416 Fixes: d16699b64671466b42079c45b89127aeea1ca565 Fixes: 330c72957196e0ae382abcaa97ebf4eb9bc8574f Signed-off-by: Max Reitz Message-id: 20190528195338.12376-1-mre...@redhat.com Reviewed-by: John Snow Signed-off-by: Max

[Qemu-block] [PULL 04/20] iotests.py: rewrite run_job to be pickier

2019-06-14 Thread Max Reitz
From: John Snow Don't pull events out of the queue that don't belong to us; be choosier so that we can use this method to drive jobs that were launched by transactions that may have more jobs. Signed-off-by: John Snow Message-id: 20190523170643.20794-5-js...@redhat.com Reviewed-by: Max Reitz

[Qemu-block] [PULL 01/20] blockdev-backup: don't check aio_context too early

2019-06-14 Thread Max Reitz
From: John Snow in blockdev_backup_prepare, we check to make sure that the target is associated with a compatible aio context. However, do_blockdev_backup is called later and has some logic to move the target to a compatible aio_context. The transaction version will fail certain commands

[Qemu-block] [PULL 12/20] qapi/block-core: Overlays are not snapshots

2019-06-14 Thread Max Reitz
A snapshot is something that reflects the state of something at a certain point in time. It does not change. The file our snapshot commands create (or the node they install) is not a snapshot, as it does change over time. It is an overlay. We cannot do anything about the parameter names, but

[Qemu-block] [PULL 05/20] iotests: add iotest 256 for testing blockdev-backup across iothread contexts

2019-06-14 Thread Max Reitz
From: John Snow Signed-off-by: John Snow Message-id: 20190523170643.20794-6-js...@redhat.com Reviewed-by: Max Reitz [mreitz: Moved from 250 to 256] Signed-off-by: Max Reitz --- tests/qemu-iotests/256 | 122 + tests/qemu-iotests/256.out | 119

[Qemu-block] [PULL 08/20] iotests: Fix intermittent failure in 219

2019-06-14 Thread Max Reitz
In 219, we wait for the job to make progress before we emit its status. This makes the output reliable. We do not wait for any more progress if the job's current-progress already matches its total-progress. Unfortunately, there is a bug: Right after the job has been started, it's possible that

[Qemu-block] [PULL 03/20] QEMUMachine: add events_wait method

2019-06-14 Thread Max Reitz
From: John Snow Instead of event_wait which looks for a single event, add an events_wait which can look for any number of events simultaneously. However, it will still only return one at a time, whichever happens first. Signed-off-by: John Snow Message-id:

[Qemu-block] [PULL 02/20] iotests.py: do not use infinite waits

2019-06-14 Thread Max Reitz
From: John Snow Cap waits to 60 seconds so that iotests can fail gracefully if something goes wrong. Signed-off-by: John Snow Message-id: 20190523170643.20794-3-js...@redhat.com Reviewed-by: Max Reitz Signed-off-by: Max Reitz --- tests/qemu-iotests/iotests.py | 14 +++--- 1 file

[Qemu-block] [PULL 06/20] event_match: always match on None value

2019-06-14 Thread Max Reitz
From: John Snow Before, event_match didn't always recurse if the event value was not a dictionary, and would instead check for equality immediately. By delaying equality checking to post-recursion, we can allow leaf values like "5" to match "None" and take advantage of the generic

[Qemu-block] [PULL 00/20] Block patches

2019-06-14 Thread Max Reitz
The following changes since commit 5ec2eca83dc478ddf24077e02a8b34dd26cd3ff9: Merge remote-tracking branch 'remotes/awilliam/tags/vfio-updates-20190613.0' into staging (2019-06-14 09:33:55 +0100) are available in the Git repository at: https://github.com/XanClic/qemu.git

Re: [Qemu-block] [PATCH v5 14/42] block: Use CAFs when working with backing chains

2019-06-14 Thread Vladimir Sementsov-Ogievskiy
13.06.2019 1:09, Max Reitz wrote: > Use child access functions when iterating through backing chains so > filters do not break the chain. > > Signed-off-by: Max Reitz > --- > block.c | 40 > 1 file changed, 28 insertions(+), 12 deletions(-) > > diff

Re: [Qemu-block] [PATCH v8 4/7] block: introduce backup-top filter driver

2019-06-14 Thread Max Reitz
On 14.06.19 11:04, Vladimir Sementsov-Ogievskiy wrote: > 13.06.2019 18:57, Max Reitz wrote: >> On 29.05.19 17:46, Vladimir Sementsov-Ogievskiy wrote: >>> Backup-top filter does copy-before-write operation. It should be >>> inserted above active disk and has a target node for CBW, like the >>>

Re: [Qemu-block] [PATCH v6] ssh: switch from libssh2 to libssh

2019-06-14 Thread Philippe Mathieu-Daudé
On 6/14/19 2:29 PM, Stefan Weil wrote: > On 14.06.19 12:13, Philippe Mathieu-Daudé wrote: >> I agree with Kevin. The only user of the 'ssh' block driver that I am >> aware of is the virt-v2v tool: >> >> http://libguestfs.org/virt-v2v.1.html#convert-from-esxi-hypervisor-over-ssh-to-local-libvirt >>

Re: [Qemu-block] [PATCH v6] ssh: switch from libssh2 to libssh

2019-06-14 Thread Stefan Weil
On 14.06.19 12:13, Philippe Mathieu-Daudé wrote: > I agree with Kevin. The only user of the 'ssh' block driver that I am > aware of is the virt-v2v tool: > > http://libguestfs.org/virt-v2v.1.html#convert-from-esxi-hypervisor-over-ssh-to-local-libvirt > > Stefan, do you think someone would use it

Re: [Qemu-block] [PATCH v5 13/42] block: Use CAFs in block status functions

2019-06-14 Thread Vladimir Sementsov-Ogievskiy
13.06.2019 1:09, Max Reitz wrote: > Use the child access functions in the block status inquiry functions as > appropriate. > > Signed-off-by: Max Reitz Reviewed-by: Vladimir Sementsov-Ogievskiy -- Best regards, Vladimir

Re: [Qemu-block] [Qemu-devel] [PATCH v3 15/15] vl: Deprecate -mon pretty=... for HMP monitors

2019-06-14 Thread Markus Armbruster
Kevin Wolf writes: > Am 14.06.2019 um 11:01 hat Markus Armbruster geschrieben: >> Kevin Wolf writes: >> >> > The -mon pretty=on|off switch of the -mon option applies only the QMP > > s/the QMP/to QMP/ > > Can you fix up this one as well while you're at it? Sure! >> > monitors. It used to be

Re: [Qemu-block] [Qemu-devel] [PATCH] block/replication.c: Fix crash issue after failover

2019-06-14 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20190614092853.26551-1-chen.zh...@intel.com/ Hi, This series failed the asan build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. === TEST SCRIPT BEGIN === #!/bin/bash

Re: [Qemu-block] [PATCH v6] ssh: switch from libssh2 to libssh

2019-06-14 Thread Philippe Mathieu-Daudé
On 6/14/19 11:42 AM, Kevin Wolf wrote: > Am 13.06.2019 um 21:41 hat Stefan Weil geschrieben: >> On 12.06.19 15:27, Philippe Mathieu-Daudé wrote: >>> Cc'ing Alex (Docker, Travis) and Stefan (MinGW) >> [...] >>> Note, libssh is not available on MinGW. >> >> Nor is it available for Mingw64: Yes, by

Re: [Qemu-block] [PATCH 0/4] block: drop bs->job

2019-06-14 Thread Kevin Wolf
Am 06.06.2019 um 17:41 hat Vladimir Sementsov-Ogievskiy geschrieben: > Hi all! > > These series follow Kevin's suggestions under > https://lists.gnu.org/archive/html/qemu-devel/2019-06/msg00670.html > [Qemu-devel] [PATCH v2 0/2] introduce pinned blk > (hope you don't mind me using exactly your

Re: [Qemu-block] [PATCH] block/replication.c: Fix crash issue after failover

2019-06-14 Thread Kevin Wolf
Am 14.06.2019 um 11:28 hat Zhang Chen geschrieben: > From: Zhang Chen > > No block job on active disk after failover. > In the replication_stop() function have canceled the block job, > we check it again here. > > Signed-off-by: Zhang Chen > --- > block/replication.c | 4 +++- > 1 file

[Qemu-block] [PATCH v2 8/9] tests/docker: Kludge for missing libunistring.so symlink on Ubuntu 18.04

2019-06-14 Thread Philippe Mathieu-Daudé
When linking statically on Ubuntu 18.04 we get: $ make subdir-x86_64-softmmu [...] LINKx86_64-softmmu/qemu-system-x86_64 c++: error: /usr/lib/x86_64-linux-gnu/libunistring.so: No such file or directory This library is pulled in by GTK: $ pkg-config --libs --static gtk+-3.0

[Qemu-block] [PATCH v2 9/9] .travis.yml: Test softmmu static linking

2019-06-14 Thread Philippe Mathieu-Daudé
Add a test to avoid the ./configure script to bitrot. Signed-off-by: Philippe Mathieu-Daudé --- .travis.yml | 5 + 1 file changed, 5 insertions(+) diff --git a/.travis.yml b/.travis.yml index 08502c0aa2..6962fff826 100644 --- a/.travis.yml +++ b/.travis.yml @@ -92,6 +92,11 @@ matrix:

[Qemu-block] [PATCH v2 4/9] configure: Link test before auto-enabling libusbredir library

2019-06-14 Thread Philippe Mathieu-Daudé
Similarly to commit a73e82ef912, test the library links correctly before considering it as usable. This fixes using ./configure --static on Ubuntu 18.04: $ make subdir-aarch64-softmmu [...] LINKaarch64-softmmu/qemu-system-aarch64 /usr/bin/ld: cannot find -lusbredirparser

[Qemu-block] [PATCH v2 7/9] configure: Link test before auto-enabling GTK libraries

2019-06-14 Thread Philippe Mathieu-Daudé
Similarly to commit a73e82ef912, test the libraries link correctly before considering them as usable. This fixes using ./configure --static on Ubuntu 18.04: $ make subdir-lm32-softmmu [...] LINKlm32-softmmu/qemu-system-lm32 /usr/bin/ld: cannot find -lgtk-3 /usr/bin/ld: cannot find

[Qemu-block] [PATCH v2 6/9] configure: Link test before auto-enabling OpenGL libraries

2019-06-14 Thread Philippe Mathieu-Daudé
Similarly to commit a73e82ef912, test the libraries link correctly before considering them as usable. This fixes using ./configure --static on Ubuntu 18.04: $ make subdir-lm32-softmmu [...] LINKlm32-softmmu/qemu-system-lm32 /usr/bin/ld: cannot find -lepoxy /usr/bin/ld: cannot find

[Qemu-block] [PATCH v2 5/9] configure: Link test before auto-enabling PulseAudio library

2019-06-14 Thread Philippe Mathieu-Daudé
Similarly to commit a73e82ef912, test the library links correctly before considering it as usable. This fixes using ./configure --static on Ubuntu 18.04: $ make subdir-aarch64-softmmu [...] LINKaarch64-softmmu/qemu-system-aarch64 /usr/bin/ld: cannot find -lpulse /usr/bin/ld:

[Qemu-block] [PATCH v2 3/9] configure: Link test before auto-enabling libusb library

2019-06-14 Thread Philippe Mathieu-Daudé
Similarly to commit a73e82ef912, test the library links correctly before considering it as usable. This fixes using ./configure --static on Ubuntu 18.04: $ make subdir-aarch64-softmmu [...] LINKaarch64-softmmu/qemu-system-aarch64 /usr/bin/ld: cannot find -ludev collect2: error:

[Qemu-block] [PATCH v2 1/9] configure: Only generate GLUSTERFS variables if glusterfs is usable

2019-06-14 Thread Philippe Mathieu-Daudé
It is pointless and confusing to have GLUSTERFS variables in config-host.mak when glusterfs is not usable. Reviewed-by: Niels de Vos Signed-off-by: Philippe Mathieu-Daudé --- configure | 36 ++-- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git

[Qemu-block] [PATCH v2 0/9] configure: Fix softmmu --static linking

2019-06-14 Thread Philippe Mathieu-Daudé
Hi, Apparently QEMU static linking is slowly bitroting. Obviously it depends the libraries an user has installed, anyway it seems there are not much testing done. This series fixes few issues, enough to build QEMU on a Ubuntu 18.04 host. Peter commented on v1: The main reason for supporting

Re: [Qemu-block] [PATCH] iotests: Hide timestamps for skipped tests

2019-06-14 Thread Kevin Wolf
Am 13.06.2019 um 20:37 hat Max Reitz geschrieben: > Currently, the "thistime" variable is not reinitialized on every loop > iteration. This leads to tests that do not yield a run time (because > they failed or were skipped) printing the run time of the previous test > that did. Fix that by

Re: [Qemu-block] [QEMU] [PATCH v2 0/8] Add Qemu to SeaBIOS LCHS interface

2019-06-14 Thread Sam Eiderman
> On 14 Jun 2019, at 7:43, Gerd Hoffmann wrote: > > Hi, > >> Can there be a guest that will fail the MBR in such a way? Yes. >> Look at the following MBR partition table of a Windows XP guest in our >> production >> environment: >> >> Disk size in sectors: 16777216 >> >> Binary (only one

Re: [Qemu-block] [Qemu-devel] [PATCH 1/2] vl: Drain before (block) job cancel when quitting

2019-06-14 Thread Vladimir Sementsov-Ogievskiy
13.06.2019 19:03, Max Reitz wrote: > [re-adding the original CCs, why not] > > On 13.06.19 16:30, Vladimir Sementsov-Ogievskiy wrote: >> 13.06.2019 17:21, Max Reitz wrote: >>> On 13.06.19 16:19, Vladimir Sementsov-Ogievskiy wrote: 13.06.2019 1:08, Max Reitz wrote: > If the main loop

Re: [Qemu-block] [PATCH v6] ssh: switch from libssh2 to libssh

2019-06-14 Thread Kevin Wolf
Am 13.06.2019 um 21:41 hat Stefan Weil geschrieben: > On 12.06.19 15:27, Philippe Mathieu-Daudé wrote: > > Cc'ing Alex (Docker, Travis) and Stefan (MinGW) > [...] > > Note, libssh is not available on MinGW. > > Nor is it available for Mingw64: > >

Re: [Qemu-block] [Qemu-devel] [PATCH v3 00/15] monitor: Split monitor.c in core/HMP/QMP/misc

2019-06-14 Thread Kevin Wolf
Am 14.06.2019 um 11:06 hat Markus Armbruster geschrieben: > Kevin Wolf writes: > > > monitor.c mixes a lot of different things in a single file: The core > > monitor infrastructure, HMP infrastrcture, QMP infrastructure, and the > > implementation of several HMP and QMP commands. Almost worse,

Re: [Qemu-block] [PATCH v8 7/7] block/backup: use backup-top instead of write notifiers

2019-06-14 Thread Vladimir Sementsov-Ogievskiy
13.06.2019 21:02, Max Reitz wrote: > On 29.05.19 17:46, Vladimir Sementsov-Ogievskiy wrote: >> Drop write notifiers and use filter node instead. Changes: >> >> 1. copy-before-writes now handled by filter node, so, drop all >> is_write_notifier arguments. >> >> 2. we don't have intersecting

Re: [Qemu-block] [Qemu-devel] [PATCH v3 11/15] monitor: Split out monitor/hmp.c

2019-06-14 Thread Dr. David Alan Gilbert
* Markus Armbruster (arm...@redhat.com) wrote: > Kevin Wolf writes: > > > Move HMP infrastructure from monitor/misc.c to monitor/hmp.c. This is > > code that can be shared for all targets, so compile it only once. > > > > The amount of function and particularly extern variables in > >

Re: [Qemu-block] [Qemu-devel] [PATCH v3 15/15] vl: Deprecate -mon pretty=... for HMP monitors

2019-06-14 Thread Kevin Wolf
Am 14.06.2019 um 11:01 hat Markus Armbruster geschrieben: > Kevin Wolf writes: > > > The -mon pretty=on|off switch of the -mon option applies only the QMP s/the QMP/to QMP/ Can you fix up this one as well while you're at it? > > monitors. It used to be silently ignored for HMP. Deprecate this

Re: [Qemu-block] [Qemu-devel] [PATCH v3 00/15] monitor: Split monitor.c in core/HMP/QMP/misc

2019-06-14 Thread Markus Armbruster
Kevin Wolf writes: > monitor.c mixes a lot of different things in a single file: The core > monitor infrastructure, HMP infrastrcture, QMP infrastructure, and the > implementation of several HMP and QMP commands. Almost worse, struct > Monitor mixes state for HMP, for QMP, and state actually

Re: [Qemu-block] [PATCH v8 4/7] block: introduce backup-top filter driver

2019-06-14 Thread Vladimir Sementsov-Ogievskiy
13.06.2019 18:57, Max Reitz wrote: > On 29.05.19 17:46, Vladimir Sementsov-Ogievskiy wrote: >> Backup-top filter does copy-before-write operation. It should be >> inserted above active disk and has a target node for CBW, like the >> following: >> >> +---+ >> | Guest | >>

Re: [Qemu-block] [Qemu-devel] [PATCH v3 15/15] vl: Deprecate -mon pretty=... for HMP monitors

2019-06-14 Thread Markus Armbruster
Kevin Wolf writes: > The -mon pretty=on|off switch of the -mon option applies only the QMP > monitors. It used to be silently ignored for HMP. Deprecate this > combination so that we can make it an error in future versions. > > Signed-off-by: Kevin Wolf > --- > vl.c | 10

Re: [Qemu-block] [Qemu-devel] [PATCH v3 03/15] monitor: Make MonitorQMP a child class of Monitor

2019-06-14 Thread Markus Armbruster
Kevin Wolf writes: > Currently, struct Monitor mixes state that is only relevant for HMP, > state that is only relevant for QMP, and some actually shared state. > In particular, a MonitorQMP field is present in the state of any > monitor, even if it's not a QMP monitor and therefore doesn't use

Re: [Qemu-block] [Qemu-devel] [PATCH 0/6] configure: Try to fix --static linking

2019-06-14 Thread Peter Maydell
On Fri, 14 Jun 2019 at 08:27, Philippe Mathieu-Daudé wrote: > Apparently QEMU static linking is slowly bitroting. Obviously it > depends the libraries an user has installed, anyway it seems there > are not much testing done. The main reason for supporting static linking is so we can build the

Re: [Qemu-block] [Qemu-devel] [PATCH v3 04/15] monitor: Create MonitorHMP with readline state

2019-06-14 Thread Markus Armbruster
Kevin Wolf writes: > The ReadLineState in Monitor is only used for HMP monitors. Create > MonitorHMP and move it there. > > Signed-off-by: Kevin Wolf > Reviewed-by: Dr. David Alan Gilbert > --- > include/monitor/monitor.h | 5 +- > hmp.c | 4 +- > monitor.c

Re: [Qemu-block] [Qemu-devel] [PATCH v3 02/15] monitor: Split monitor_init in HMP and QMP function

2019-06-14 Thread Markus Armbruster
Kevin Wolf writes: > Instead of mixing HMP and QMP monitors in the same function, separate > the monitor creation function for both. > > While in theory, one could pass both MONITOR_USE_CONTROL and > MONITOR_USE_READLINE before this patch and both flags would do > something, readline support is

Re: [Qemu-block] [Qemu-devel] [PATCH v3 14/15] monitor: Replace monitor_init() with monitor_init_{hmp, qmp}()

2019-06-14 Thread Markus Armbruster
Kevin Wolf writes: > Most callers know which monitor type they want to have. Instead of > calling monitor_init() with flags that can describe both types of > monitors, make monitor_init_{hmp,qmp}() public interfaces that take > specific bools instead of flags and call these functions directly. >

Re: [Qemu-block] [Qemu-devel] [PATCH v3 13/15] monitor: Split Monitor.flags into separate bools

2019-06-14 Thread Markus Armbruster
Kevin Wolf writes: > Monitor.flags contains three different flags: One to distinguish HMP > from QMP; one specific to HMP (MONITOR_USE_READLINE) that is ignored > with QMP; and another one specific to QMP (MONITOR_USE_PRETTY) that is > ignored with HMP. > > Split the flags field into three bools

Re: [Qemu-block] [PATCH 0/6] configure: Try to fix --static linking

2019-06-14 Thread Philippe Mathieu-Daudé
On 6/14/19 9:24 AM, Philippe Mathieu-Daudé wrote: > Hi, > > Apparently QEMU static linking is slowly bitroting. Obviously it > depends the libraries an user has installed, anyway it seems there > are not much testing done. > > This series fixes few issues, enough to build QEMU on a Ubuntu >

Re: [Qemu-block] [Qemu-devel] [PATCH v3 09/15] monitor: Create monitor-internal.h with common definitions

2019-06-14 Thread Kevin Wolf
Am 14.06.2019 um 08:37 hat Markus Armbruster geschrieben: > Kevin Wolf writes: > > > Before we can split monitor/misc.c, we need to create a header file that > > contains the common definitions that will be used by multiple source > > files. > > > > For a start, add the type definitions for

  1   2   >