[PATCH v2 3/3] hw/usb/dev-uas: Report command additional adb length as unsupported

2021-01-20 Thread Philippe Mathieu-Daudé
We are not ready to handle additional CDB data. If a guest sends a packet with such additional data, report the command parameter as not supported. Specify a size (of 1 byte) for the add_cdb member we are not using, to fix the following warning: usb/dev-uas.c:157:31: error: field 'status'

[PATCH v2 2/3] scsi/utils: Add INVALID_PARAM_VALUE sense code definition

2021-01-20 Thread Philippe Mathieu-Daudé
Reviewed-by: Eric Blake Signed-off-by: Philippe Mathieu-Daudé --- include/scsi/utils.h | 2 ++ scsi/utils.c | 5 + 2 files changed, 7 insertions(+) diff --git a/include/scsi/utils.h b/include/scsi/utils.h index 725769be3cb..504cde1cc9b 100644 --- a/include/scsi/utils.h +++

Re: [PATCH v2 1/3] scsi/utils: Rename 'illegal request' -> 'invalid request'

2021-01-20 Thread Eric Blake
On 1/20/21 9:35 AM, Philippe Mathieu-Daudé wrote: > While these requests are invalid, they are not breaking any laws :) > Rename 'illegal request' as 'invalid request'. > > Suggested-by: Eric Blake > Signed-off-by: Philippe Mathieu-Daudé > --- > include/scsi/utils.h | 20 ++-- >

Re: [PATCH v2 1/3] scsi/utils: Rename 'illegal request' -> 'invalid request'

2021-01-20 Thread Eric Blake
On 1/20/21 10:15 AM, Gerd Hoffmann wrote: > On Wed, Jan 20, 2021 at 04:35:20PM +0100, Philippe Mathieu-Daudé wrote: >> While these requests are invalid, they are not breaking any laws :) >> Rename 'illegal request' as 'invalid request'. > > Given the scsi spec calls this "illegal request" I think

Re: [PATCH v9 02/11] migration: Make save_snapshot() return bool, not 0/-1

2021-01-20 Thread Eric Blake
On 1/20/21 12:46 PM, Eric Blake wrote: > On 1/20/21 4:44 AM, Daniel P. Berrangé wrote: >> From: Philippe Mathieu-Daudé >> >> Just for consistency, following the example documented since >> commit e3fe3988d7 ("error: Document Error API usage rules"), >> return a boolean value indicating an error

Re: [PATCH v9 06/11] block: rename and alter bdrv_all_find_snapshot semantics

2021-01-20 Thread Eric Blake
On 1/20/21 4:44 AM, Daniel P. Berrangé wrote: > Currently bdrv_all_find_snapshot() will return 0 if it finds > a snapshot, -1 if an error occurs, or if it fails to find a > snapshot. New callers to be added want to distinguish between > the error scenario and failing to find a snapshot. > >

Re: [PATCH v4 00/23] backup performance: block_status + async

2021-01-20 Thread Max Reitz
On 20.01.21 17:04, Daniel P. Berrangé wrote: On Wed, Jan 20, 2021 at 04:53:26PM +0100, Max Reitz wrote: On 20.01.21 15:44, Max Reitz wrote: On 20.01.21 15:34, Max Reitz wrote: [...]  From a glance, it looks to me like two coroutines are created simultaneously in two threads, and so one

Re: [PATCH v9 09/11] migration: introduce a delete_snapshot wrapper

2021-01-20 Thread Eric Blake
On 1/20/21 4:44 AM, Daniel P. Berrangé wrote: > Make snapshot deletion consistent with the snapshot save > and load commands by using a wrapper around the blockdev > layer. The main difference is that we get upfront validation > of the passed in device list (if any). > > Signed-off-by: Daniel P.

[PATCH v2 1/3] scsi/utils: Rename 'illegal request' -> 'invalid request'

2021-01-20 Thread Philippe Mathieu-Daudé
While these requests are invalid, they are not breaking any laws :) Rename 'illegal request' as 'invalid request'. Suggested-by: Eric Blake Signed-off-by: Philippe Mathieu-Daudé --- include/scsi/utils.h | 20 ++-- scsi/utils.c | 20 ++-- 2 files changed,

[PATCH v2 0/3] hw/usb/dev-uas: Fix Clang 11 -Wgnu-variable-sized-type-not-at-end error

2021-01-20 Thread Philippe Mathieu-Daudé
Another attempt to fix the following Clang 11 warning: usb/dev-uas.c:157:31: error: field 'status' with variable sized type 'uas_i= u' not at the end of a struct or class is a GNU extension [-Werror,-Wgnu-vari= able-sized-type-not-at-end] uas_iustatus;

Re: [PATCH v4 00/23] backup performance: block_status + async

2021-01-20 Thread Max Reitz
On 20.01.21 16:53, Max Reitz wrote: On 20.01.21 15:44, Max Reitz wrote: On 20.01.21 15:34, Max Reitz wrote: [...]  From a glance, it looks to me like two coroutines are created simultaneously in two threads, and so one thread sets up a special SIGUSR2 action, then another reverts SIGUSR2

Re: [PATCH v2 1/3] scsi/utils: Rename 'illegal request' -> 'invalid request'

2021-01-20 Thread Gerd Hoffmann
On Wed, Jan 20, 2021 at 04:35:20PM +0100, Philippe Mathieu-Daudé wrote: > While these requests are invalid, they are not breaking any laws :) > Rename 'illegal request' as 'invalid request'. Given the scsi spec calls this "illegal request" I think it makes sense to *not* change this and stay

Re: [PATCH v9 10/11] iotests: add support for capturing and matching QMP events

2021-01-20 Thread Eric Blake
On 1/20/21 4:44 AM, Daniel P. Berrangé wrote: > When using the _launch_qemu and _send_qemu_cmd functions from > common.qemu, any QMP events get mixed in with the output from > the commands and responses. > > This makes it difficult to write a test case as the ordering > of events in the output is

Re: [RFC PATCH 1/2] scsi/utils: Add INVALID_PARAM_VALUE sense code definition

2021-01-20 Thread Philippe Mathieu-Daudé
On 1/20/21 5:01 PM, Gerd Hoffmann wrote: > Hi, > >>> +/* Illegal request, Invalid value in parameter list */ >>> +extern const struct SCSISense sense_code_INVALID_PARAM_VALUE; > >> Pre-existing: the term 'illegal' is suspect in computer science (the >> code isn't breaking any laws); > >

Re: [PATCH v4 00/23] backup performance: block_status + async

2021-01-20 Thread Daniel P . Berrangé
On Wed, Jan 20, 2021 at 04:53:26PM +0100, Max Reitz wrote: > On 20.01.21 15:44, Max Reitz wrote: > > On 20.01.21 15:34, Max Reitz wrote: > > [...] > > > >  From a glance, it looks to me like two coroutines are created > > > simultaneously in two threads, and so one thread sets up a special > > >

Re: [PATCH v9 08/11] migration: wire up support for snapshot device selection

2021-01-20 Thread Eric Blake
On 1/20/21 4:44 AM, Daniel P. Berrangé wrote: > Modify load_snapshot/save_snapshot to accept the device list and vmstate > node name parameters previously added to the block layer. > > Signed-off-by: Daniel P. Berrangé > --- Reviewed-by: Eric Blake -- Eric Blake, Principal Software Engineer

Re: [RFC PATCH 1/2] scsi/utils: Add INVALID_PARAM_VALUE sense code definition

2021-01-20 Thread Gerd Hoffmann
Hi, > > +/* Illegal request, Invalid value in parameter list */ > > +extern const struct SCSISense sense_code_INVALID_PARAM_VALUE; > Pre-existing: the term 'illegal' is suspect in computer science (the > code isn't breaking any laws); Indeed. It's named that way in the scsi specs though, and

Re: [PATCH v9 02/11] migration: Make save_snapshot() return bool, not 0/-1

2021-01-20 Thread Eric Blake
On 1/20/21 4:44 AM, Daniel P. Berrangé wrote: > From: Philippe Mathieu-Daudé > > Just for consistency, following the example documented since > commit e3fe3988d7 ("error: Document Error API usage rules"), > return a boolean value indicating an error is set or not. > > Acked-by: Pavel Dovgalyuk

Re: [PATCH v9 11/11] migration: introduce snapshot-{save, load, delete} QMP commands

2021-01-20 Thread Eric Blake
On 1/20/21 4:44 AM, Daniel P. Berrangé wrote: > savevm, loadvm and delvm are some of the few HMP commands that have never > been converted to use QMP. The reasons for the lack of conversion are > that they blocked execution of the event thread, and the semantics > around choice of disks were

Re: [PATCH v4 00/23] backup performance: block_status + async

2021-01-20 Thread Max Reitz
On 20.01.21 15:44, Max Reitz wrote: On 20.01.21 15:34, Max Reitz wrote: [...]  From a glance, it looks to me like two coroutines are created simultaneously in two threads, and so one thread sets up a special SIGUSR2 action, then another reverts SIGUSR2 to the default, and then the first

Re: [PATCH v2 0/4] nbd/server: Quiesce coroutines on context switch

2021-01-20 Thread Eric Blake
On 12/14/20 11:05 AM, Sergio Lopez wrote: > This series allows the NBD server to properly switch between AIO contexts, > having quiesced recv_coroutine and send_coroutine before doing the transition. > > We need this because we send back devices running in IO Thread owned contexts > to the main

Re: [PATCH v4 01/16] block: refactor bdrv_check_request: add errp

2021-01-20 Thread Eric Blake
On 12/11/20 12:39 PM, Vladimir Sementsov-Ogievskiy wrote: > It's better to pass _abort than just assert that result is 0: on > crash, we'll immediately see the reason in the backtrace. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > include/block/block_int.h| 2 +- >

Re: [PATCH 01/11] block: add new BlockDriver handler: bdrv_cancel_in_flight

2021-01-20 Thread Eric Blake
On 11/18/20 12:04 PM, Vladimir Sementsov-Ogievskiy wrote: > It will be used to stop retrying NBD requests on mirror cancel. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > include/block/block.h | 3 +++ > include/block/block_int.h | 9 + > block/io.c| 11

Re: [PATCH v3 07/12] hw/block/nvme: remove redundant zeroing of PMR registers

2021-01-20 Thread Minwoo Im
Reviewed-by: Minwoo Im

Re: [PATCH v3 00/12] hw/block/nvme: misc cmb/pmr patches and bump to v1.4

2021-01-20 Thread Klaus Jensen
On Jan 19 11:14, Klaus Jensen wrote: > From: Klaus Jensen > > This is a resend of "hw/block/nvme: allow cmb and pmr to coexist" with > some more PMR work added (PMR RDS/WDS support). > > This includes a resurrection of Andrzej's series[1] from back July. > > Andrzej's main patch basically

Re: [PATCH v7 00/11] Rework iotests/check

2021-01-20 Thread Eric Blake
On 1/16/21 7:44 AM, Vladimir Sementsov-Ogievskiy wrote: > Hi all! > > These series has 3 goals: > > - get rid of group file (to forget about rebase and in-list conflicts) > - introduce human-readable names for tests > - rewrite check into python > > v7: > - fix wording and grammar > -

Re: [RFC PATCH V3 8/8] hw/block/nvme: Add Identify Active Namespace ID List

2021-01-20 Thread Minwoo Im
> Hello Minwoo, > > By introducing a detached parameter, > you are also implicitly making the following > NVMe commands no longer be spec compliant: > > NVME_ID_CNS_NS, NVME_ID_CNS_CS_NS, > NVME_ID_CNS_NS_ACTIVE_LIST, NVME_ID_CNS_CS_NS_ACTIVE_LIST > > When these commands are called on a

Re: [PATCH v3 12/12] hw/block/nvme: lift cmb restrictions

2021-01-20 Thread Minwoo Im
Nice for codes much more clean. Reviewed-by: Minwoo Im

Re: [PATCH v3 10/12] hw/block/nvme: move cmb logic to v1.4

2021-01-20 Thread Minwoo Im
Reviewed-by: Minwoo Im

Re: [PATCH v2 1/8] block/nbd: move initial connect to coroutine

2021-01-20 Thread Eric Blake
On 11/30/20 7:40 AM, Vladimir Sementsov-Ogievskiy wrote: > We are going to implement reconnect-on-open. Let's reuse existing > reconnect loop. For this, do initial connect in connection coroutine. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > block/nbd.c | 94

Re: [PATCH v2 0/4] nbd/server: Quiesce coroutines on context switch

2021-01-20 Thread Sergio Lopez
On Wed, Jan 20, 2021 at 02:49:14PM -0600, Eric Blake wrote: > On 12/14/20 11:05 AM, Sergio Lopez wrote: > > This series allows the NBD server to properly switch between AIO contexts, > > having quiesced recv_coroutine and send_coroutine before doing the > > transition. > > > > We need this

Re: [PATCH 11/11] iotests/264: add backup-cancel test-case

2021-01-20 Thread Eric Blake
On 11/18/20 12:04 PM, Vladimir Sementsov-Ogievskiy wrote: > Check that cancel doesn't wait for 10s of nbd reconnect timeout. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > tests/qemu-iotests/264 | 21 ++--- > 1 file changed, 14 insertions(+), 7 deletions(-) >

[PULL 04/13] nbd/server: Quiesce coroutines on context switch

2021-01-20 Thread Eric Blake
From: Sergio Lopez When switching between AIO contexts we need to me make sure that both recv_coroutine and send_coroutine are not scheduled to run. Otherwise, QEMU may crash while attaching the new context with an error like this one: aio_co_schedule: Co-routine was already scheduled in

[PULL 01/13] qemu-nbd: Fix a memleak in qemu_nbd_client_list()

2021-01-20 Thread Eric Blake
From: Alex Chen When the qio_channel_socket_connect_sync() fails we should goto 'out' label to free the 'sioc' instead of return. Reported-by: Euler Robot Signed-off-by: Alex Chen Message-Id: <20201130123651.17543-1-alex.c...@huawei.com> Reviewed-by: Alberto Garcia Signed-off-by: Eric Blake

[PULL 02/13] qemu-nbd: Fix a memleak in nbd_client_thread()

2021-01-20 Thread Eric Blake
From: Alex Chen When the qio_channel_socket_connect_sync() fails we should goto 'out_socket' label to free the 'sioc' instead of goto 'out' label. In addition, there's a lot of redundant code in the successful branch and the error branch, optimize it. Reported-by: Euler Robot Signed-off-by:

Re: [PATCH 03/11] block/raw-format: implement .bdrv_cancel_in_flight handler

2021-01-20 Thread Eric Blake
On 11/18/20 12:04 PM, Vladimir Sementsov-Ogievskiy wrote: > We are going to cancel in-flight requests on mirror nbd target on job > cancel. Still nbd is often used not directly but as raw-format child. > So, add pass-through handler here. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- >

Re: [PATCH 06/11] iotests/264: fix style

2021-01-20 Thread Eric Blake
On 11/18/20 12:04 PM, Vladimir Sementsov-Ogievskiy wrote: > Fix long line, extra import and one mypy complaint about incompatible > int and float. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > tests/qemu-iotests/264 | 11 +-- > 1 file changed, 5 insertions(+), 6 deletions(-) >

Re: [PATCH 09/11] iotests/264: add mirror-cancel test-case

2021-01-20 Thread Eric Blake
On 11/18/20 12:04 PM, Vladimir Sementsov-Ogievskiy wrote: > Check that cancel doesn't wait for 10s of nbd reconnect timeout. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > tests/qemu-iotests/264 | 38 ++ > tests/qemu-iotests/264.out | 4 ++-- >

Re: [PATCH v2 2/8] nbd: allow reconnect on open, with corresponding new options

2021-01-20 Thread Eric Blake
On 11/30/20 7:40 AM, Vladimir Sementsov-Ogievskiy wrote: > Note: currently, using new option with long timeout in qmp command > blockdev-add is not good idea, as qmp interface is blocking, so, > don't add it now, let's add it later after > "monitor: Optionally run handlers in coroutines" series

Re: [PATCH v2 for-6.0 0/8] nbd reconnect on open

2021-01-20 Thread Eric Blake
On 11/30/20 7:40 AM, Vladimir Sementsov-Ogievskiy wrote: > Hi all! There is a new feature: reconnect on open. It is useful when > start of vm and start of nbd server are not simple to sync. > > v2: rebase on master. > Also, I've discovered that I've sent downstream version of test which > doesn't

[PULL 11/13] iotests/264: fix style

2021-01-20 Thread Eric Blake
From: Vladimir Sementsov-Ogievskiy Fix long line, extra import and one mypy complaint about incompatible int and float. Signed-off-by: Vladimir Sementsov-Ogievskiy Message-Id: <20201118180433.11931-7-vsement...@virtuozzo.com> Reviewed-by: Eric Blake Signed-off-by: Eric Blake ---

Re: [PATCH 04/11] job: add .cancel handler for the driver

2021-01-20 Thread Eric Blake
On 11/18/20 12:04 PM, Vladimir Sementsov-Ogievskiy wrote: > To be used in mirror in the following commit to cancel in-flight io on > target to not waste the time. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > include/qemu/job.h | 5 + > job.c | 3 +++ > 2 files

Re: [PATCH 10/11] block/backup: implement .cancel job handler

2021-01-20 Thread Eric Blake
On 11/18/20 12:04 PM, Vladimir Sementsov-Ogievskiy wrote: > Cancel in-flight io on target to not waste the time. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > block/backup.c | 10 ++ > 1 file changed, 10 insertions(+) > Reviewed-by: Eric Blake -- Eric Blake, Principal

Re: [PATCH v2 4/8] iotests.py: qemu_io(): reuse qemu_tool_pipe_and_status()

2021-01-20 Thread Eric Blake
On 11/30/20 7:40 AM, Vladimir Sementsov-Ogievskiy wrote: > Just drop code duplication. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > tests/qemu-iotests/iotests.py | 9 + > 1 file changed, 1 insertion(+), 8 deletions(-) Reviewed-by: Eric Blake > > diff --git

Re: [PATCH 11/11] iotests/264: add backup-cancel test-case

2021-01-20 Thread Eric Blake
On 1/20/21 7:28 PM, Eric Blake wrote: > On 11/18/20 12:04 PM, Vladimir Sementsov-Ogievskiy wrote: >> Check that cancel doesn't wait for 10s of nbd reconnect timeout. >> >> Signed-off-by: Vladimir Sementsov-Ogievskiy >> --- >> tests/qemu-iotests/264 | 21 ++--- >> 1 file changed,

[PULL 10/13] iotests: define group in each iotest

2021-01-20 Thread Eric Blake
From: Vladimir Sementsov-Ogievskiy We are going to drop group file. Define group in tests as a preparatory step. The patch is generated by cd tests/qemu-iotests grep '^[0-9]\{3\} ' group | while read line; do file=$(awk '{print $1}' <<< "$line"); groups=$(sed -e

[PULL 13/13] iotests.py: qemu_io(): reuse qemu_tool_pipe_and_status()

2021-01-20 Thread Eric Blake
From: Vladimir Sementsov-Ogievskiy Just drop code duplication. Signed-off-by: Vladimir Sementsov-Ogievskiy Message-Id: <20201130134024.19212-5-vsement...@virtuozzo.com> Reviewed-by: Eric Blake Signed-off-by: Eric Blake --- tests/qemu-iotests/iotests.py | 9 + 1 file changed, 1

[PULL 12/13] iotests.py: fix qemu_tool_pipe_and_status()

2021-01-20 Thread Eric Blake
From: Vladimir Sementsov-Ogievskiy qemu_img_args variable is unrelated here. We should print just args. Signed-off-by: Vladimir Sementsov-Ogievskiy Message-Id: <20201130134024.19212-4-vsement...@virtuozzo.com> Reviewed-by: Eric Blake Signed-off-by: Eric Blake ---

Re: [PATCH 05/11] block/mirror: implement .cancel job handler

2021-01-20 Thread Eric Blake
On 11/18/20 12:04 PM, Vladimir Sementsov-Ogievskiy wrote: > Cancel in-flight io on target to not waste the time. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > block/mirror.c | 9 + > 1 file changed, 9 insertions(+) > Reviewed-by: Eric Blake -- Eric Blake, Principal

Re: [PATCH 08/11] iotests.py: qemu_nbd_popen: remove pid file after use

2021-01-20 Thread Eric Blake
On 11/18/20 12:04 PM, Vladimir Sementsov-Ogievskiy wrote: > To note interfere with other qemu_nbd_popen() calls in same test. not > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > tests/qemu-iotests/iotests.py | 6 +- > 1 file changed, 5 insertions(+), 1 deletion(-) > Reviewed-by:

Re: [PATCH 00/11] mirror: cancel nbd reconnect

2021-01-20 Thread Eric Blake
On 11/18/20 12:04 PM, Vladimir Sementsov-Ogievskiy wrote: > Hi all! > > The problem > > Assume we have mirror job with nbd target node with enabled reconnect. > Connection failed. So, all current requests to nbd node are waiting for > nbd driver to reconnect. And they will wait for

Re: [PATCH 7/7] block/rbd: change request alignment to 1 byte

2021-01-20 Thread Peter Lieven
 > Am 19.01.2021 um 15:20 schrieb Jason Dillaman : > > On Tue, Jan 19, 2021 at 4:36 AM Peter Lieven wrote: >>> Am 18.01.21 um 23:33 schrieb Jason Dillaman: >>> On Fri, Jan 15, 2021 at 10:39 AM Peter Lieven wrote: Am 15.01.21 um 16:27 schrieb Jason Dillaman: > On Thu, Jan 14, 2021 at

Re: [PATCH 07/11] iotests/264: move to python unittest

2021-01-20 Thread Eric Blake
On 11/18/20 12:04 PM, Vladimir Sementsov-Ogievskiy wrote: > We are going to add more test cases, so use the library supporting test > cases. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > tests/qemu-iotests/264 | 93 ++ >

Re: [PATCH v2 3/8] iotests.py: fix qemu_tool_pipe_and_status()

2021-01-20 Thread Eric Blake
On 11/30/20 7:40 AM, Vladimir Sementsov-Ogievskiy wrote: > qemu_img_args variable is unrelated here. We should print just args. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > tests/qemu-iotests/iotests.py | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) Reviewed-by: Eric

[PULL 06/13] iotests/303: use dot slash for qcow2.py running

2021-01-20 Thread Eric Blake
From: Vladimir Sementsov-Ogievskiy If you run './check 303', check includes common.config which adjusts $PATH to include '.' first, and therefore finds qcow2.py on PATH. But if you run './303' directly, there is nothing to adjust PATH, and if '.' is not already on your PATH by other means, the

[PULL 07/13] iotests: fix some whitespaces in test output files

2021-01-20 Thread Eric Blake
From: Vladimir Sementsov-Ogievskiy We are going to be stricter about comparing test result with .out files. So, fix some whitespaces now. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Eric Blake Message-Id: <20210116134424.82867-4-vsement...@virtuozzo.com> Signed-off-by: Eric Blake

[PULL 09/13] iotests/294: add shebang line

2021-01-20 Thread Eric Blake
From: Vladimir Sementsov-Ogievskiy Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Eric Blake Message-Id: <20210116134424.82867-6-vsement...@virtuozzo.com> Signed-off-by: Eric Blake --- tests/qemu-iotests/294 | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/qemu-iotests/294

[PULL 03/13] block: Honor blk_set_aio_context() context requirements

2021-01-20 Thread Eric Blake
From: Sergio Lopez The documentation for bdrv_set_aio_context_ignore() states this: * The caller must own the AioContext lock for the old AioContext of bs, but it * must not own the AioContext lock for new_context (unless new_context is the * same as the current context of bs). As

Re: [PATCH 02/11] block/nbd: implement .bdrv_cancel_in_flight

2021-01-20 Thread Eric Blake
On 11/18/20 12:04 PM, Vladimir Sementsov-Ogievskiy wrote: > Just stop waiting for connection in existing requests. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > block/nbd.c | 15 +++ > 1 file changed, 15 insertions(+) > That turned out to be rather easy ;) Reviewed-by:

[PULL 05/13] iotests/277: use dot slash for nbd-fault-injector.py running

2021-01-20 Thread Eric Blake
From: Vladimir Sementsov-Ogievskiy If you run './check 277', check includes common.config which adjusts $PATH to include '.' first, and therefore finds nbd-fault-injector.py on PATH. But if you run './277' directly, there is nothing to adjust PATH, and if '.' is not already on your PATH by

Re: [RFC PATCH 1/2] scsi/utils: Add INVALID_PARAM_VALUE sense code definition

2021-01-20 Thread Eric Blake
On 1/18/21 11:03 AM, Philippe Mathieu-Daudé wrote: > Signed-off-by: Philippe Mathieu-Daudé > --- > include/scsi/utils.h | 2 ++ > scsi/utils.c | 5 + > 2 files changed, 7 insertions(+) > > diff --git a/include/scsi/utils.h b/include/scsi/utils.h > index fbc55882799..096489c6cd1

Re: [PATCH v3 02/25] qapi: backup: add perf.use-copy-range parameter

2021-01-20 Thread Max Reitz
On 20.01.21 07:09, Vladimir Sementsov-Ogievskiy wrote: 19.01.2021 23:21, Eric Blake wrote: On 10/26/20 12:17 PM, Vladimir Sementsov-Ogievskiy wrote: Experiments show, that copy_range is not always making things faster. So, to make experimentation simpler, let's add a parameter. Some more perf

Re: [PATCH v2 01/12] vhost-user-blk: fix blkcfg->num_queues endianness

2021-01-20 Thread Michael S. Tsirkin
On Mon, Dec 07, 2020 at 05:20:19PM +, Stefan Hajnoczi wrote: > Treat the num_queues field as virtio-endian. On big-endian hosts the > vhost-user-blk num_queues field was in the wrong endianness. > > Move the blkcfg.num_queues store operation from realize to > vhost_user_blk_update_config() so

Re: [PATCH v2 12/36] block: refactor bdrv_child* permission functions

2021-01-20 Thread Vladimir Sementsov-Ogievskiy
20.01.2021 12:09, Kevin Wolf wrote: Am 19.01.2021 um 19:30 hat Vladimir Sementsov-Ogievskiy geschrieben: 19.01.2021 21:09, Kevin Wolf wrote: Am 27.11.2020 um 15:44 hat Vladimir Sementsov-Ogievskiy geschrieben: Split out non-recursive parts, and refactor as block graph transaction action.

Re: [PATCH] hw/block/nvme: fix zone write finalize

2021-01-20 Thread Klaus Jensen
On Jan 12 10:42, Klaus Jensen wrote: > From: Klaus Jensen > > The zone write pointer is unconditionally advanced, even for write > faults. Make sure that the zone is always transitioned to Full if the > write pointer reaches zone capacity. > > Signed-off-by: Klaus Jensen > Cc: Dmitry Fomichev

[PATCH v9 02/11] migration: Make save_snapshot() return bool, not 0/-1

2021-01-20 Thread Daniel P . Berrangé
From: Philippe Mathieu-Daudé Just for consistency, following the example documented since commit e3fe3988d7 ("error: Document Error API usage rules"), return a boolean value indicating an error is set or not. Acked-by: Pavel Dovgalyuk Signed-off-by: Philippe Mathieu-Daudé ---

Re: [PATCH v2 12/36] block: refactor bdrv_child* permission functions

2021-01-20 Thread Kevin Wolf
Am 20.01.2021 um 10:56 hat Vladimir Sementsov-Ogievskiy geschrieben: > 20.01.2021 12:09, Kevin Wolf wrote: > > Am 19.01.2021 um 19:30 hat Vladimir Sementsov-Ogievskiy geschrieben: > > > 19.01.2021 21:09, Kevin Wolf wrote: > > > > Am 27.11.2020 um 15:44 hat Vladimir Sementsov-Ogievskiy geschrieben:

Re: [PATCH v2 12/36] block: refactor bdrv_child* permission functions

2021-01-20 Thread Kevin Wolf
Am 19.01.2021 um 19:30 hat Vladimir Sementsov-Ogievskiy geschrieben: > 19.01.2021 21:09, Kevin Wolf wrote: > > Am 27.11.2020 um 15:44 hat Vladimir Sementsov-Ogievskiy geschrieben: > > > Split out non-recursive parts, and refactor as block graph transaction > > > action. > > > > > > Signed-off-by:

Re: [PATCH v4 0/3] support NVMe smart critial warning injection

2021-01-20 Thread Klaus Jensen
On Jan 15 11:26, zhenwei pi wrote: > v3 -> v4: > - Drop "Fix overwritten bar.cap". (Already fixed) > > - Avoid to enqueue the duplicate event. > > - Several minor changes for coding style & function/variable name. > > v2 -> v3: > - Introduce "Persistent Memory Region has become read-only or >

[PATCH v4 11.5/23] iotests/129: Limit backup's max-chunk/max-workers

2021-01-20 Thread Max Reitz
Right now, this does not change anything, because backup ignores max-chunk and max-workers. However, as soon as backup is switched over to block-copy for the background copying process, we will need it to keep 129 passing. Signed-off-by: Max Reitz --- Hi Vladimir, would you be OK with this? ---

Re: [PATCH v4 00/23] backup performance: block_status + async

2021-01-20 Thread Max Reitz
On 19.01.21 20:22, Vladimir Sementsov-Ogievskiy wrote: 19.01.2021 21:40, Max Reitz wrote: On 16.01.21 22:46, Vladimir Sementsov-Ogievskiy wrote: Hi Max! I applied my series onto yours 129-fixing and found, that 129 fails for backup. And setting small max-chunk and even max-workers to 1

[PATCH v9 00/11] migration: bring improved savevm/loadvm/delvm to QMP

2021-01-20 Thread Daniel P . Berrangé
v1: https://lists.gnu.org/archive/html/qemu-devel/2020-07/msg00866.html v2: https://lists.gnu.org/archive/html/qemu-devel/2020-07/msg07523.html v3: https://lists.gnu.org/archive/html/qemu-devel/2020-08/msg07076.html v4: https://lists.gnu.org/archive/html/qemu-devel/2020-09/msg05221.html v5:

[PATCH v9 04/11] block: add ability to specify list of blockdevs during snapshot

2021-01-20 Thread Daniel P . Berrangé
When running snapshot operations, there are various rules for which blockdevs are included/excluded. While this provides reasonable default behaviour, there are scenarios that are not well handled by the default logic. Some of the conditions do not have a single correct answer. Thus there needs

[PATCH v9 03/11] migration: stop returning errno from load_snapshot()

2021-01-20 Thread Daniel P . Berrangé
None of the callers care about the errno value since there is a full Error object populated. This gives consistency with save_snapshot() which already just returns a boolean value. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Daniel P. Berrangé [PMD: Return false/true instead of -1/0,

[PATCH v9 11/11] migration: introduce snapshot-{save, load, delete} QMP commands

2021-01-20 Thread Daniel P . Berrangé
savevm, loadvm and delvm are some of the few HMP commands that have never been converted to use QMP. The reasons for the lack of conversion are that they blocked execution of the event thread, and the semantics around choice of disks were ill-defined. Despite this downside, however, libvirt and

[PATCH v9 06/11] block: rename and alter bdrv_all_find_snapshot semantics

2021-01-20 Thread Daniel P . Berrangé
Currently bdrv_all_find_snapshot() will return 0 if it finds a snapshot, -1 if an error occurs, or if it fails to find a snapshot. New callers to be added want to distinguish between the error scenario and failing to find a snapshot. Rename it to bdrv_all_has_snapshot and make it return -1 on

Re: [PATCH 0/2] hw/block/nvme: zoned fixes

2021-01-20 Thread Niklas Cassel
On Tue, Jan 19, 2021 at 02:54:58PM +0100, Klaus Jensen wrote: > From: Klaus Jensen > > Patch [1/2] fixes the zone append bug reported by Niklas. [2/2] > refactors the zone write check function to return status codes in a > different order if there are multiple zone write violations that apply. >

Re: [RFC PATCH V3 0/8] hw/block/nvme: support multi-path for ctrl/ns

2021-01-20 Thread Minwoo Im
On 21-01-20 08:52:14, Klaus Jensen wrote: > On Jan 20 09:44, Minwoo Im wrote: > > On 21-01-19 19:18:16, Klaus Jensen wrote: > > > On Jan 20 02:01, Minwoo Im wrote: > > > > Hello, > > > > > > > > This patch series is third one to support multi-controller and namespace > > > > sharing in

[PATCH v9 01/11] block: push error reporting into bdrv_all_*_snapshot functions

2021-01-20 Thread Daniel P . Berrangé
The bdrv_all_*_snapshot functions return a BlockDriverState pointer for the invalid backend, which the callers then use to report an error message. In some cases multiple callers are reporting the same error message, but with slightly different text. In the future there will be more error

[PATCH v9 08/11] migration: wire up support for snapshot device selection

2021-01-20 Thread Daniel P . Berrangé
Modify load_snapshot/save_snapshot to accept the device list and vmstate node name parameters previously added to the block layer. Signed-off-by: Daniel P. Berrangé --- include/migration/snapshot.h | 18 -- migration/savevm.c | 30 ++

[PATCH v9 10/11] iotests: add support for capturing and matching QMP events

2021-01-20 Thread Daniel P . Berrangé
When using the _launch_qemu and _send_qemu_cmd functions from common.qemu, any QMP events get mixed in with the output from the commands and responses. This makes it difficult to write a test case as the ordering of events in the output is not stable. This introduces a variable 'capture_events'

[PATCH v9 05/11] block: allow specifying name of block device for vmstate storage

2021-01-20 Thread Daniel P . Berrangé
Currently the vmstate will be stored in the first block device that supports snapshots. Historically this would have usually been the root device, but with UEFI it might be the variable store. There needs to be a way to override the choice of block device to store the state in. Reviewed-by: Eric

Re: [PATCH v4 11.5/23] iotests/129: Limit backup's max-chunk/max-workers

2021-01-20 Thread Vladimir Sementsov-Ogievskiy
20.01.2021 13:20, Max Reitz wrote: Right now, this does not change anything, because backup ignores max-chunk and max-workers. However, as soon as backup is switched over to block-copy for the background copying process, we will need it to keep 129 passing. Signed-off-by: Max Reitz --- Hi

[PATCH v9 07/11] migration: control whether snapshots are ovewritten

2021-01-20 Thread Daniel P . Berrangé
The traditional HMP "savevm" command will overwrite an existing snapshot if it already exists with the requested name. This new flag allows this to be controlled allowing for safer behaviour with a future QMP command. Reviewed-by: Eric Blake Signed-off-by: Daniel P. Berrangé ---

[PATCH v9 09/11] migration: introduce a delete_snapshot wrapper

2021-01-20 Thread Daniel P . Berrangé
Make snapshot deletion consistent with the snapshot save and load commands by using a wrapper around the blockdev layer. The main difference is that we get upfront validation of the passed in device list (if any). Signed-off-by: Daniel P. Berrangé --- include/migration/snapshot.h | 13

Re: [RFC PATCH 2/2] hw/usb/dev-uas: Report command additional adb length as unsupported

2021-01-20 Thread Eric Blake
On 1/18/21 11:03 AM, Philippe Mathieu-Daudé wrote: > We are not ready to handle additional CDB data. > > If a guest send a packet with such additional data, sends > report the command parameter as not supported. > > We can then explicit there is nothing in this additional then be explicit

Re: [RFC PATCH V3 8/8] hw/block/nvme: Add Identify Active Namespace ID List

2021-01-20 Thread Klaus Jensen
On Jan 20 14:07, Niklas Cassel wrote: > On Wed, Jan 20, 2021 at 02:01:47AM +0900, Minwoo Im wrote: > > Spec v1.4b 6.1.4 "Active and Inactive NSID Types" says: > > > > "Active NSIDs for a controller refer to namespaces that are attached to > > that controller. Allocated NSIDs that are inactive for

Re: [PATCH 0/9] hw/block: m25p80: Fix the mess of dummy bytes needed for fast read commands

2021-01-20 Thread Bin Meng
Hi Francisco, On Tue, Jan 19, 2021 at 9:01 PM Francisco Iglesias wrote: > > Hi Bin, > > On [2021 Jan 18] Mon 20:32:19, Bin Meng wrote: > > Hi Francisco, > > > > On Mon, Jan 18, 2021 at 6:06 PM Francisco Iglesias > > wrote: > > > > > > Hi Bin, > > > > > > On [2021 Jan 15] Fri 22:38:18, Bin Meng

Re: [PATCH v4 00/23] backup performance: block_status + async

2021-01-20 Thread Max Reitz
On 20.01.21 14:50, Max Reitz wrote: On 20.01.21 11:39, Max Reitz wrote: On 19.01.21 20:22, Vladimir Sementsov-Ogievskiy wrote: 19.01.2021 21:40, Max Reitz wrote: On 16.01.21 22:46, Vladimir Sementsov-Ogievskiy wrote: Hi Max! I applied my series onto yours 129-fixing and found, that 129 fails

Re: [PATCH v9 11/11] migration: introduce snapshot-{save, load, delete} QMP commands

2021-01-20 Thread Markus Armbruster
Daniel P. Berrangé writes: > savevm, loadvm and delvm are some of the few HMP commands that have never > been converted to use QMP. The reasons for the lack of conversion are > that they blocked execution of the event thread, and the semantics > around choice of disks were ill-defined. > >

Re: [PATCH v4 00/23] backup performance: block_status + async

2021-01-20 Thread Max Reitz
On 20.01.21 15:34, Max Reitz wrote: On 20.01.21 14:50, Max Reitz wrote: On 20.01.21 11:39, Max Reitz wrote: On 19.01.21 20:22, Vladimir Sementsov-Ogievskiy wrote: 19.01.2021 21:40, Max Reitz wrote: On 16.01.21 22:46, Vladimir Sementsov-Ogievskiy wrote: Hi Max! I applied my series onto yours

Re: [RFC PATCH 0/2] Allow changing bs->file on reopen

2021-01-20 Thread Alberto Garcia
On Mon 18 Jan 2021 11:22:49 AM CET, Vladimir Sementsov-Ogievskiy wrote: >> This is still an RFC but you can see the idea. > > Good idea and I glad to see that my patches help:) > > Hmm, still, removing a filter which want to unshare WRITE even when > doesn't have any parents will be a problem

Re: [PATCH v4 00/23] backup performance: block_status + async

2021-01-20 Thread Max Reitz
On 20.01.21 11:39, Max Reitz wrote: On 19.01.21 20:22, Vladimir Sementsov-Ogievskiy wrote: 19.01.2021 21:40, Max Reitz wrote: On 16.01.21 22:46, Vladimir Sementsov-Ogievskiy wrote: Hi Max! I applied my series onto yours 129-fixing and found, that 129 fails for backup. And setting small

Re: [RFC PATCH V3 8/8] hw/block/nvme: Add Identify Active Namespace ID List

2021-01-20 Thread Niklas Cassel
On Wed, Jan 20, 2021 at 02:01:47AM +0900, Minwoo Im wrote: > Spec v1.4b 6.1.4 "Active and Inactive NSID Types" says: > > "Active NSIDs for a controller refer to namespaces that are attached to > that controller. Allocated NSIDs that are inactive for a controller refer > to namespaces that are not

Re: [RFC PATCH 0/2] Allow changing bs->file on reopen

2021-01-20 Thread Vladimir Sementsov-Ogievskiy
20.01.2021 16:51, Alberto Garcia wrote: On Mon 18 Jan 2021 11:22:49 AM CET, Vladimir Sementsov-Ogievskiy wrote: This is still an RFC but you can see the idea. Good idea and I glad to see that my patches help:) Hmm, still, removing a filter which want to unshare WRITE even when doesn't have