Re: [Qemu-block] [PATCH 10/10] scsi: add persistent reservation manager using qemu-pr-helper

2017-08-23 Thread Paolo Bonzini
On 23/08/2017 06:49, Fam Zheng wrote: >> + * Persistent reservation manager that talks to qemu-mpath-helper > s/qemu-mpath-helper/qemu-pr-helper/ Oops, you got a glimpse into the history of the patches. :) (it was first designed for multipath only, then decided that generic PR support would be

Re: [Qemu-block] [PATCH 06/10] scsi, file-posix: add support for persistent reservation management

2017-08-23 Thread Paolo Bonzini
On 23/08/2017 06:13, Fam Zheng wrote: > On Tue, 08/22 15:18, Paolo Bonzini wrote: >> diff --git a/docs/pr-manager.rst b/docs/pr-manager.rst > > Is docs/interop/persistent-reservation-manager.rst better? (Move to interop/ > and > de-abbreviate) ... > >> new file mode 100644 >> index

Re: [Qemu-block] [PATCH 09/10] scsi: add multipath support to qemu-pr-helper

2017-08-23 Thread Paolo Bonzini
On 23/08/2017 07:01, Fam Zheng wrote: > On Tue, 08/22 15:18, Paolo Bonzini wrote: >> Proper support of persistent reservation for multipath devices requires >> communication with the multipath daemon, so that the reservation is >> registered and applied when a path comes up. The device mapper >>

Re: [Qemu-block] [Qemu-devel] [PATCH for-2.10-rc4?] acpi: pcihp: fix use-after-free for machines previous pc-1.7 compat

2017-08-23 Thread Thomas Huth
On 23.08.2017 07:40, Thomas Huth wrote: > On 23.08.2017 02:10, Philippe Mathieu-Daudé wrote: >> On 08/22/2017 07:42 PM, Michael S. Tsirkin wrote: >>> On Tue, Aug 22, 2017 at 06:43:43PM -0300, Philippe Mathieu-Daudé wrote: 9e047b982452 "piix4: add acpi pci hotplug support" introduced a new

Re: [Qemu-block] [PATCH 07/10] io: add qio_channel_read/write_all

2017-08-23 Thread Paolo Bonzini
On 23/08/2017 07:08, Fam Zheng wrote: > On Tue, 08/22 15:18, Paolo Bonzini wrote: >> It is pretty common to read a fixed-size buffer from a socket. Add a >> function that does this, either with multiple reads (on blocking sockets) >> or by yielding if called from a coroutine. >> >> Cc: Daniel P.

Re: [Qemu-block] [Qemu-devel] [PATCH v2 06/54] qapi: introduce qapi_enum_lookup()

2017-08-23 Thread Markus Armbruster
Marc-André Lureau writes: > This will help with the introduction of a new structure to handle > enum lookup. > > Signed-off-by: Marc-André Lureau > --- [...] > 45 files changed, 206 insertions(+), 122 deletions(-) Hmm. > diff --git

Re: [Qemu-block] [Qemu-devel] [PATCH v2 10/54] block: use qemu_enum_parse() in blkdebug_debug_breakpoint

2017-08-23 Thread Markus Armbruster
Marc-André Lureau writes: > This slightly change the error report message from "Invalid event > name" to "Invalid parameter". Actually from qemu-system-x86_64: LOCATION: Invalid event name "VALUE" to qemu-system-x86_64: LOCATION: invalid parameter value:

Re: [Qemu-block] [Qemu-devel] [PATCH v2 06/54] qapi: introduce qapi_enum_lookup()

2017-08-23 Thread Marc-André Lureau
Hi - Original Message - > Marc-André Lureau writes: > > > This will help with the introduction of a new structure to handle > > enum lookup. > > > > Signed-off-by: Marc-André Lureau > > --- > [...] > > 45 files changed, 206

Re: [Qemu-block] [PATCH 10/10] scsi: add persistent reservation manager using qemu-pr-helper

2017-08-23 Thread Paolo Bonzini
On 23/08/2017 06:49, Fam Zheng wrote: >> + >> +/* A simple feature negotation protocol, even though there is >> + * no optional feature right now. >> + */ >> +if (pr_manager_helper_read(pr_mgr, , sizeof(flags), errp) < 0) { > Not returning the return value of

Re: [Qemu-block] [PATCH for-2.10-rc4?] acpi: pcihp: fix use-after-free for machines previous pc-1.7 compat

2017-08-23 Thread Igor Mammedov
On Tue, 22 Aug 2017 18:43:43 -0300 Philippe Mathieu-Daudé wrote: > 9e047b982452 "piix4: add acpi pci hotplug support" introduced a new property > 'use_acpi_pci_hotplug' for pc-1.7 and older machines. > c24d5e0b91d1 "convert ACPI PCI hotplug to use hotplug-handler API" added the

Re: [Qemu-block] [Qemu-devel] [PATCH for-2.10-rc4?] acpi: pcihp: fix use-after-free for machines previous pc-1.7 compat

2017-08-23 Thread Igor Mammedov
On Wed, 23 Aug 2017 08:04:06 +0200 Thomas Huth wrote: > On 23.08.2017 07:40, Thomas Huth wrote: > > On 23.08.2017 02:10, Philippe Mathieu-Daudé wrote: > >> On 08/22/2017 07:42 PM, Michael S. Tsirkin wrote: > >>> On Tue, Aug 22, 2017 at 06:43:43PM -0300, Philippe

Re: [Qemu-block] Persistent bitmaps for non-qcow2 formats

2017-08-23 Thread Vladimir Sementsov-Ogievskiy
22.08.2017 22:07, John Snow wrote: Well, we knew we'd want this sooner or later. I've got some pings downstream over whether or not we support persistent bitmaps for non-qcow2 formats. Currently: no, we don't. We tried two different ideas for storage agnostic bitmap persistence: (1) Using

Re: [Qemu-block] [PATCH v7 6/6] qemu-iotests: add 184 for throttle filter driver

2017-08-23 Thread Alberto Garcia
On Tue 22 Aug 2017 12:15:35 PM CEST, Manos Pitsidianakis wrote: > Signed-off-by: Manos Pitsidianakis Reviewed-by: Alberto Garcia Berto

Re: [Qemu-block] [Qemu-devel] [PATCH v2 12/54] qapi: change enum lookup structure

2017-08-23 Thread Markus Armbruster
Marc-André Lureau writes: > Store the length in the lookup table, i.e. change it from > const char *const[] to struct { int n, const char *const s[] }. > > The following conditional enum entry change will create "hole" > elements in the generated lookup array, that

Re: [Qemu-block] [Qemu-devel] [PATCH v2 11/54] quorum: use qapi_enum_parse() in quorum_open

2017-08-23 Thread Alberto Garcia
On Wed 23 Aug 2017 01:24:09 PM CEST, Markus Armbruster wrote: >> static int quorum_open(BlockDriverState *bs, QDict *options, int flags, >> Error **errp) >> { >> @@ -925,7 +908,13 @@ static int quorum_open(BlockDriverState *bs, QDict >> *options, int flags, >>

Re: [Qemu-block] [Qemu-devel] [PATCH v2 11/54] quorum: use qapi_enum_parse() in quorum_open

2017-08-23 Thread Markus Armbruster
Alberto Garcia writes: > On Tue 22 Aug 2017 03:22:12 PM CEST, Marc-André Lureau wrote: > >> @@ -925,7 +908,13 @@ static int quorum_open(BlockDriverState *bs, QDict >> *options, int flags, >> goto exit; >> } >> >> -ret = parse_read_pattern(qemu_opt_get(opts,

Re: [Qemu-block] [Qemu-devel] [PATCH v2 11/54] quorum: use qapi_enum_parse() in quorum_open

2017-08-23 Thread Markus Armbruster
Marc-André Lureau writes: > Signed-off-by: Marc-André Lureau > --- > block/quorum.c | 27 --- > 1 file changed, 8 insertions(+), 19 deletions(-) > > diff --git a/block/quorum.c b/block/quorum.c > index

Re: [Qemu-block] [Qemu-devel] [PATCH v2 13/54] qapi: drop the sentinel in enum array

2017-08-23 Thread Markus Armbruster
Marc-André Lureau writes: > Now that all usages have been converted to user lookup helpers. I don't think you got them all: $ git-grep -F _lookup. tests/test-qobject-input-visitor.c:for (i = 0; i < EnumOne_lookup.size; i++) {

Re: [Qemu-block] [PATCH v2 5/6] block: add iotest 191 for legacy throttling interface

2017-08-23 Thread Alberto Garcia
On Wed 09 Aug 2017 04:02:55 PM CEST, Manos Pitsidianakis wrote: > Check that the implicit throttle filter driver node, used for > compatibility with the legacy throttling interface on the BlockBackend > level, works. > > Signed-off-by: Manos Pitsidianakis Reviewed-by:

Re: [Qemu-block] [PATCH for-2.10-rc4?] acpi: pcihp: fix use-after-free for machines previous pc-1.7 compat

2017-08-23 Thread Michael S. Tsirkin
On Wed, Aug 23, 2017 at 07:40:39AM +0200, Thomas Huth wrote: > On 23.08.2017 02:10, Philippe Mathieu-Daudé wrote: > > On 08/22/2017 07:42 PM, Michael S. Tsirkin wrote: > >> On Tue, Aug 22, 2017 at 06:43:43PM -0300, Philippe Mathieu-Daudé wrote: > >>> 9e047b982452 "piix4: add acpi pci hotplug

[Qemu-block] [PATCH] qemu-iotests: add 194 non-shared storage migration test

2017-08-23 Thread Stefan Hajnoczi
Non-shared storage migration with NBD and drive-mirror is currently not tested by qemu-iotests. This test case covers the basic migration scenario. Signed-off-by: Stefan Hajnoczi Based-on: <20170823134242.12080-1-f...@redhat.com> --- tests/qemu-iotests/194| 73

[Qemu-block] [PATCH for-2.10 0/4] block: Fix non-shared storage migration

2017-08-23 Thread Fam Zheng
This fixes the issue reported as https://bugs.launchpad.net/bugs/1711602 Fam Zheng (3): block-backend: Refactor inactivate check block-backend: Allow more "can inactivate" cases mirror: Mark target BB as "force allow inactivate" Stefan Hajnoczi (1): block: Update open_flags after

[Qemu-block] [PATCH for-2.10 3/4] mirror: Mark target BB as "force allow inactivate"

2017-08-23 Thread Fam Zheng
Signed-off-by: Fam Zheng --- block/mirror.c | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/block/mirror.c b/block/mirror.c index c9a6a3ca86..429751b9fe 100644 --- a/block/mirror.c +++ b/block/mirror.c @@ -1134,6 +1134,7 @@ static void

[Qemu-block] [PATCH for-2.10 1/4] block-backend: Refactor inactivate check

2017-08-23 Thread Fam Zheng
The logic will be fixed (extended), move it to a separete function. Signed-off-by: Fam Zheng --- block/block-backend.c | 19 ++- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/block/block-backend.c b/block/block-backend.c index

Re: [Qemu-block] [RFC PATCH 31/56] block: Make throttle byte rates and sizes unsigned in QAPI/QMP

2017-08-23 Thread Alberto Garcia
On Mon 07 Aug 2017 04:45:35 PM CEST, Markus Armbruster wrote: > Sizes and byte rates should use QAPI type 'size' (uint64_t). > BlockIOThrottle and BlockDeviceInfo members @bps, @bps_rd, @bps_wr, > @bps_max, @bps_rd_max, @bps_wr_max, @iops_size are 'int' (int64_t). > qmp_block_set_io_throttle() and

[Qemu-block] [PATCH for-2.10 4/4] block: Update open_flags after ->inactivate() callback

2017-08-23 Thread Fam Zheng
From: Stefan Hajnoczi In the ->inactivate() callbacks, permissions are updated, which typically involves a recursive check of the whole graph. Setting BDRV_O_INACTIVE right before doing that creates a state that bdrv_is_writable() returns false, which causes permission

[Qemu-block] [PULL 2/6] block-backend: Allow more "can inactivate" cases

2017-08-23 Thread Eric Blake
From: Fam Zheng These two conditions corresponds to mirror job's source and target, which need to be allowed as they are part of the non-shared storage migration workflow: failing to inactivate either will result in a failure during migration completion. Signed-off-by: Fam

[Qemu-block] [PULL 3/6] mirror: Mark target BB as "force allow inactivate"

2017-08-23 Thread Eric Blake
From: Fam Zheng Signed-off-by: Fam Zheng Message-Id: <20170823134242.12080-4-f...@redhat.com> Reviewed-by: Stefan Hajnoczi Signed-off-by: Eric Blake --- block/mirror.c | 14 -- 1 file changed, 12

Re: [Qemu-block] [PATCH] nbd-client: avoid spurious qio_channel_yield() re-entry

2017-08-23 Thread Paolo Bonzini
On 23/08/2017 16:45, Stefan Hajnoczi wrote: > That depends on the BDRV_POLL_WHILE() allowing all request coroutines to > terminate before we call nbd_client_detach_aio_context(): > > qio_channel_shutdown(client->ioc, > QIO_CHANNEL_SHUTDOWN_BOTH, >

Re: [Qemu-block] Persistent bitmaps for non-qcow2 formats

2017-08-23 Thread Vladimir Sementsov-Ogievskiy
23.08.2017 11:59, Vladimir Sementsov-Ogievskiy wrote: 22.08.2017 22:07, John Snow wrote: Well, we knew we'd want this sooner or later. I've got some pings downstream over whether or not we support persistent bitmaps for non-qcow2 formats. Currently: no, we don't. We tried two different ideas

Re: [Qemu-block] Persistent bitmaps for non-qcow2 formats

2017-08-23 Thread Max Reitz
On 2017-08-22 21:07, John Snow wrote: [...] > (3) Add either a new flag that turns qcow2's backing file into a full > R/W backing file, or add a new extension to qcow2 entirely (bypassing > the traditional backing file mechanism to avoid confusion for older > tooling) that adds a new read-write

Re: [Qemu-block] [PATCH] nbd-client: avoid spurious qio_channel_yield() re-entry

2017-08-23 Thread Eric Blake
On 08/22/2017 07:51 AM, Stefan Hajnoczi wrote: > The following scenario leads to an assertion failure in > qio_channel_yield(): > > 1. Request coroutine calls qio_channel_yield() successfully when sending >would block on the socket. It is now yielded. > 2. nbd_read_reply_entry() calls

Re: [Qemu-block] [PATCH] nbd-client: avoid spurious qio_channel_yield() re-entry

2017-08-23 Thread Paolo Bonzini
On 23/08/2017 16:51, Eric Blake wrote: > On 08/22/2017 07:51 AM, Stefan Hajnoczi wrote: >> The following scenario leads to an assertion failure in >> qio_channel_yield(): >> >> 1. Request coroutine calls qio_channel_yield() successfully when sending >>would block on the socket. It is now

[Qemu-block] [PULL 6/6] nbd-client: avoid spurious qio_channel_yield() re-entry

2017-08-23 Thread Eric Blake
From: Stefan Hajnoczi The following scenario leads to an assertion failure in qio_channel_yield(): 1. Request coroutine calls qio_channel_yield() successfully when sending would block on the socket. It is now yielded. 2. nbd_read_reply_entry() calls

[Qemu-block] [PULL 5/6] qemu-iotests: add 194 non-shared storage migration test

2017-08-23 Thread Eric Blake
From: Stefan Hajnoczi Non-shared storage migration with NBD and drive-mirror is currently not tested by qemu-iotests. This test case covers the basic migration scenario. Signed-off-by: Stefan Hajnoczi Based-on: <20170823134242.12080-1-f...@redhat.com>

Re: [Qemu-block] Persistent bitmaps for non-qcow2 formats

2017-08-23 Thread John Snow
On 08/23/2017 01:31 PM, Max Reitz wrote: > On 2017-08-22 21:07, John Snow wrote: > > [...] > >> (3) Add either a new flag that turns qcow2's backing file into a full >> R/W backing file, or add a new extension to qcow2 entirely (bypassing >> the traditional backing file mechanism to avoid

[Qemu-block] [PULL 4/6] block: Update open_flags after ->inactivate() callback

2017-08-23 Thread Eric Blake
From: Stefan Hajnoczi In the ->inactivate() callbacks, permissions are updated, which typically involves a recursive check of the whole graph. Setting BDRV_O_INACTIVE right before doing that creates a state that bdrv_is_writable() returns false, which causes permission

[Qemu-block] [PULL 1/6] block-backend: Refactor inactivate check

2017-08-23 Thread Eric Blake
From: Fam Zheng The logic will be fixed (extended), move it to a separate function. Signed-off-by: Fam Zheng Message-Id: <20170823134242.12080-2-f...@redhat.com> Reviewed-by: Stefan Hajnoczi Signed-off-by: Eric Blake

Re: [Qemu-block] [PATCH v5 08/13] tests: Rely more on global_qtest

2017-08-23 Thread Eric Blake
On 08/23/2017 03:02 PM, Paolo Bonzini wrote: > On 23/08/2017 21:26, Eric Blake wrote: >>> I agree with using the short form where possible, but I disagree on >>> removing the long forms. Rather, global_qtest in my opinion should have >>> been static (though I'm not proposing that you do this);

Re: [Qemu-block] [PATCH v5 08/13] tests: Rely more on global_qtest

2017-08-23 Thread Paolo Bonzini
On 23/08/2017 23:30, Eric Blake wrote: >> Well, whatever is assigning to global_qtest should be using the long form. > Question - what about going the other way, and switching ALL callers to > always use the explicit form? I'd really like to maintain only one > form, but if we think maintaining

[Qemu-block] [PATCH for-2.11] hw/ide/microdrive: Mark the dscm1xxxx device with user_creatable = false

2017-08-23 Thread Thomas Huth
QEMU currently aborts with an assertion message when the user is trying to remove a dscm1 again: $ aarch64-softmmu/qemu-system-aarch64 -S -M integratorcp -nographic QEMU 2.9.93 monitor - type 'help' for more information (qemu) device_add dscm1,id=xyz (qemu) device_del xyz **

Re: [Qemu-block] [PATCH for-2.11] hw/ide/microdrive: Mark the dscm1xxxx device with user_creatable = false

2017-08-23 Thread Paolo Bonzini
On 24/08/2017 05:03, Thomas Huth wrote: > QEMU currently aborts with an assertion message when the user is trying > to remove a dscm1 again: > > $ aarch64-softmmu/qemu-system-aarch64 -S -M integratorcp -nographic > QEMU 2.9.93 monitor - type 'help' for more information > (qemu) device_add

Re: [Qemu-block] [PATCH v5 08/13] tests: Rely more on global_qtest

2017-08-23 Thread Paolo Bonzini
On 23/08/2017 21:26, Eric Blake wrote: >> I agree with using the short form where possible, but I disagree on >> removing the long forms. Rather, global_qtest in my opinion should have >> been static (though I'm not proposing that you do this); inlining the >> wrappers is not needed for

Re: [Qemu-block] Persistent bitmaps for non-qcow2 formats

2017-08-23 Thread Vladimir Sementsov-Ogievskiy
23.08.2017 21:04, Vladimir Sementsov-Ogievskiy wrote: 23.08.2017 11:59, Vladimir Sementsov-Ogievskiy wrote: 22.08.2017 22:07, John Snow wrote: Well, we knew we'd want this sooner or later. I've got some pings downstream over whether or not we support persistent bitmaps for non-qcow2 formats.

Re: [Qemu-block] [PATCH v5 08/13] tests: Rely more on global_qtest

2017-08-23 Thread Eric Blake
On 08/19/2017 11:34 AM, Paolo Bonzini wrote: > On 18/08/2017 23:33, John Snow wrote: >>> Before the next few patches >>> get rid of the qtest_* layer, we first need to update the remaining >>> few spots that were using the long form where we can instead rely >>> on the short form. >>> >> Not a big

Re: [Qemu-block] [Qemu-devel] [PATCH v2] qcow2: allocate cluster_cache/cluster_data on demand

2017-08-23 Thread Eric Blake
On 08/21/2017 08:55 AM, Stefan Hajnoczi wrote: > Most qcow2 files are uncompressed so it is wasteful to allocate (32 + 1) > * cluster_size + 512 bytes upfront. Allocate s->cluster_cache and > s->cluster_data when the first read operation is performance on a > compressed cluster. > > The buffers

Re: [Qemu-block] [Qemu-devel] nbd-client: Fix regression when server sends garbage

2017-08-23 Thread Vladimir Sementsov-Ogievskiy
ping 21.08.2017 13:13, Vladimir Sementsov-Ogievskiy wrote: 21.08.2017 13:11, Vladimir Sementsov-Ogievskiy wrote: 15.08.2017 18:09, Eric Blake wrote: When we switched NBD to use coroutines for qemu 2.9 (in particular, commit a12a712a), we introduced a regression: if a server sends us garbage

Re: [Qemu-block] [Qemu-devel] nbd-client: Fix regression when server sends garbage

2017-08-23 Thread Eric Blake
On 08/23/2017 10:09 AM, Vladimir Sementsov-Ogievskiy wrote: > ping > We're still trying to round up last-minute patches for a 2.10-rc4 pull request. @@ -107,6 +107,9 @@ static coroutine_fn void nbd_read_reply_entry(void *opaque) qemu_coroutine_yield(); }

Re: [Qemu-block] [Qemu-devel] nbd-client: Fix regression when server sends garbage

2017-08-23 Thread Vladimir Sementsov-Ogievskiy
23.08.2017 18:17, Eric Blake wrote: On 08/23/2017 10:09 AM, Vladimir Sementsov-Ogievskiy wrote: ping We're still trying to round up last-minute patches for a 2.10-rc4 pull request. @@ -107,6 +107,9 @@ static coroutine_fn void nbd_read_reply_entry(void *opaque)

Re: [Qemu-block] [PATCH] nbd-client: avoid spurious qio_channel_yield() re-entry

2017-08-23 Thread Eric Blake
On 08/22/2017 07:51 AM, Stefan Hajnoczi wrote: > The following scenario leads to an assertion failure in > qio_channel_yield(): > > 1. Request coroutine calls qio_channel_yield() successfully when sending >would block on the socket. It is now yielded. > 2. nbd_read_reply_entry() calls

Re: [Qemu-block] [Qemu-devel] [PATCH] nbd-client: fix hang after server closes connection

2017-08-23 Thread Eric Blake
On 08/21/2017 02:01 PM, Eric Blake wrote: > On 08/21/2017 11:27 AM, Stefan Hajnoczi wrote: >> On Mon, Aug 21, 2017 at 5:15 PM, Stefan Hajnoczi wrote: >>> (qemu) quit >>> ...hang... >> >> By the way, the same issue is present in QEMU 2.9. This is not a 2.10 >> regression.

Re: [Qemu-block] [Qemu-devel] [PATCH] nbd-client: fix hang after server closes connection

2017-08-23 Thread Eric Blake
On 08/23/2017 09:25 AM, Eric Blake wrote: > On 08/21/2017 02:01 PM, Eric Blake wrote: >> On 08/21/2017 11:27 AM, Stefan Hajnoczi wrote: >>> On Mon, Aug 21, 2017 at 5:15 PM, Stefan Hajnoczi >>> wrote: (qemu) quit ...hang... >>> >>> By the way, the same issue is

Re: [Qemu-block] [Qemu-devel] [PATCH for-2.10 0/4] block: Fix non-shared storage migration

2017-08-23 Thread Dr. David Alan Gilbert
* Fam Zheng (f...@redhat.com) wrote: > This fixes the issue reported as https://bugs.launchpad.net/bugs/1711602 Yep, that fixes it in my test setup (1 of 1 passes!) Dave > Fam Zheng (3): > block-backend: Refactor inactivate check > block-backend: Allow more "can inactivate" cases > mirror:

Re: [Qemu-block] [Qemu-devel] [PATCH for-2.10 1/4] block-backend: Refactor inactivate check

2017-08-23 Thread Eric Blake
On 08/23/2017 08:42 AM, Fam Zheng wrote: > The logic will be fixed (extended), move it to a separete function. s/separete/separate/ [can fix on pull request] > > Signed-off-by: Fam Zheng > --- > block/block-backend.c | 19 ++- > 1 file changed, 14

Re: [Qemu-block] [Qemu-devel] [PATCH for-2.10 2/4] block-backend: Allow more "can inactivate" cases

2017-08-23 Thread Eric Blake
On 08/23/2017 08:42 AM, Fam Zheng wrote: > These two conditions corresponds to mirror job's source and target, s/corresponds to/correspond to a/ [can touch up on pull request] > which need to be allowed as they are part of the non-shared storage > migration workflow: failing to inactivate

Re: [Qemu-block] [PATCH] nbd-client: avoid spurious qio_channel_yield() re-entry

2017-08-23 Thread Stefan Hajnoczi
On Tue, Aug 22, 2017 at 03:23:32PM +0200, Paolo Bonzini wrote: > On 22/08/2017 14:51, Stefan Hajnoczi wrote: > > This should fix the issue that Dave is seeing but I'm concerned that > > there are more problems in nbd-client.c. We don't have good > > abstractions for writing coroutine socket I/O

Re: [Qemu-block] [PATCH] nbd-client: fix hang after server closes connection

2017-08-23 Thread Stefan Hajnoczi
On Mon, Aug 21, 2017 at 05:15:39PM +0100, Stefan Hajnoczi wrote: > Commit 72b6ffc76653214b69a94a7b1643ff80df134486 ("nbd-client: Fix > regression when server sends garbage") improved NBD client behavior when > the connection enters a broken state. > > The following still does not behave as

Re: [Qemu-block] [PATCH] nbd-client: avoid spurious qio_channel_yield() re-entry

2017-08-23 Thread Eric Blake
On 08/22/2017 07:51 AM, Stefan Hajnoczi wrote: > The following scenario leads to an assertion failure in > qio_channel_yield(): > > 1. Request coroutine calls qio_channel_yield() successfully when sending >would block on the socket. It is now yielded. > 2. nbd_read_reply_entry() calls

Re: [Qemu-block] [PATCH for-2.10 4/4] block: Update open_flags after ->inactivate() callback

2017-08-23 Thread Stefan Hajnoczi
On Wed, Aug 23, 2017 at 09:42:42PM +0800, Fam Zheng wrote: > From: Stefan Hajnoczi > > In the ->inactivate() callbacks, permissions are updated, which > typically involves a recursive check of the whole graph. Setting > BDRV_O_INACTIVE right before doing that creates a state

Re: [Qemu-block] [PATCH for-2.10 0/4] block: Fix non-shared storage migration

2017-08-23 Thread Stefan Hajnoczi
On Wed, Aug 23, 2017 at 09:42:38PM +0800, Fam Zheng wrote: > This fixes the issue reported as https://bugs.launchpad.net/bugs/1711602 > > Fam Zheng (3): > block-backend: Refactor inactivate check > block-backend: Allow more "can inactivate" cases > mirror: Mark target BB as "force allow

Re: [Qemu-block] [PATCH] nbd-client: avoid spurious qio_channel_yield() re-entry

2017-08-23 Thread Stefan Hajnoczi
On Wed, Aug 23, 2017 at 3:20 PM, Eric Blake wrote: > On 08/22/2017 07:51 AM, Stefan Hajnoczi wrote: >> The following scenario leads to an assertion failure in >> qio_channel_yield(): >> >> 1. Request coroutine calls qio_channel_yield() successfully when sending >>would

Re: [Qemu-block] [Qemu-devel] [PATCH for-2.10 0/4] block: Fix non-shared storage migration

2017-08-23 Thread Eric Blake
On 08/23/2017 09:29 AM, Dr. David Alan Gilbert wrote: > * Fam Zheng (f...@redhat.com) wrote: >> This fixes the issue reported as https://bugs.launchpad.net/bugs/1711602 > > Yep, that fixes it in my test setup (1 of 1 passes!) As mentioned on IRC, I'll treat this as a Tested-by: tag on 4/4 in my

Re: [Qemu-block] [Qemu-devel] [PATCH for-2.10 0/4] block: Fix non-shared storage migration

2017-08-23 Thread Eric Blake
On 08/23/2017 08:42 AM, Fam Zheng wrote: > This fixes the issue reported as https://bugs.launchpad.net/bugs/1711602 > > Fam Zheng (3): > block-backend: Refactor inactivate check > block-backend: Allow more "can inactivate" cases > mirror: Mark target BB as "force allow inactivate" > >

Re: [Qemu-block] [Qemu-devel] [PATCH for-2.10 2/4] block-backend: Allow more "can inactivate" cases

2017-08-23 Thread Fam Zheng
On Wed, 08/23 09:36, Eric Blake wrote: > On 08/23/2017 08:42 AM, Fam Zheng wrote: > > These two conditions corresponds to mirror job's source and target, > > s/corresponds to/correspond to a/ > > [can touch up on pull request] > > > which need to be allowed as they are part of the non-shared

Re: [Qemu-block] [PATCH] qemu-iotests: add 194 non-shared storage migration test

2017-08-23 Thread Eric Blake
On 08/23/2017 09:05 AM, Stefan Hajnoczi wrote: > Non-shared storage migration with NBD and drive-mirror is currently not > tested by qemu-iotests. This test case covers the basic migration > scenario. > > Signed-off-by: Stefan Hajnoczi > Based-on:

Re: [Qemu-block] [Qemu-devel] [PATCH for-2.10 2/4] block-backend: Allow more "can inactivate" cases

2017-08-23 Thread Eric Blake
On 08/23/2017 09:47 AM, Fam Zheng wrote: > On Wed, 08/23 09:36, Eric Blake wrote: >> On 08/23/2017 08:42 AM, Fam Zheng wrote: >>> These two conditions corresponds to mirror job's source and target, >> >> s/corresponds to/correspond to a/ >> >> [can touch up on pull request] >> >>> which need to be