Re: [Qemu-block] [PATCH v3 1/2] block: sync bdrv_co_get_block_status_above() with bdrv_is_allocated_above()

2016-09-19 Thread Max Reitz
On 2016-09-15 at 18:34, Denis V. Lunev wrote: They should work very similar, covering same areas if backing store is shorter than the image. This change is necessary for the followup patch switching to bdrv_get_block_status_above() in mirror to avoid assert in check_block. This change should be

Re: [Qemu-block] [Qemu-devel] [PATCH v4 0/2] block: allow flush on devices with open tray

2016-09-19 Thread Max Reitz
On 19.09.2016 23:21, John Snow wrote: > > > On 09/19/2016 04:58 PM, Max Reitz wrote: >> On 19.09.2016 18:44, John Snow wrote: >>> Final re-send for wording. >>> >>> The move to blk_flush altered the behavior of migration and flushing >>> nodes that are not reachable via the guest, but are still

Re: [Qemu-block] [Qemu-devel] [PATCH v4 0/2] block: allow flush on devices with open tray

2016-09-19 Thread John Snow
On 09/19/2016 04:58 PM, Max Reitz wrote: On 19.09.2016 18:44, John Snow wrote: Final re-send for wording. The move to blk_flush altered the behavior of migration and flushing nodes that are not reachable via the guest, but are still reachable via QEMU and may or may not need to be flushed.

Re: [Qemu-block] [PULL v2 0/8] Block layer patches

2016-09-19 Thread Max Reitz
On 19.09.2016 13:39, Peter Maydell wrote: > On 17 September 2016 at 23:05, Max Reitz wrote: >> The following changes since commit e3571ae30cd26d19efd4554c25e32ef64d6a36b3: >> >> Merge remote-tracking branch 'remotes/rth/tags/pull-tcg-20160916' into >> staging (2016-09-16

Re: [Qemu-block] [PATCH v4 0/2] block: allow flush on devices with open tray

2016-09-19 Thread Max Reitz
On 19.09.2016 18:44, John Snow wrote: > Final re-send for wording. > > The move to blk_flush altered the behavior of migration and flushing > nodes that are not reachable via the guest, but are still reachable > via QEMU and may or may not need to be flushed. > > This is likely the simplest

Re: [Qemu-block] [Qemu-devel] [PATCH v3 1/2] block: sync bdrv_co_get_block_status_above() with bdrv_is_allocated_above()

2016-09-19 Thread Eric Blake
On 09/18/2016 11:37 PM, Denis V. Lunev wrote: > On 09/19/2016 04:21 AM, Fam Zheng wrote: >> On Thu, 09/15 19:34, Denis V. Lunev wrote: >>> They should work very similar, covering same areas if backing store is >>> shorter than the image. This change is necessary for the followup patch >>>

Re: [Qemu-block] [PATCH v8 10/12] uuid: Tighten uuid parse

2016-09-19 Thread Eric Blake
On 09/17/2016 11:25 PM, Fam Zheng wrote: > sscanf is relatively loose (tolerate) on some invalid formats that we > should fail instead of generating a wrong uuid structure, like with > whitespaces and short strings. > > Add and use a helper function to first check the format. > > Signed-off-by:

Re: [Qemu-block] [Qemu-devel] [PATCH 1/6] iotests: throw away test timings if args change

2016-09-19 Thread Eric Blake
On 09/19/2016 12:35 PM, Daniel P. Berrange wrote: > The 'check' program records timings for each test that > is run. These timings are only valid, however, for a > particular format/protocol combination. So if frequently > running 'check' with a variety of different formats or > protocols, the

Re: [Qemu-block] [PATCH v2 08/10] block: Accept device model name for blockdev-change-medium

2016-09-19 Thread Eric Blake
On 09/19/2016 11:54 AM, Kevin Wolf wrote: > In order to remove the necessity to use BlockBackend names in the > external API, we want to allow qdev device names in all device related > commands. > > This converts blockdev-change-medium to accept a qdev device name. > > Signed-off-by: Kevin Wolf

Re: [Qemu-block] [PATCH v2 07/10] block: Accept device model name for eject

2016-09-19 Thread Eric Blake
On 09/19/2016 11:54 AM, Kevin Wolf wrote: > In order to remove the necessity to use BlockBackend names in the > external API, we want to allow qdev device names in all device related > commands. > > This converts eject to accept a qdev device name. > > Signed-off-by: Kevin Wolf

Re: [Qemu-block] [PATCH v2 10/10] qemu-iotests/118: Test media change with qdev name

2016-09-19 Thread Eric Blake
On 09/19/2016 11:54 AM, Kevin Wolf wrote: > We just added the option to use qdev device names in all device related > block QMP commands. This patch converts some of the test cases in 118 to > use qdev device names instead of BlockBackend names to cover the new > way. It converts cases for each of

Re: [Qemu-block] [PATCH v2 06/10] block: Accept device model name for x-blockdev-remove-medium

2016-09-19 Thread Eric Blake
On 09/19/2016 11:54 AM, Kevin Wolf wrote: > In order to remove the necessity to use BlockBackend names in the > external API, we want to allow qdev device names in all device related > commands. > > This converts x-blockdev-remove-medium to accept a qdev device name. > > As the command is

Re: [Qemu-block] [PATCH v2 09/10] block: Accept device model name for block_set_io_throttle

2016-09-19 Thread Eric Blake
On 09/19/2016 11:54 AM, Kevin Wolf wrote: > In order to remove the necessity to use BlockBackend names in the > external API, we want to allow qdev device names in all device related > commands. > > This converts block_set_io_throttle to accept a qdev device name. > > Signed-off-by: Kevin Wolf

Re: [Qemu-block] [PATCH v2 04/10] block: Accept device model name for blockdev-open/close-tray

2016-09-19 Thread Eric Blake
On 09/19/2016 11:54 AM, Kevin Wolf wrote: > In order to remove the necessity to use BlockBackend names in the > external API, we want to allow qdev device names in all device related > commands. > > This converts blockdev-open/close-tray to accept a qdev device name. > > Signed-off-by: Kevin

Re: [Qemu-block] [Qemu-devel] [PATCH v2 00/10] block: Accept qdev IDs in device level QMP commands

2016-09-19 Thread no-reply
Hi, Your series failed automatic build test. Please find the testing commands and their output below. If you have docker installed, you can probably reproduce it locally. Subject: [Qemu-devel] [PATCH v2 00/10] block: Accept qdev IDs in device level QMP commands Message-id:

Re: [Qemu-block] [Qemu-devel] [PATCH v4 0/2] block: allow flush on devices with open tray

2016-09-19 Thread John Snow
On 09/19/2016 02:15 PM, no-re...@ec2-52-6-146-230.compute-1.amazonaws.com wrote: Hi, Your series failed automatic build test. Please find the testing commands and their output below. If you have docker installed, you can probably reproduce it locally. lies and slander! Subject:

Re: [Qemu-block] [Qemu-devel] [PATCH v4 0/2] block: allow flush on devices with open tray

2016-09-19 Thread no-reply
Hi, Your series failed automatic build test. Please find the testing commands and their output below. If you have docker installed, you can probably reproduce it locally. Subject: [Qemu-devel] [PATCH v4 0/2] block: allow flush on devices with open tray Message-id:

Re: [Qemu-block] [PATCH 1/1] block: add cache mode with direct IO and without flushes

2016-09-19 Thread Denis V. Lunev
On 09/16/2016 11:22 AM, Kevin Wolf wrote: > Am 16.09.2016 um 10:15 hat Denis V. Lunev geschrieben: >> On 09/16/2016 11:08 AM, Kevin Wolf wrote: >>> Am 15.09.2016 um 18:39 hat Denis V. Lunev geschrieben: On 09/15/2016 07:09 PM, Kevin Wolf wrote: > Am 15.09.2016 um 15:19 hat Denis V. Lunev

[Qemu-block] [PATCH 5/6] iotests: chown LUKS device before qemu-io launches

2016-09-19 Thread Daniel P. Berrange
On some distros, whenever you close a block device file descriptor there is a udev rule that resets the file permissions. This can race with the test script when we run qemu-io multiple times against the same block device. Occassionally the second qemu-io invokation will find udev has reset the

[Qemu-block] [PATCH 2/6] iotests: fix remainining tests to work with LUKS

2016-09-19 Thread Daniel P. Berrange
The tests 033, 120, 140, 145 and 157 were all broken when run with LUKS, since they did not correctly use the required image opts args syntax to specify the decryption secret. Signed-off-by: Daniel P. Berrange --- tests/qemu-iotests/033 | 16

[Qemu-block] [PATCH 1/6] iotests: throw away test timings if args change

2016-09-19 Thread Daniel P. Berrange
The 'check' program records timings for each test that is run. These timings are only valid, however, for a particular format/protocol combination. So if frequently running 'check' with a variety of different formats or protocols, the times printed can be very misleading. Record the

[Qemu-block] [PATCH 0/6] Improve I/O tests coverage of LUKS

2016-09-19 Thread Daniel P. Berrange
The main goal of this series is to get the I/O tests passing 100% with LUKS when run with './check -luks'. In testing this I noticed that test timings are cached across runs with different block backends which is very misleading. It adds a few more combinations to the LUKS/dmcrypt

[Qemu-block] [PATCH v2 04/10] block: Accept device model name for blockdev-open/close-tray

2016-09-19 Thread Kevin Wolf
In order to remove the necessity to use BlockBackend names in the external API, we want to allow qdev device names in all device related commands. This converts blockdev-open/close-tray to accept a qdev device name. Signed-off-by: Kevin Wolf --- blockdev.c | 61

[Qemu-block] [PATCH 3/6] iotests: reduce PBKDF iterations when testing LUKS

2016-09-19 Thread Daniel P. Berrange
By default the PBKDF algorithm used with LUKS is tuned based on the number of iterations to produce 1 second of running time. This makes running the I/O test with the LUKS format orders of magnitude slower than with qcow2/raw formats. When creating LUKS images, set the iteration time to a 10ms to

[Qemu-block] [PATCH 6/6] iotests: use _filter_qemu with test 140

2016-09-19 Thread Daniel P. Berrange
When run on a loaded host, QEMU may print main-loop: WARNING: I/O thread spun for 10 iterations so we must take care to filter that message. Signed-off-by: Daniel P. Berrange --- tests/qemu-iotests/140 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[Qemu-block] [PATCH 4/6] iotests: add more LUKS hash combination tests

2016-09-19 Thread Daniel P. Berrange
Add tests for sha224, sha512, sha384 and ripemd160 hash algorithms. Signed-off-by: Daniel P. Berrange --- tests/qemu-iotests/149 | 10 +- tests/qemu-iotests/149.out | 482 - 2 files changed, 484 insertions(+), 8 deletions(-)

[Qemu-block] [PATCH v2 01/10] block: Add blk_by_dev()

2016-09-19 Thread Kevin Wolf
This finds a BlockBackend given the device model that is attached to it. Signed-off-by: Kevin Wolf Reviewed-by: Eric Blake --- block/block-backend.c | 19 +++ include/sysemu/block-backend.h | 1 + 2 files changed, 20 insertions(+)

[Qemu-block] [PATCH v2 00/10] block: Accept qdev IDs in device level QMP commands

2016-09-19 Thread Kevin Wolf
In order to remove the necessity to use BlockBackend names in the external API, we already converted all block layer QMP commands on the node level to accept node names instead of BlockBackend names. This series converts the second part, device level commands, to allow qdev device names instead of

[Qemu-block] [PATCH v2 02/10] qdev-monitor: Factor out find_device_state()

2016-09-19 Thread Kevin Wolf
Signed-off-by: Kevin Wolf Reviewed-by: Eric Blake --- qdev-monitor.c | 16 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/qdev-monitor.c b/qdev-monitor.c index e19617f..bc0213f 100644 --- a/qdev-monitor.c +++ b/qdev-monitor.c

[Qemu-block] [PATCH v2 05/10] block: Accept device model name for x-blockdev-insert-medium

2016-09-19 Thread Kevin Wolf
In order to remove the necessity to use BlockBackend names in the external API, we want to allow qdev device names in all device related commands. This converts x-blockdev-insert-medium to accept a qdev device name. As the command is experimental, we can still remove the 'device' option that

[Qemu-block] [PATCH v2 06/10] block: Accept device model name for x-blockdev-remove-medium

2016-09-19 Thread Kevin Wolf
In order to remove the necessity to use BlockBackend names in the external API, we want to allow qdev device names in all device related commands. This converts x-blockdev-remove-medium to accept a qdev device name. As the command is experimental, we can still remove the 'device' option that

[Qemu-block] [PATCH v2 03/10] qdev-monitor: Add blk_by_qdev_id()

2016-09-19 Thread Kevin Wolf
This finds the BlockBackend attached to the device model identified by its qdev ID. Signed-off-by: Kevin Wolf Reviewed-by: Eric Blake --- include/sysemu/block-backend.h | 1 + qdev-monitor.c | 18 ++ 2 files changed, 19

[Qemu-block] [PATCH v2 08/10] block: Accept device model name for blockdev-change-medium

2016-09-19 Thread Kevin Wolf
In order to remove the necessity to use BlockBackend names in the external API, we want to allow qdev device names in all device related commands. This converts blockdev-change-medium to accept a qdev device name. Signed-off-by: Kevin Wolf --- blockdev.c | 18

[Qemu-block] [PATCH v2 10/10] qemu-iotests/118: Test media change with qdev name

2016-09-19 Thread Kevin Wolf
We just added the option to use qdev device names in all device related block QMP commands. This patch converts some of the test cases in 118 to use qdev device names instead of BlockBackend names to cover the new way. It converts cases for each of the media change commands, but only for CD-ROM

[Qemu-block] [PATCH v2 09/10] block: Accept device model name for block_set_io_throttle

2016-09-19 Thread Kevin Wolf
In order to remove the necessity to use BlockBackend names in the external API, we want to allow qdev device names in all device related commands. This converts block_set_io_throttle to accept a qdev device name. Signed-off-by: Kevin Wolf --- blockdev.c | 12

[Qemu-block] [PATCH v2 07/10] block: Accept device model name for eject

2016-09-19 Thread Kevin Wolf
In order to remove the necessity to use BlockBackend names in the external API, we want to allow qdev device names in all device related commands. This converts eject to accept a qdev device name. Signed-off-by: Kevin Wolf --- blockdev.c | 10 +++--- hmp.c

[Qemu-block] [PATCH v4 1/2] block: reintroduce bdrv_flush_all

2016-09-19 Thread John Snow
Commit fe1a9cbc moved the flush_all routine from the bdrv layer to the block-backend layer. In doing so, however, the semantics of the routine changed slightly such that flush_all now used blk_flush instead of bdrv_flush. blk_flush can fail if the attached device model reports that it is not

[Qemu-block] [PATCH v4 0/2] block: allow flush on devices with open tray

2016-09-19 Thread John Snow
Final re-send for wording. The move to blk_flush altered the behavior of migration and flushing nodes that are not reachable via the guest, but are still reachable via QEMU and may or may not need to be flushed. This is likely the simplest solution for now until we nail down our policy a bit

Re: [Qemu-block] [PATCH 0/2] improve aio_poll performance

2016-09-19 Thread Stefan Hajnoczi
On Wed, Sep 14, 2016 at 07:03:37AM -0400, Yaowei Bai wrote: > This patchset change to check epoll's enablement first before nodes > iteration to improve aio_poll()'s performance. > > Also fix a wrong comment of mirror_start(). > > Yaowei Bai (2): > block: mirror: fix wrong comment of

Re: [Qemu-block] [PATCH 04/10] block: Accept device model name for blockdev-open/close-tray

2016-09-19 Thread Kevin Wolf
Am 15.09.2016 um 17:51 hat Eric Blake geschrieben: > On 09/15/2016 03:35 AM, Kevin Wolf wrote: > > >>> > >>> -- "device": block device name (json-string) > >>> +- "device": block device name (deprecated, use @id instead) > >>> +(json-string, optional) > >>> +- "id": the name or QOM

Re: [Qemu-block] [PULL v2 0/8] Block layer patches

2016-09-19 Thread Peter Maydell
On 17 September 2016 at 23:05, Max Reitz wrote: > The following changes since commit e3571ae30cd26d19efd4554c25e32ef64d6a36b3: > > Merge remote-tracking branch 'remotes/rth/tags/pull-tcg-20160916' into > staging (2016-09-16 16:54:50 +0100) > > are available in the git

Re: [Qemu-block] [PATCH v3 2/2] qemu: use bdrv_flush_all for vm_stop et al

2016-09-19 Thread Kevin Wolf
Am 16.09.2016 um 18:17 hat John Snow geschrieben: > > > On 09/15/2016 07:42 PM, John Snow wrote: > >Bypass the usual check to see if we are "allowed" to flush via the > >block model, and manually flush the BDS nodes themselves instead. > > > >This allows us to do things like migrate when we have