Re: [Qemu-block] [PATCH 7/9] iotests.py: tiny refactor: move system imports up

2018-03-09 Thread Vladimir Sementsov-Ogievskiy
16.02.2018 23:44, Eric Blake wrote: On 02/15/2018 07:51 AM, Vladimir Sementsov-Ogievskiy wrote: Signed-off-by: Vladimir Sementsov-Ogievskiy ---   tests/qemu-iotests/iotests.py | 5 +++--   1 file changed, 3 insertions(+), 2 deletions(-) What breaks if they aren't

Re: [Qemu-block] [PATCH v2 2/5] nbd/server: fix sparse read

2018-03-09 Thread Eric Blake
On 03/08/2018 12:46 PM, Vladimir Sementsov-Ogievskiy wrote: In case of io error in nbd_co_send_sparse_read we should not "goto reply:", as it is fatal error and common behavior is disconnect in this case. We should not try to send client an s/send/send the/ error reply, representing

Re: [Qemu-block] [PATCH v3 0/7] block: Handle null backing link

2018-03-09 Thread Eric Blake
On 02/24/2018 09:40 AM, Max Reitz wrote: Currently, we try to rewrite every occurrence of "backing": null into "backing": "" in qmp_blockdev_add(). However, that breaks using the same "backing": null construction in json:{} file names (which do not go through qmp_blockdev_add()). Currently,

Re: [Qemu-block] [PATCH 6/6] qemu-iotests: Test luks QMP image creation

2018-03-09 Thread Eric Blake
On 03/09/2018 11:27 AM, Kevin Wolf wrote: Signed-off-by: Kevin Wolf --- tests/qemu-iotests/208 | 211 +++ tests/qemu-iotests/208.out | 136 tests/qemu-iotests/common.rc | 2 +-

Re: [Qemu-block] [PULL 0/7] Block patches

2018-03-09 Thread Peter Maydell
On 9 March 2018 at 13:19, Stefan Hajnoczi wrote: > The following changes since commit 0ab4537f08e09b13788db67efd760592fb7db769: > > Merge remote-tracking branch > 'remotes/stefanberger/tags/pull-tpm-2018-03-07-1' into staging (2018-03-08 > 12:56:39 +) > > are

Re: [Qemu-block] [PATCH 6/9] nbd: BLOCK_STATUS for standard get_block_status function: client part

2018-03-09 Thread Vladimir Sementsov-Ogievskiy
16.02.2018 23:40, Eric Blake wrote: On 02/15/2018 07:51 AM, Vladimir Sementsov-Ogievskiy wrote: Minimal realization: only one extent in server answer is supported. Flag NBD_CMD_FLAG_REQ_ONE is used to force this behavior. [...] +    memcpy(extent, payload, sizeof(*extent)); +   

Re: [Qemu-block] [PATCH 2/6] luks: Create block_crypto_co_create_generic()

2018-03-09 Thread Eric Blake
On 03/09/2018 11:27 AM, Kevin Wolf wrote: Everything that refers to the protocol layer or QemuOpts is moved out of block_crypto_create_generic(), so that the remaining function is suitable to be called by a .bdrv_co_create implementation. LUKS is the only driver that actually implements the old

Re: [Qemu-block] [PATCH 3/6] luks: Support .bdrv_co_create

2018-03-09 Thread Eric Blake
On 03/09/2018 11:27 AM, Kevin Wolf wrote: This adds the .bdrv_co_create driver callback to luks, which enables image creation over QMP. Signed-off-by: Kevin Wolf --- qapi/block-core.json | 17 - block/crypto.c | 34 ++

Re: [Qemu-block] [PATCH 0/9] nbd block status base:allocation

2018-03-09 Thread Eric Blake
On 02/15/2018 07:51 AM, Vladimir Sementsov-Ogievskiy wrote: Hi all. Here is minimal realization of base:allocation context of NBD block-status extension, which allows to get block status through NBD. Vladimir Sementsov-Ogievskiy (9): nbd/server: add nbd_opt_invalid helper nbd: change

Re: [Qemu-block] [PATCH 1/6] luks: Separate image file creation from formatting

2018-03-09 Thread Eric Blake
On 03/09/2018 11:27 AM, Kevin Wolf wrote: The crypto driver used to create the image file in a callback from the crypto subsystem. If we want to implement .bdrv_co_create, this needs to go away because that callback will get a reference to an already existing block node. Move the image file

[Qemu-block] [PATCH 1/7] parallels: Support .bdrv_co_create

2018-03-09 Thread Kevin Wolf
This adds the .bdrv_co_create driver callback to parallels, which enables image creation over QMP. Signed-off-by: Kevin Wolf --- qapi/block-core.json | 18 - block/parallels.c| 199 ++- 2 files changed, 168

Re: [Qemu-block] [PATCH 4/7] qed: Support .bdrv_co_create

2018-03-09 Thread Eric Blake
On 03/09/2018 03:46 PM, Kevin Wolf wrote: This adds the .bdrv_co_create driver callback to qed, which enables image creation over QMP. Signed-off-by: Kevin Wolf --- qapi/block-core.json | 25 ++- block/qed.c | 204

Re: [Qemu-block] [Qemu-devel] [PATCH 0/5] nbd server fixing and refactoring before BLOCK_STATUS

2018-03-09 Thread Eric Blake
On 03/09/2018 10:41 AM, Eric Blake wrote: On 03/08/2018 12:46 PM, Vladimir Sementsov-Ogievskiy wrote: 01 and 02 are splitted and updated "[PATCH] nbd/server: fix space read", others are new. Vladimir Sementsov-Ogievskiy (5):    nbd/server: move nbd_co_send_structured_error up    nbd/server:

Re: [Qemu-block] [PATCH 5/6] luks: Catch integer overflow for huge sizes

2018-03-09 Thread Eric Blake
On 03/09/2018 11:27 AM, Kevin Wolf wrote: When you request an image size close to UINT64_MAX, the addition of the crypto header may cause an integer overflow. Catch it instead of silently truncating the image size. Signed-off-by: Kevin Wolf --- block/crypto.c | 5 + 1

[Qemu-block] [PATCH 3/7] qcow: Support .bdrv_co_create

2018-03-09 Thread Kevin Wolf
This adds the .bdrv_co_create driver callback to qcow, which enables image creation over QMP. Signed-off-by: Kevin Wolf --- qapi/block-core.json | 21 +- block/qcow.c | 196 ++- 2 files changed, 150 insertions(+), 67

[Qemu-block] [PATCH 4/7] qed: Support .bdrv_co_create

2018-03-09 Thread Kevin Wolf
This adds the .bdrv_co_create driver callback to qed, which enables image creation over QMP. Signed-off-by: Kevin Wolf --- qapi/block-core.json | 25 ++- block/qed.c | 204 ++- 2 files changed, 162 insertions(+), 67

Re: [Qemu-block] [PATCH 3/7] qcow: Support .bdrv_co_create

2018-03-09 Thread Eric Blake
On 03/09/2018 03:46 PM, Kevin Wolf wrote: This adds the .bdrv_co_create driver callback to qcow, which enables image creation over QMP. Signed-off-by: Kevin Wolf --- qapi/block-core.json | 21 +- block/qcow.c | 196

[Qemu-block] [PATCH 5/5] include/block/block_int: Document protocol related functions

2018-03-09 Thread Fabiano Rosas
Clarify that for protocols the brdv_file_open function is used instead of bdrv_open and that protocol_name is expected to be set. Signed-off-by: Fabiano Rosas --- include/block/block_int.h | 6 ++ 1 file changed, 6 insertions(+) diff --git

[Qemu-block] [PATCH 1/5] block/replication: Remove protocol_name field

2018-03-09 Thread Fabiano Rosas
The replication driver is only selected explicitly (via driver=replication,mode=primary,...) so it is not a protocol driver. This patch removes the protocol_name field from the brdv_replication structure so that attempts to invoke this driver using protocol syntax (i.e. replication:) will fail

[Qemu-block] [PATCH 0/5] block: Ensure non-protocol drivers can only be selected explicitly

2018-03-09 Thread Fabiano Rosas
Block drivers can be selected by either protocol syntax: :[:options] or explicitly: driver=[,option=...] For the protocol syntax to work, drivers should set the protocol_name field of the BlockDriver structure and provide bdrv_file_open and bdrv_parse_filename implementations. Conversely,

[Qemu-block] [PATCH 4/5] block/blkreplay: Remove protocol-related fields

2018-03-09 Thread Fabiano Rosas
The blkreplay driver is not a protocol so it should implement bdrv_open instead of bdrv_file_open and not provide a protocol_name. Attempts to invoke this driver using protocol syntax (i.e. blkreplay:) will now fail gracefully: $ qemu-img info blkreplay:foo qemu-img: Could not open

[Qemu-block] [PATCH 3/5] block/throttle: Remove protocol-related fields

2018-03-09 Thread Fabiano Rosas
The throttle driver is not a protocol so it should implement bdrv_open instead of bdrv_file_open and not provide a protocol_name. Attempts to invoke this driver using protocol syntax (i.e. throttle:) will now fail gracefully: $ qemu-img info throttle:foo qemu-img: Could not open

[Qemu-block] [PATCH 2/5] block/quorum: Remove protocol-related fields

2018-03-09 Thread Fabiano Rosas
The quorum driver is not a protocol so it should implement bdrv_open instead of bdrv_file_open and not provide a protocol_name. Attempts to invoke this driver using protocol syntax (i.e. quorum:) will now fail gracefully: $ qemu-img info quorum:foo qemu-img: Could not open 'quorum:foo':

Re: [Qemu-block] [PATCH 4/6] luks: Turn invalid assertion into check

2018-03-09 Thread Eric Blake
On 03/09/2018 11:27 AM, Kevin Wolf wrote: The .bdrv_getlength implementation of the crypto block driver asserted that the payload offset isn't after EOF. This is an invalid assertion to make as the image file could be corrupted. Instead, check it and return -EIO if the file is too small for the

Re: [Qemu-block] [PATCH 3/5] nbd/server: fix: check client->closing before reply sending

2018-03-09 Thread Eric Blake
On 03/08/2018 12:46 PM, Vladimir Sementsov-Ogievskiy wrote: Signed-off-by: Vladimir Sementsov-Ogievskiy --- It's like an RFC. I'm not sure, but this place looks like a bug. Shouldn't we chack client-closing even before nbd_client_receive_next_request() call?

Re: [Qemu-block] [Qemu-devel] [PATCH 3/5] migration/block: rename MAX_INFLIGHT_IO to MAX_IO_BUFFERS

2018-03-09 Thread Peter Lieven
Am 09.03.2018 um 15:58 schrieb Dr. David Alan Gilbert: > * Peter Lieven (p...@kamp.de) wrote: >> this actually limits (as the original commit mesage suggests) the >> number of I/O buffers that can be allocated and not the number >> of parallel (inflight) I/O requests. >> >> Signed-off-by: Peter

[Qemu-block] [PATCH 6/7] vhdx: Support .bdrv_co_create

2018-03-09 Thread Kevin Wolf
This adds the .bdrv_co_create driver callback to vhdx, which enables image creation over QMP. Signed-off-by: Kevin Wolf --- qapi/block-core.json | 37 ++- block/vhdx.c | 174 ++- 2 files changed, 167

[Qemu-block] [PATCH 0/7] block: .bdrv_co_create for format drivers

2018-03-09 Thread Kevin Wolf
This series adds a .bdrv_co_create implementation to almost all format drivers that support creating images where its still missing. The only exception is VMDK because its support for extents will make the QAPI design a bit more complicated. The other format driver not covered in this series are

[Qemu-block] [PATCH 7/7] vpc: Support .bdrv_co_create

2018-03-09 Thread Kevin Wolf
This adds the .bdrv_co_create driver callback to vpc, which enables image creation over QMP. Signed-off-by: Kevin Wolf --- qapi/block-core.json | 33 ++- block/vpc.c | 152 ++- 2 files changed, 147

Re: [Qemu-block] [PATCH 0/9] nbd block status base:allocation

2018-03-09 Thread Vladimir Sementsov-Ogievskiy
09.03.2018 22:08, Eric Blake wrote: On 02/15/2018 07:51 AM, Vladimir Sementsov-Ogievskiy wrote: Hi all. Here is minimal realization of base:allocation context of NBD block-status extension, which allows to get block status through NBD. Vladimir Sementsov-Ogievskiy (9):    nbd/server: add

[Qemu-block] [PATCH 5/7] vdi: Support .bdrv_co_create

2018-03-09 Thread Kevin Wolf
This adds the .bdrv_co_create driver callback to vdi, which enables image creation over QMP. Signed-off-by: Kevin Wolf --- qapi/block-core.json | 21 ++- block/vdi.c | 169 ++- 2 files changed, 148 insertions(+), 42

[Qemu-block] [PATCH 2/7] qemu-iotests: Enable write tests for parallels

2018-03-09 Thread Kevin Wolf
Originally we added parallels as a read-only format to qemu-iotests where we did just some tests with a binary image. Since then, write and image creation support has been added to the driver, so we can now enable it in _supported_fmt generic. The driver doesn't support migration yet, though, so

Re: [Qemu-block] [PATCH 4/6] luks: Turn invalid assertion into check

2018-03-09 Thread Kevin Wolf
Am 09.03.2018 um 21:19 hat Eric Blake geschrieben: > On 03/09/2018 11:27 AM, Kevin Wolf wrote: > > The .bdrv_getlength implementation of the crypto block driver asserted > > that the payload offset isn't after EOF. This is an invalid assertion to > > make as the image file could be corrupted.

Re: [Qemu-block] [PATCH 4/5] nbd/server: refactor nbd_trip: cmd_read and generic reply

2018-03-09 Thread Eric Blake
On 03/08/2018 12:46 PM, Vladimir Sementsov-Ogievskiy wrote: nbd_trip has difficult logic of sending reply: it tries to use one code path for all replies. It is ok for simple replies, but is not comfortable for structured replies. Also, two types of error (and corresponding message in local_err)

[Qemu-block] [PATCH 2/6] luks: Create block_crypto_co_create_generic()

2018-03-09 Thread Kevin Wolf
Everything that refers to the protocol layer or QemuOpts is moved out of block_crypto_create_generic(), so that the remaining function is suitable to be called by a .bdrv_co_create implementation. LUKS is the only driver that actually implements the old interface, and we don't intend to use it in

[Qemu-block] [PATCH 4/6] luks: Turn invalid assertion into check

2018-03-09 Thread Kevin Wolf
The .bdrv_getlength implementation of the crypto block driver asserted that the payload offset isn't after EOF. This is an invalid assertion to make as the image file could be corrupted. Instead, check it and return -EIO if the file is too small for the payload offset. Zero length images are

[Qemu-block] [PATCH 3/6] luks: Support .bdrv_co_create

2018-03-09 Thread Kevin Wolf
This adds the .bdrv_co_create driver callback to luks, which enables image creation over QMP. Signed-off-by: Kevin Wolf --- qapi/block-core.json | 17 - block/crypto.c | 34 ++ 2 files changed, 50 insertions(+), 1

[Qemu-block] [PATCH 6/6] qemu-iotests: Test luks QMP image creation

2018-03-09 Thread Kevin Wolf
Signed-off-by: Kevin Wolf --- tests/qemu-iotests/208 | 211 +++ tests/qemu-iotests/208.out | 136 tests/qemu-iotests/common.rc | 2 +- tests/qemu-iotests/group | 1 + 4 files changed, 349

[Qemu-block] [PATCH 0/6] luks: Implement .bdrv_co_create

2018-03-09 Thread Kevin Wolf
This series implements the .bdrv_co_create callback for luks, adds an image creation test for it and contains some bonus fixes for bugs that the test triggered. Kevin Wolf (6): luks: Separate image file creation from formatting luks: Create block_crypto_co_create_generic() luks: Support

Re: [Qemu-block] [PATCH 5/5] nbd/server: refactor nbd_trip: split out nbd_handle_request

2018-03-09 Thread Eric Blake
On 03/08/2018 12:46 PM, Vladimir Sementsov-Ogievskiy wrote: Split out request handling logic. Signed-off-by: Vladimir Sementsov-Ogievskiy --- nbd/server.c | 129 +++ 1 file changed, 67 insertions(+), 62

[Qemu-block] [PATCH 0/2] qemu-iotests fixes

2018-03-09 Thread Amador Pahim
- Skipping test 205 for unsupported formats. - Setting execution permission on test files. Amador Pahim (2): qemu-iotests: skip test 205 for unsupported formats qemu-iotests: set exec permission for tests lacking it tests/qemu-iotests/096 | 0 tests/qemu-iotests/124 | 0

[Qemu-block] [PATCH 2/2] qemu-iotests: set exec permission for tests lacking it

2018-03-09 Thread Amador Pahim
Some tests are not executables. This patch sets the executable permission for those tests lacking that. Signed-off-by: Amador Pahim --- tests/qemu-iotests/096 | 0 tests/qemu-iotests/124 | 0 tests/qemu-iotests/129 | 0 tests/qemu-iotests/132 | 0 tests/qemu-iotests/136 | 0

[Qemu-block] [PATCH 1/2] qemu-iotests: skip test 205 for unsupported formats

2018-03-09 Thread Amador Pahim
Using bochs or cloop, qemu-img will fail with: Format driver 'bochs' does not support image creation Signed-off-by: Amador Pahim --- tests/qemu-iotests/205 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/qemu-iotests/205 b/tests/qemu-iotests/205 index

[Qemu-block] [PATCH 4/4] iotests: Add regression test for commit base locking

2018-03-09 Thread Fam Zheng
Signed-off-by: Fam Zheng --- tests/qemu-iotests/153 | 6 ++ tests/qemu-iotests/153.out | 4 2 files changed, 10 insertions(+) diff --git a/tests/qemu-iotests/153 b/tests/qemu-iotests/153 index fa25eb24bd..5a82acebd3 100755 --- a/tests/qemu-iotests/153 +++

[Qemu-block] [PATCH 3/4] block: Use the actual current_flags during reopen

2018-03-09 Thread Fam Zheng
This complies to the function contract and allows bdrv_backing_options to make the right decision. Signed-off-by: Fam Zheng --- block.c | 21 +++-- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/block.c b/block.c index 937f9fe159..1e2b0d822d

[Qemu-block] [PATCH 1/4] block: Pass "current_flags" in BdrvChildRole.inherit_options

2018-03-09 Thread Fam Zheng
So that the current flags can influence the returned flags in the coming patches. For now, 0 is passed everywhere and the parameter is not used. Signed-off-by: Fam Zheng --- block.c | 20 +--- block/block-backend.c | 3 ++- block/vvfat.c

[Qemu-block] [PATCH 2/4] block: Fix write flags in bdrv_backing_options

2018-03-09 Thread Fam Zheng
When the child in question already has write access, we shouldn't change that just because the parent being open/reopen doesn't need it. But if we are inherenting the flags from a writable parent, we shouldn't copy the BDRV_O_RDWR flag, which is consistent with the BDRV_OPT_READ_ONLY option we

[Qemu-block] [PATCH 0/4] block: Fix permission during reopen

2018-03-09 Thread Fam Zheng
We write open the whole backing chain during reopen. It is not necessary and will cause image locking problems if the backing image is shared. Fam Zheng (4): block: Pass "current_flags" in BdrvChildRole.inherit_options block: Fix write flags in bdrv_backing_options block: Use the actual

[Qemu-block] [PULL 42/56] sheepdog: QAPIfy "redundancy" create option

2018-03-09 Thread Kevin Wolf
The "redundancy" option for Sheepdog image creation is currently a string that can encode one or two integers depending on its format, which at the same time implicitly selects a mode. This patch turns it into a QAPI union and converts the string into such a QAPI object before interpreting the

[Qemu-block] [PULL 20/56] qcow2: Use BlockdevRef in qcow2_co_create()

2018-03-09 Thread Kevin Wolf
Instead of passing a separate BlockDriverState* into qcow2_co_create(), make use of the BlockdevRef that is included in BlockdevCreateOptions. Signed-off-by: Kevin Wolf Reviewed-by: Eric Blake Reviewed-by: Max Reitz ---

[Qemu-block] [PULL 55/56] iotests: Tweak 030 in order to trigger a race condition with parallel jobs

2018-03-09 Thread Kevin Wolf
From: Alberto Garcia This patch tweaks TestParallelOps in iotest 030 so it allocates data in smaller regions (256KB/512KB instead of 512KB/1MB) and the block-stream job in test_stream_commit() only needs to copy data that is at the very end of the image. This way when the

[Qemu-block] [PULL 56/56] qemu-iotests: fix 203 migration completion race

2018-03-09 Thread Kevin Wolf
From: Stefan Hajnoczi There is a race between the test's 'query-migrate' QMP command after the QMP 'STOP' event and completing the migration: The test case invokes 'query-migrate' upon receiving 'STOP'. At this point the migration thread may still be in the process of

[Qemu-block] [PULL 45/56] ssh: QAPIfy host-key-check option

2018-03-09 Thread Kevin Wolf
This makes the host-key-check option available in blockdev-add. Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz --- qapi/block-core.json | 63 +++-- block/ssh.c | 88

[Qemu-block] [PULL 49/56] block: Fail bdrv_truncate() with negative size

2018-03-09 Thread Kevin Wolf
Most callers have their own checks, but something like this should also be checked centrally. As it happens, x-blockdev-create can pass negative image sizes to format drivers (because there is no QAPI type that would reject negative numbers) and triggers the check added by this patch.

[Qemu-block] [PULL 52/56] iotests: Test creating overlay when guest running

2018-03-09 Thread Kevin Wolf
From: Fam Zheng Signed-off-by: Fam Zheng Message-id: 20171225025107.23985-1-f...@redhat.com Reviewed-by: Eric Blake Signed-off-by: Max Reitz --- tests/qemu-iotests/153 | 8 +--- tests/qemu-iotests/153.out | 7

[Qemu-block] [PULL 50/56] qemu-iotests: Test qcow2 over file image creation with QMP

2018-03-09 Thread Kevin Wolf
Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz --- tests/qemu-iotests/206 | 436 + tests/qemu-iotests/206.out | 209 ++ tests/qemu-iotests/group | 1 + 3 files changed, 646

[Qemu-block] [PULL 53/56] iotests: Mark all tests executable

2018-03-09 Thread Kevin Wolf
From: Eric Blake The majority of our iotests have the executable bit set; fix the few outliers for consistency. Signed-off-by: Eric Blake Message-id: 20180305161824.7188-1-ebl...@redhat.com Signed-off-by: Max Reitz ---

[Qemu-block] [PULL 33/56] rbd: Fix use after free in qemu_rbd_set_keypairs() error path

2018-03-09 Thread Kevin Wolf
If we want to include the invalid option name in the error message, we can't free the string earlier than that. Cc: qemu-sta...@nongnu.org Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz Reviewed-by: Eric Blake --- block/rbd.c | 3 ++-

Re: [Qemu-block] [Qemu-devel] [PATCH v5 0/2] block latency histogram

2018-03-09 Thread no-reply
Hi, This series failed build test on s390x host. Please find the details below. Type: series Message-id: 20180309160224.78821-1-vsement...@virtuozzo.com Subject: [Qemu-devel] [PATCH v5 0/2] block latency histogram === TEST SCRIPT BEGIN === #!/bin/bash # Testing script will be invoked under the

[Qemu-block] [PULL 34/56] rbd: Factor out qemu_rbd_connect()

2018-03-09 Thread Kevin Wolf
The code to establish an RBD connection is duplicated between open and create. In order to be able to share the code, factor out the code from qemu_rbd_open() as a first step. Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz --- block/rbd.c | 100

Re: [Qemu-block] [PATCH 0/5] nbd server fixing and refactoring before BLOCK_STATUS

2018-03-09 Thread Eric Blake
On 03/08/2018 12:46 PM, Vladimir Sementsov-Ogievskiy wrote: 01 and 02 are splitted and updated "[PATCH] nbd/server: fix space read", others are new. Vladimir Sementsov-Ogievskiy (5): nbd/server: move nbd_co_send_structured_error up nbd/server: fix sparse read nbd/server: fix: check

[Qemu-block] [PULL 40/56] nfs: Use QAPI options in nfs_client_open()

2018-03-09 Thread Kevin Wolf
Using the QAPI visitor to turn all options into QAPI BlockdevOptionsNfs simplifies the code a lot. It will also be useful for implementing the QAPI based .bdrv_co_create callback. Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz --- block/nfs.c | 176

[Qemu-block] [PULL 36/56] rbd: Pass BlockdevOptionsRbd to qemu_rbd_connect()

2018-03-09 Thread Kevin Wolf
With the conversion to a QAPI options object, the function is now prepared to be used in a .bdrv_co_create implementation. Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz --- block/rbd.c | 115 +--- 1

[Qemu-block] [PULL 43/56] sheepdog: Support .bdrv_co_create

2018-03-09 Thread Kevin Wolf
This adds the .bdrv_co_create driver callback to sheepdog, which enables image creation over QMP. Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz --- qapi/block-core.json | 24 - block/sheepdog.c | 243

[Qemu-block] [PULL 44/56] ssh: Use QAPI BlockdevOptionsSsh object

2018-03-09 Thread Kevin Wolf
Create a BlockdevOptionsSsh object in connect_to_ssh() and take the options from there. 'host_key_check' is still processed separately because it's not in the schema yet. Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz --- block/ssh.c | 137

Re: [Qemu-block] [PATCH v4 0/2] block latency histogram

2018-03-09 Thread Vladimir Sementsov-Ogievskiy
09.03.2018 18:40, Eric Blake wrote: On 03/09/2018 09:33 AM, Vladimir Sementsov-Ogievskiy wrote: v4: Move block_latency_histogram_set from block/accounting.c to blockdev.c, as it uses qapi type uint64List and this fact breaks build. Was the cross file motion necessary, or could you just fix

[Qemu-block] [PULL 47/56] ssh: Support .bdrv_co_create

2018-03-09 Thread Kevin Wolf
This adds the .bdrv_co_create driver callback to ssh, which enables image creation over QMP. Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz --- qapi/block-core.json | 16 +- block/ssh.c | 83

[Qemu-block] [PULL 6/7] virtio-scsi: fix race between .ioeventfd_stop() and vq handler

2018-03-09 Thread Stefan Hajnoczi
If the main loop thread invokes .ioeventfd_stop() just as the vq handler function begins in the IOThread then the handler may lose the race for the AioContext lock. By the time the vq handler is able to acquire the AioContext lock the ioeventfd has already been removed and the handler isn't

[Qemu-block] [PULL 1/7] block: Fix qemu crash when using scsi-block

2018-03-09 Thread Stefan Hajnoczi
From: Deepa Srinivasan Starting qemu with the following arguments causes qemu to segfault: ... -device lsi,id=lsi0 -drive file=iscsi:<...>,format=raw,if=none,node-name= iscsi1 -device scsi-block,bus=lsi0.0,id=<...>,drive=iscsi1 This patch fixes blk_aio_ioctl() so it

[Qemu-block] [PULL 4/7] block: add aio_wait_bh_oneshot()

2018-03-09 Thread Stefan Hajnoczi
Sometimes it's necessary for the main loop thread to run a BH in an IOThread and wait for its completion. This primitive is useful during startup/shutdown to synchronize and avoid race conditions. Signed-off-by: Stefan Hajnoczi Reviewed-by: Fam Zheng

[Qemu-block] [PULL 0/7] Block patches

2018-03-09 Thread Stefan Hajnoczi
The following changes since commit 0ab4537f08e09b13788db67efd760592fb7db769: Merge remote-tracking branch 'remotes/stefanberger/tags/pull-tpm-2018-03-07-1' into staging (2018-03-08 12:56:39 +) are available in the Git repository at: git://github.com/stefanha/qemu.git

[Qemu-block] [PULL 7/7] vl: introduce vm_shutdown()

2018-03-09 Thread Stefan Hajnoczi
Commit 00d09fdbbae5f7864ce754913efc84c12fdf9f1a ("vl: pause vcpus before stopping iothreads") and commit dce8921b2baaf95974af8176406881872067adfa ("iothread: Stop threads before main() quits") tried to work around the fact that emulation was still active during termination by stopping iothreads.

[Qemu-block] [PATCH] hmp: Allow using a qdev id in block_set_io_throttle

2018-03-09 Thread Alberto Garcia
The QMP version of this command can take a qdev ID since 7a9877a02635, but the HMP version is still using the deprecated block device name so there's no way to refer to a block device added like this: -blockdev node-name=disk0,driver=qcow2,file.driver=file,file.filename=hd.qcow2 -device

Re: [Qemu-block] [PATCH v4] iotests: Tweak 030 in order to trigger a race condition with parallel jobs

2018-03-09 Thread Max Reitz
On 2018-03-08 08:44, Alberto Garcia wrote: > On Wed 07 Mar 2018 06:54:51 PM CET, Max Reitz wrote: >>> v4: Mention that commit 1a63a907507fbbcfaee3f622907ec24 also >>> contributes to solve the original bug (both commits need to >>> reverted in order to reproduce this bug reliably). >>> >>>

Re: [Qemu-block] [PATCH v4] iotests: Tweak 030 in order to trigger a race condition with parallel jobs

2018-03-09 Thread Alberto Garcia
On Fri 09 Mar 2018 01:54:31 PM CET, Max Reitz wrote: > On 2018-03-08 08:44, Alberto Garcia wrote: >> On Wed 07 Mar 2018 06:54:51 PM CET, Max Reitz wrote: v4: Mention that commit 1a63a907507fbbcfaee3f622907ec24 also contributes to solve the original bug (both commits need to

[Qemu-block] [PULL 5/7] virtio-blk: fix race between .ioeventfd_stop() and vq handler

2018-03-09 Thread Stefan Hajnoczi
If the main loop thread invokes .ioeventfd_stop() just as the vq handler function begins in the IOThread then the handler may lose the race for the AioContext lock. By the time the vq handler is able to acquire the AioContext lock the ioeventfd has already been removed and the handler isn't

[Qemu-block] [PULL 3/7] virtio-blk: dataplane: Don't batch notifications if EVENT_IDX is present

2018-03-09 Thread Stefan Hajnoczi
From: Sergio Lopez Commit 5b2ffbe4d99843fd8305c573a100047a8c962327 ("virtio-blk: dataplane: notify guest as a batch") deferred guest notification to a BH in order batch notifications, with purpose of avoiding flooding the guest with interruptions. This optimization came with a

[Qemu-block] [PULL 2/7] README: Fix typo 'git-publish'

2018-03-09 Thread Stefan Hajnoczi
From: Fam Zheng Reported-by: Alberto Garcia Signed-off-by: Fam Zheng Reviewed-by: Philippe Mathieu-Daudé Message-id: 20180306024328.19195-1-f...@redhat.com Signed-off-by: Stefan Hajnoczi --- README | 2

[Qemu-block] [PATCH v3 1/2] block/accounting: introduce latency histogram

2018-03-09 Thread Vladimir Sementsov-Ogievskiy
Introduce latency histogram statics for block devices. For each accounted operation type latency region [0, +inf) is divided into subregions by several points. Then, calculate hits for each subregion. Signed-off-by: Vladimir Sementsov-Ogievskiy ---

[Qemu-block] [PATCH v3 0/2] block latency histogram

2018-03-09 Thread Vladimir Sementsov-Ogievskiy
v3: - semantics, naming and wording changed a lot - x prefixes added to new qapi names - bug fixed about calculation of new_size (new_nbins now) - drop g_renew - in _clear() set nbinst to zero too v2: 01: add block_latency_histogram_clear() 02: fix spelling (sorry =() some rewordings

Re: [Qemu-block] [Qemu-devel] [PATCH v3 0/2] block latency histogram

2018-03-09 Thread no-reply
Hi, This series failed build test on ppcbe host. Please find the details below. Type: series Message-id: 20180309144918.44975-1-vsement...@virtuozzo.com Subject: [Qemu-devel] [PATCH v3 0/2] block latency histogram === TEST SCRIPT BEGIN === #!/bin/bash # Testing script will be invoked under the

Re: [Qemu-block] [PATCH 1/2] qemu-iotests: skip test 205 for unsupported formats

2018-03-09 Thread Eric Blake
On 03/09/2018 04:41 AM, Amador Pahim wrote: Using bochs or cloop, qemu-img will fail with: Format driver 'bochs' does not support image creation Signed-off-by: Amador Pahim --- tests/qemu-iotests/205 | 3 +++ 1 file changed, 3 insertions(+) Reviewed-by: Eric Blake

[Qemu-block] [PATCH v3 2/2] qapi: add block latency histogram interface

2018-03-09 Thread Vladimir Sementsov-Ogievskiy
Set (and clear) histogram through new command block-latency-histogram-set and show new statistics in query-blockstats results. Signed-off-by: Vladimir Sementsov-Ogievskiy --- qapi/block-core.json | 111 ++- block/qapi.c

Re: [Qemu-block] [Qemu-devel] [PATCH] hmp: Allow using a qdev id in block_set_io_throttle

2018-03-09 Thread Eric Blake
On 03/09/2018 08:11 AM, Alberto Garcia wrote: The QMP version of this command can take a qdev ID since 7a9877a02635, but the HMP version is still using the deprecated block device name so there's no way to refer to a block device added like this: -blockdev

Re: [Qemu-block] [Qemu-devel] [PATCH 2/2] qemu-iotests: set exec permission for tests lacking it

2018-03-09 Thread Eric Blake
On 03/09/2018 04:41 AM, Amador Pahim wrote: Some tests are not executables. This patch sets the executable permission for those tests lacking that. Signed-off-by: Amador Pahim --- Duplicate of a patch already on Max's tree:

Re: [Qemu-block] [Qemu-devel] [PATCH 3/5] migration/block: rename MAX_INFLIGHT_IO to MAX_IO_BUFFERS

2018-03-09 Thread Dr. David Alan Gilbert
* Peter Lieven (p...@kamp.de) wrote: > this actually limits (as the original commit mesage suggests) the > number of I/O buffers that can be allocated and not the number > of parallel (inflight) I/O requests. > > Signed-off-by: Peter Lieven I've queued 1-3 (which have Juan's R-b).

Re: [Qemu-block] [Qemu-devel] [PATCH v3 0/2] block latency histogram

2018-03-09 Thread no-reply
Hi, This series failed docker-mingw@fedora build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. Type: series Message-id: 20180309144918.44975-1-vsement...@virtuozzo.com Subject: [Qemu-devel] [PATCH v3 0/2]

[Qemu-block] [PATCH v4 2/2] qapi: add block latency histogram interface

2018-03-09 Thread Vladimir Sementsov-Ogievskiy
Set (and clear) histogram through new command block-latency-histogram-set and show new statistics in query-blockstats results. Signed-off-by: Vladimir Sementsov-Ogievskiy --- qapi/block-core.json | 111 ++- block/qapi.c

Re: [Qemu-block] [Qemu-devel] [PATCH v3 0/2] block latency histogram

2018-03-09 Thread Eric Blake
On 03/09/2018 09:07 AM, no-re...@patchew.org wrote: Hi, This series failed build test on ppcbe host. Please find the details below. Type: series Message-id: 20180309144918.44975-1-vsement...@virtuozzo.com Subject: [Qemu-devel] [PATCH v3 0/2] block latency histogram In file included from

[Qemu-block] [PATCH v4 1/2] block/accounting: introduce latency histogram

2018-03-09 Thread Vladimir Sementsov-Ogievskiy
Introduce latency histogram statics for block devices. For each accounted operation type latency region [0, +inf) is divided into subregions by several points. Then, calculate hits for each subregion. Signed-off-by: Vladimir Sementsov-Ogievskiy ---

[Qemu-block] [PATCH v4 0/2] block latency histogram

2018-03-09 Thread Vladimir Sementsov-Ogievskiy
v4: Move block_latency_histogram_set from block/accounting.c to blockdev.c, as it uses qapi type uint64List and this fact breaks build. v3: - semantics, naming and wording changed a lot - x prefixes added to new qapi names - bug fixed about calculation of new_size (new_nbins now) - drop

Re: [Qemu-block] [PATCH v4 0/2] block latency histogram

2018-03-09 Thread Eric Blake
On 03/09/2018 09:33 AM, Vladimir Sementsov-Ogievskiy wrote: v4: Move block_latency_histogram_set from block/accounting.c to blockdev.c, as it uses qapi type uint64List and this fact breaks build. Was the cross file motion necessary, or could you just fix the #includes according to the recent

[Qemu-block] [PULL 54/56] iotests: Skip test for ENOMEM error

2018-03-09 Thread Kevin Wolf
From: Fam Zheng The AFL image is to exercise the code validating image size, which doesn't work on 32 bit or when out of memory (there is a large allocation before the interesting point). So check that and skip the test, instead of faking the result. Signed-off-by: Fam Zheng

Re: [Qemu-block] [PATCH 1/5] nbd/server: move nbd_co_send_structured_error up

2018-03-09 Thread Eric Blake
On 03/08/2018 12:46 PM, Vladimir Sementsov-Ogievskiy wrote: To be reused in nbd_co_send_sparse_read() in the following patch. Signed-off-by: Vladimir Sementsov-Ogievskiy --- nbd/server.c | 48 1 file changed, 24

Re: [Qemu-block] [PATCH v4 0/2] block latency histogram

2018-03-09 Thread Eric Blake
On 03/09/2018 10:31 AM, Vladimir Sementsov-Ogievskiy wrote: 09.03.2018 18:40, Eric Blake wrote: On 03/09/2018 09:33 AM, Vladimir Sementsov-Ogievskiy wrote: v4: Move block_latency_histogram_set from block/accounting.c to blockdev.c, as it uses qapi type uint64List and this fact breaks build.

Re: [Qemu-block] [PATCH v4 0/2] block latency histogram

2018-03-09 Thread Vladimir Sementsov-Ogievskiy
09.03.2018 19:37, Eric Blake wrote: On 03/09/2018 10:31 AM, Vladimir Sementsov-Ogievskiy wrote: 09.03.2018 18:40, Eric Blake wrote: On 03/09/2018 09:33 AM, Vladimir Sementsov-Ogievskiy wrote: v4: Move block_latency_histogram_set from block/accounting.c to blockdev.c, as it uses qapi type

Re: [Qemu-block] [PATCH 0/5] nbd server fixing and refactoring before BLOCK_STATUS

2018-03-09 Thread Vladimir Sementsov-Ogievskiy
09.03.2018 19:41, Eric Blake wrote: On 03/08/2018 12:46 PM, Vladimir Sementsov-Ogievskiy wrote: 01 and 02 are splitted and updated "[PATCH] nbd/server: fix space read", others are new. Vladimir Sementsov-Ogievskiy (5):    nbd/server: move nbd_co_send_structured_error up    nbd/server: fix

[Qemu-block] [PATCH 5/6] luks: Catch integer overflow for huge sizes

2018-03-09 Thread Kevin Wolf
When you request an image size close to UINT64_MAX, the addition of the crypto header may cause an integer overflow. Catch it instead of silently truncating the image size. Signed-off-by: Kevin Wolf --- block/crypto.c | 5 + 1 file changed, 5 insertions(+) diff --git

[Qemu-block] [PATCH v6 1/2] block/accounting: introduce latency histogram

2018-03-09 Thread Vladimir Sementsov-Ogievskiy
Introduce latency histogram statics for block devices. For each accounted operation type latency region [0, +inf) is divided into subregions by several points. Then, calculate hits for each subregion. Signed-off-by: Vladimir Sementsov-Ogievskiy ---

[Qemu-block] [PATCH v6 2/2] qapi: add block latency histogram interface

2018-03-09 Thread Vladimir Sementsov-Ogievskiy
Set (and clear) histogram through new command block-latency-histogram-set and show new statistics in query-blockstats results. Signed-off-by: Vladimir Sementsov-Ogievskiy --- qapi/block-core.json | 111 ++- block/qapi.c

  1   2   >