Re: [Qemu-block] [PATCH v2 1/7] nbd-client: Fix error message typos

2017-11-09 Thread Vladimir Sementsov-Ogievskiy
09.11.2017 00:56, Eric Blake wrote: Provide missing spaces that are required when using string concatenation to break error messages across source lines. Signed-off-by: Eric Blake Reviewed-by: Vladimir Sementsov-Ogievskiy ---

Re: [Qemu-block] [PATCH v2 6/7] nbd-client: Stricter enforcing of structured reply spec

2017-11-09 Thread Vladimir Sementsov-Ogievskiy
09.11.2017 00:57, Eric Blake wrote: Ensure that the server is not sending unexpected chunk lengths for either the NONE or the OFFSET_DATA chunk, nor unexpected hole length for OFFSET_HOLE. This will flag any server that responds to a zero-length read with an OFFSET_DATA as broken, or

Re: [Qemu-block] [Qemu-devel] question: I found a qemu crash when attach virtio-scsi disk

2017-11-09 Thread Stefan Hajnoczi
On Tue, Nov 07, 2017 at 11:39:44AM +0100, Paolo Bonzini wrote: > On 07/11/2017 02:59, Fam Zheng wrote: > > On Mon, 11/06 17:33, Paolo Bonzini wrote: > >> On 06/11/2017 17:11, Kevin Wolf wrote: > >>> Am 03.11.2017 um 11:26 hat Stefan Hajnoczi geschrieben: > On Wed, Nov 01, 2017 at 06:42:33AM

Re: [Qemu-block] [PATCH v2 3/7] nbd/client: Nicer trace of structured reply

2017-11-09 Thread Vladimir Sementsov-Ogievskiy
09.11.2017 00:56, Eric Blake wrote: It's useful to know which structured reply chunk is being processed. Signed-off-by: Eric Blake Reviewed-by: Vladimir Sementsov-Ogievskiy -- Best regards, Vladimir

[Qemu-block] [PATCH] coroutine: simplify co_aio_sleep_ns() prototype

2017-11-09 Thread Stefan Hajnoczi
The AioContext pointer argument to co_aio_sleep_ns() is only used for the sleep timer. It does not affect where the caller coroutine is resumed. Due to changes to coroutine and AIO APIs it is now possible to drop the AioContext pointer argument. This is safe to do since no caller has specific

Re: [Qemu-block] [PATCH 1/2] nbd/server: Implement sparse reads atop structured reply

2017-11-09 Thread Vladimir Sementsov-Ogievskiy
07.11.2017 06:09, Eric Blake wrote: The reason that NBD added structured reply in the first place was to allow for efficient reads of sparse files, by allowing the reply to include chunks to quickly communicate holes to the client without sending lots of zeroes over the wire. Time to implement

Re: [Qemu-block] [PATCH 2/2] nbd/server: Optimize final chunk of sparse read

2017-11-09 Thread Vladimir Sementsov-Ogievskiy
07.11.2017 06:09, Eric Blake wrote: If we are careful to handle 0-length read requests correctly, we can optimize our sparse read to send the NBD_REPLY_FLAG_DONE bit on our last OFFSET_DATA or OFFSET_HOLE chunk rather than needing a separate chunk. Signed-off-by: Eric Blake

Re: [Qemu-block] [Qemu-devel] [PATCH] block: Fix error path in bdrv_backing_update_filename()

2017-11-09 Thread Stefan Hajnoczi
On Mon, Nov 06, 2017 at 05:55:00PM +0100, Kevin Wolf wrote: > error_setg_errno() takes a positive errno code. > > Signed-off-by: Kevin Wolf > --- > block.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Stefan Hajnoczi

Re: [Qemu-block] [PATCH v4 0/4] Don't write headers if BDS is INACTIVE

2017-11-09 Thread Stefan Hajnoczi
On Tue, Nov 07, 2017 at 08:10:32AM -0500, Jeff Cody wrote: > Changes from v3->v4: > > Patch 3: Add migrate_del_blocker and error_free (Thanks Stefan) > > > git-backport-diff -r qemu/master.. -u ba11b69 > > 001/4:[] [--] 'block/vhdx.c: Don't blindly update the header' > 002/4:[] [--]

Re: [Qemu-block] [Qemu-devel] segfault in parallel blockjobs (iotest 30)

2017-11-09 Thread Alberto Garcia
On Thu 09 Nov 2017 07:05:26 AM CET, Fam Zheng wrote: >> > I can fix the crash by adding block_job_pause_point(>common) at >> > the end of stream_run() (where the 'out' label is). >> > >> > I'm thinking that perhaps we should add the pause point directly to >> > block_job_defer_to_main_loop(), to

Re: [Qemu-block] [PATCH v2 4/7] nbd: Fix struct name for structured reads

2017-11-09 Thread Vladimir Sementsov-Ogievskiy
09.11.2017 00:57, Eric Blake wrote: A closer read of the NBD spec shows that a structured reply chunk for a hole is not quite identical to the prefix of a data chunk, because the hole has to also send a 32-bit size field. Although we do not yet send holes, we should fix the misleading

Re: [Qemu-block] [PATCH v2 7/7] nbd/server: Fix structured read of length 0

2017-11-09 Thread Vladimir Sementsov-Ogievskiy
09.11.2017 00:57, Eric Blake wrote: The NBD spec was recently clarified to state that a read of length 0 should not be attempted by a compliant client; but that a server must still handle it correctly in an unspecified manner (that is, either a successful no-op or an error reply, but not a

Re: [Qemu-block] [PATCH v2 2.5/7] fixup! nbd-client: Refuse read-only client with BDRV_O_RDWR

2017-11-09 Thread Vladimir Sementsov-Ogievskiy
09.11.2017 01:23, Eric Blake wrote: ... Fix several iotests to comply with the new behavior (since qemu-nbd of an internal snapshot, as well as nbd-server-add over QMP, default to a read-only export, we must tell blockdev-add/qemu-io to set up a read-only client). Signed-off-by: Eric Blake

Re: [Qemu-block] [PATCH v2 2/7] nbd-client: Refuse read-only client with BDRV_O_RDWR

2017-11-09 Thread Vladimir Sementsov-Ogievskiy
09.11.2017 00:56, Eric Blake wrote: The NBD spec says that clients should not try to write/trim to an export advertised as read-only by the server. But we failed to check that, and would allow the block layer to use NBD with BDRV_O_RDWR even when the server is read-only, which meant we were

Re: [Qemu-block] [PATCH v2 5/7] nbd-client: Short-circuit 0-length operations

2017-11-09 Thread Vladimir Sementsov-Ogievskiy
09.11.2017 00:57, Eric Blake wrote: The NBD spec was recently clarified to state that clients should not send 0-length requests to the server, as the server behavior is undefined [1]. We know that qemu-nbd's behavior is a successful no-op (once it has filtered for read-only exports), but other

Re: [Qemu-block] [Qemu-devel] question: I found a qemu crash when attach virtio-scsi disk

2017-11-09 Thread Paolo Bonzini
On 09/11/2017 12:33, Stefan Hajnoczi wrote: >>> Can main thread somehow call aio_context_acquire(vs->ctx) (and release) >>> around >>> qdev_set_parent_bus()? virtio_scsi_device_find() takes the lock. >> No, the context is not set yet. But the locking is easy to add, >> separately from the bug

Re: [Qemu-block] [PATCH v2 1/7] nbd-client: Fix error message typos

2017-11-09 Thread Eric Blake
On 11/09/2017 02:58 AM, Vladimir Sementsov-Ogievskiy wrote: > 09.11.2017 00:56, Eric Blake wrote: >> Provide missing spaces that are required when using string >> concatenation to break error messages across source lines. >> >> Signed-off-by: Eric Blake > > Reviewed-by:

Re: [Qemu-block] [PATCH v2 5/7] nbd-client: Short-circuit 0-length operations

2017-11-09 Thread Eric Blake
On 11/09/2017 03:20 AM, Vladimir Sementsov-Ogievskiy wrote: > 09.11.2017 00:57, Eric Blake wrote: >> The NBD spec was recently clarified to state that clients should >> not send 0-length requests to the server, as the server behavior >> is undefined [1].  We know that qemu-nbd's behavior is a

Re: [Qemu-block] [PATCH] coroutine: simplify co_aio_sleep_ns() prototype

2017-11-09 Thread Eric Blake
On 11/09/2017 04:26 AM, Stefan Hajnoczi wrote: > The AioContext pointer argument to co_aio_sleep_ns() is only used for > the sleep timer. It does not affect where the caller coroutine is > resumed. > > Due to changes to coroutine and AIO APIs it is now possible to drop the > AioContext pointer

Re: [Qemu-block] [Qemu-devel] RFC: use case for adding QMP, block jobs & multiple exports to qemu-nbd ?

2017-11-09 Thread Markus Armbruster
Max Reitz writes: > On 2017-11-02 13:02, Daniel P. Berrange wrote: > [...] >> One alternative approach to doing this would be to suggest that we should >> instead just spawn qemu-system-x86_64 with '--machine none' and use that >> as a replacement for qemu-nbd, since it

Re: [Qemu-block] [Qemu-devel] [PATCH 2/5] iotests: Add missing 'blkdebug::' in 040

2017-11-09 Thread Eric Blake
On 11/08/2017 07:38 PM, Max Reitz wrote: > 040 tries to invoke pause_drive() on a drive that does not use blkdebug. > Good idea, but let's use blkdebug to make it actually work. > > Signed-off-by: Max Reitz > --- > tests/qemu-iotests/040 | 2 +- > 1 file changed, 1

Re: [Qemu-block] [Qemu-devel] [PATCH 1/5] iotests: Make 030 less flaky

2017-11-09 Thread Eric Blake
On 11/08/2017 07:38 PM, Max Reitz wrote: > This patch fixes two race conditions in 030: > > 1. The first is in TestENSPC.test_enospc(). After resuming the job, s/ENSPC/ENOSPC/ >querying it to confirm it is no longer paused may fail because in the >meantime it might have completed

Re: [Qemu-block] [Qemu-devel] [PATCH 3/5] iotests: Make 055 less flaky

2017-11-09 Thread Eric Blake
On 11/08/2017 07:38 PM, Max Reitz wrote: > First of all, test 055 does a valiant job of invoking pause_drive() > sometimes, but that is worth nothing without blkdebug. So the first > thing to do is to sprinkle a couple of "blkdebug::" in there -- with the > exception of the transaction tests,

Re: [Qemu-block] [Qemu-devel] [PATCH 4/5] iotests: Make 083 less flaky

2017-11-09 Thread Eric Blake
On 11/08/2017 07:38 PM, Max Reitz wrote: > 083 has (at least) two issues: I think I hit one of them intermittently yesterday; thanks for diagnosing these (and like you say, there may be more lurking, but we'll whack them separately if we can reproduce and identify them). > > 1. By launching the

[Qemu-block] [PATCH] blockdev-backup: enable non-root nodes for backup

2017-11-09 Thread Vladimir Sementsov-Ogievskiy
This is needed to implement image-fleecing scheme, when we create a temporary node, mark our active node to be backing for the temp, and start backup(sync=none) from active node to the temp node. Temp node then represents a kind of snapshot and may be used for external backup through NBD.

Re: [Qemu-block] [Qemu-devel] [PATCH v4 04/45] tests: Replace fprintf(stderr, "*\n" with error_report()

2017-11-09 Thread Philippe Mathieu-Daudé
On 11/09/2017 11:38 AM, Eric Blake wrote: > On 11/08/2017 04:56 PM, Alistair Francis wrote: [...] >> exit(-1); } qemu_thread_create([n_threads], "test", func, >> [n_threads], @@ -417,7 +418,7 @@ static void >> gtest_stress_10_5(void) >> >> static void usage(int argc, char *argv[]) { -

Re: [Qemu-block] [Qemu-devel] Intermittent hang of iotest 194 (bdrv_drain_all after non-shared storage migration)

2017-11-09 Thread Max Reitz
On 2017-11-09 05:21, Fam Zheng wrote: > On Thu, 11/09 01:48, Max Reitz wrote: >> Hi, >> >> More exciting news from the bdrv_drain() front! >> >> I've noticed in the past that iotest 194 sometimes hangs. I usually run >> the tests on tmpfs, but I've just now verified that it happens on my SSD >>

Re: [Qemu-block] [Qemu-devel] Intermittent hang of iotest 194 (bdrv_drain_all after non-shared storage migration)

2017-11-09 Thread Fam Zheng
On Thu, 11/09 16:14, Max Reitz wrote: > On 2017-11-09 05:21, Fam Zheng wrote: > > On Thu, 11/09 01:48, Max Reitz wrote: > >> Hi, > >> > >> More exciting news from the bdrv_drain() front! > >> > >> I've noticed in the past that iotest 194 sometimes hangs. I usually run > >> the tests on tmpfs, but

Re: [Qemu-block] [Qemu-devel] [PATCH v4 04/45] tests: Replace fprintf(stderr, "*\n" with error_report()

2017-11-09 Thread Eric Blake
On 11/08/2017 04:56 PM, Alistair Francis wrote: > Replace a large number of the fprintf(stderr, "*\n" calls with > error_report(). The functions were renamed with these commands and then > compiler issues where manually fixed. s/where/were/ > > Some of the error_report()'s were manually kept

Re: [Qemu-block] [PATCH v4 0/4] Don't write headers if BDS is INACTIVE

2017-11-09 Thread Denis V. Lunev
On 11/07/2017 04:10 PM, Jeff Cody wrote: > Changes from v3->v4: > > Patch 3: Add migrate_del_blocker and error_free (Thanks Stefan) > > > git-backport-diff -r qemu/master.. -u ba11b69 > > 001/4:[] [--] 'block/vhdx.c: Don't blindly update the header' > 002/4:[] [--] 'block/parallels: Do not

Re: [Qemu-block] [PATCH v2] throttle: fix a qemu crash problem when calling blk_delete

2017-11-09 Thread Stefan Hajnoczi
On Tue, Oct 24, 2017 at 11:33:51AM +0800, sochin jiang wrote: > commit 7ca7f0 moves the throttling related part of the BDS life cycle > management to BlockBackend, adds call to > throttle_timers_detach_aio_context in blk_remove_bs. commit 1606e > remove a block device from its throttle group in

[Qemu-block] [PULL 3/8] nbd-client: Refuse read-only client with BDRV_O_RDWR

2017-11-09 Thread Eric Blake
The NBD spec says that clients should not try to write/trim to an export advertised as read-only by the server. But we failed to check that, and would allow the block layer to use NBD with BDRV_O_RDWR even when the server is read-only, which meant we were depending on the server sending a proper

Re: [Qemu-block] [PATCH 2/2] qmp: add nbd-server-remove

2017-11-09 Thread Eric Blake
On 11/09/2017 09:40 AM, Vladimir Sementsov-Ogievskiy wrote: > Add command for export removing. It is needed for cases when we > don't want to keep export after the operation on it was completed. > The other example is temporary node, created with blockdev-add. > If we want to delete it we should

[Qemu-block] [PULL 4/8] nbd/client: Nicer trace of structured reply

2017-11-09 Thread Eric Blake
It's useful to know which structured reply chunk is being processed. Missed in commit d2febedb. Signed-off-by: Eric Blake Message-Id: <20171108215703.9295-4-ebl...@redhat.com> Reviewed-by: Vladimir Sementsov-Ogievskiy --- nbd/client.c | 4 +++-

[Qemu-block] [PULL 2/8] nbd-client: Fix error message typos

2017-11-09 Thread Eric Blake
Provide missing spaces that are required when using string concatenation to break error messages across source lines. Introduced in commit f140e300. Signed-off-by: Eric Blake Message-Id: <20171108215703.9295-2-ebl...@redhat.com> Reviewed-by: Vladimir Sementsov-Ogievskiy

[Qemu-block] [PULL 1/8] nbd/server: fix nbd_negotiate_handle_info

2017-11-09 Thread Eric Blake
From: Vladimir Sementsov-Ogievskiy namelen should be here, length is unrelated, and always 0 at this point. Broken in introduction in commit f37708f6, but mostly harmless (replying with '' as the name does not violate protocol, and does not confuse qemu as the nbd

[Qemu-block] [PULL 5/8] nbd: Fix struct name for structured reads

2017-11-09 Thread Eric Blake
A closer read of the NBD spec shows that a structured reply chunk for a hole is not quite identical to the prefix of a data chunk, because the hole has to also send a 32-bit size field. Although we do not yet send holes, we should fix the misleading information in our header and make it easier

Re: [Qemu-block] [PATCH] coroutine: simplify co_aio_sleep_ns() prototype

2017-11-09 Thread Stefan Hajnoczi
On Thu, Nov 09, 2017 at 10:26:52AM +, Stefan Hajnoczi wrote: > The AioContext pointer argument to co_aio_sleep_ns() is only used for > the sleep timer. It does not affect where the caller coroutine is > resumed. > > Due to changes to coroutine and AIO APIs it is now possible to drop the >

Re: [Qemu-block] Drainage in bdrv_replace_child_noperm()

2017-11-09 Thread Kevin Wolf
Am 08.11.2017 um 21:16 hat Max Reitz geschrieben: > On 2017-11-07 15:22, Kevin Wolf wrote: > > I think the issue is much simpler, even though it still has two parts. > > It's the old story of bdrv_drain mixing two separate concepts: > > > > 1. Wait synchronously for the completion of all my

Re: [Qemu-block] [PATCH] blockdev-backup: enable non-root nodes for backup

2017-11-09 Thread Eric Blake
On 11/09/2017 08:16 AM, Vladimir Sementsov-Ogievskiy wrote: > This is needed to implement image-fleecing scheme, when we create > a temporary node, mark our active node to be backing for the temp, > and start backup(sync=none) from active node to the temp node. > Temp node then represents a kind

Re: [Qemu-block] [PATCH] block: all I/O should be completed before removing throttle timers.

2017-11-09 Thread Stefan Hajnoczi
On Sat, Oct 21, 2017 at 01:34:00PM +0800, Zhengui Li wrote: > From: Zhengui > > In blk_remove_bs, all I/O should be completed before removing throttle > timers. If there has inflight I/O, removing throttle timers here will > cause the inflight I/O never return. > This patch

Re: [Qemu-block] [PATCH 0/2] add qmp nbd-server-remove

2017-11-09 Thread Eric Blake
On 11/09/2017 09:40 AM, Vladimir Sementsov-Ogievskiy wrote: > Add command to remove nbd export, pair to nbd-server-add. > The whole thing and description are in patch 02. > > Vladimir Sementsov-Ogievskiy (2): > nbd/server: add additional assert to nbd_export_put > qmp: add nbd-server-remove >

Re: [Qemu-block] [PATCH 0/5] iotests: Make some tests less flaky

2017-11-09 Thread Stefan Hajnoczi
On Thu, Nov 09, 2017 at 02:37:59AM +0100, Max Reitz wrote: > There are a couple of tests that fail (on my machine) from time to > time (and by that I mean that recently I've rarely ever had a test run > with both 083 and 136 working on first try). > This series should fix most (at least the issues

[Qemu-block] [PATCH 2/2] qmp: add nbd-server-remove

2017-11-09 Thread Vladimir Sementsov-Ogievskiy
Add command for export removing. It is needed for cases when we don't want to keep export after the operation on it was completed. The other example is temporary node, created with blockdev-add. If we want to delete it we should firstly remove corresponding NBD export. Signed-off-by: Vladimir

[Qemu-block] [PATCH 0/2] add qmp nbd-server-remove

2017-11-09 Thread Vladimir Sementsov-Ogievskiy
Add command to remove nbd export, pair to nbd-server-add. The whole thing and description are in patch 02. Vladimir Sementsov-Ogievskiy (2): nbd/server: add additional assert to nbd_export_put qmp: add nbd-server-remove qapi/block.json | 20 blockdev-nbd.c | 27

[Qemu-block] [PATCH 1/2] nbd/server: add additional assert to nbd_export_put

2017-11-09 Thread Vladimir Sementsov-Ogievskiy
This place is not obvious, nbd_export_close may theoretically reduce refcount to 0. It may happen if someone calls nbd_export_put on named export not through nbd_export_set_name when refcount is 1. Signed-off-by: Vladimir Sementsov-Ogievskiy --- nbd/server.c | 1 + 1

[Qemu-block] [PULL 8/8] nbd/server: Fix structured read of length 0

2017-11-09 Thread Eric Blake
The NBD spec was recently clarified to state that a read of length 0 should not be attempted by a compliant client; but that a server must still handle it correctly in an unspecified manner (that is, either a successful no-op or an error reply, but not a crash) [1]. However, it also implies that

[Qemu-block] [PULL 7/8] nbd-client: Stricter enforcing of structured reply spec

2017-11-09 Thread Eric Blake
Ensure that the server is not sending unexpected chunk lengths for either the NONE or the OFFSET_DATA chunk, nor unexpected hole length for OFFSET_HOLE. This will flag any server as broken that responds to a zero-length read with an OFFSET_DATA (what our server currently does, but that's about to

Re: [Qemu-block] [PATCH] blockdev-backup: enable non-root nodes for backup

2017-11-09 Thread Kevin Wolf
Am 09.11.2017 um 17:33 hat Eric Blake geschrieben: > On 11/09/2017 08:16 AM, Vladimir Sementsov-Ogievskiy wrote: > > This is needed to implement image-fleecing scheme, when we create > > a temporary node, mark our active node to be backing for the temp, > > and start backup(sync=none) from active

Re: [Qemu-block] segfault in parallel blockjobs (iotest 30)

2017-11-09 Thread Alberto Garcia
On Wed 08 Nov 2017 03:45:38 PM CET, Alberto Garcia wrote: > I'm thinking that perhaps we should add the pause point directly to > block_job_defer_to_main_loop(), to prevent any block job from running > the exit function when it's paused. I was trying this and unfortunately this breaks the mirror

[Qemu-block] [PULL 6/8] nbd-client: Short-circuit 0-length operations

2017-11-09 Thread Eric Blake
The NBD spec was recently clarified to state that clients should not send 0-length requests to the server, as the server behavior is undefined [1]. We know that qemu-nbd's behavior is a successful no-op (once it has filtered for read-only exports), but other NBD implementations might return an

Re: [Qemu-block] [Qemu-devel] Intermittent hang of iotest 194 (bdrv_drain_all after non-shared storage migration)

2017-11-09 Thread Max Reitz
On 2017-11-09 16:30, Fam Zheng wrote: > On Thu, 11/09 16:14, Max Reitz wrote: >> On 2017-11-09 05:21, Fam Zheng wrote: >>> On Thu, 11/09 01:48, Max Reitz wrote: Hi, More exciting news from the bdrv_drain() front! I've noticed in the past that iotest 194 sometimes hangs. I

[Qemu-block] [PATCH for-2.11] block: Keep strong reference when draining all BDS

2017-11-09 Thread Max Reitz
Draining a BDS may lead to graph modifications, which in turn may result in it and other BDS being stripped of their current references. If bdrv_drain_all_begin() and bdrv_drain_all_end() do not keep strong references themselves, the BDS they are trying to drain (or undrain) may disappear right

[Qemu-block] [PATCH for-2.11] iotests: Use new-style NBD connections

2017-11-09 Thread Eric Blake
Old-style NBD is deprecated upstream (it is documented, but no longer implemented in the reference implementation), and it is severely limited (it cannot support structured replies, which means it cannot support efficient handling of zeroes), when compared to new-style NBD. We are better off

[Qemu-block] [PATCH v2 2/5] iotests: Add missing 'blkdebug::' in 040

2017-11-09 Thread Max Reitz
040 tries to invoke pause_drive() on a drive that does not use blkdebug. Good idea, but let's use blkdebug to make it actually work. Signed-off-by: Max Reitz Reviewed-by: Eric Blake Reviewed-by: Stefan Hajnoczi ---

Re: [Qemu-block] [Qemu-devel] [PATCH for-2.11] block: Keep strong reference when draining all BDS

2017-11-09 Thread Eric Blake
On 11/09/2017 02:43 PM, Max Reitz wrote: > Draining a BDS may lead to graph modifications, which in turn may result > in it and other BDS being stripped of their current references. If > bdrv_drain_all_begin() and bdrv_drain_all_end() do not keep strong > references themselves, the BDS they are

Re: [Qemu-block] [Qemu-devel] [PATCH 4/5] iotests: Make 083 less flaky

2017-11-09 Thread Max Reitz
On 2017-11-09 15:11, Eric Blake wrote: > On 11/08/2017 07:38 PM, Max Reitz wrote: >> 083 has (at least) two issues: > > I think I hit one of them intermittently yesterday; thanks for > diagnosing these (and like you say, there may be more lurking, but we'll > whack them separately if we can

Re: [Qemu-block] [PATCH] blockdev-backup: enable non-root nodes for backup

2017-11-09 Thread John Snow
On 11/09/2017 09:16 AM, Vladimir Sementsov-Ogievskiy wrote: > What was the reason to abandon non-root nodes? Eric had it correct: we were never convinced it work would properly, so we went with a smaller set.

[Qemu-block] [PATCH v2 5/5] iotests: Make 136 less flaky

2017-11-09 Thread Max Reitz
136 executes some AIO requests without a final aio_flush; then it advances the virtual clock and thus expects the last access time of the device to be less than the current time when queried (i.e. idle_time_ns to be greater than 0). However, without the aio_flush, some requests may be settled

Re: [Qemu-block] [PATCH v2 4/5] iotests: Make 083 less flaky

2017-11-09 Thread Eric Blake
On 11/09/2017 02:30 PM, Max Reitz wrote: > 083 has (at least) two issues: > > 1. By launching the nbd-fault-injector in background, it may not be >scheduled until the first grep on its output file is executed. >However, until then, that file may not have been created yet -- so it >

[Qemu-block] [PATCH v2 3/5] iotests: Make 055 less flaky

2017-11-09 Thread Max Reitz
First of all, test 055 does a valiant job of invoking pause_drive() sometimes, but that is worth nothing without blkdebug. So the first thing to do is to sprinkle a couple of "blkdebug::" in there -- with the exception of the transaction tests, because the blkdebug break points make the

[Qemu-block] [PATCH v2 1/5] iotests: Make 030 less flaky

2017-11-09 Thread Max Reitz
This patch fixes two race conditions in 030: 1. The first is in TestENOSPC.test_enospc(). After resuming the job, querying it to confirm it is no longer paused may fail because in the meantime it might have completed already. The same was fixed in TestEIO.test_ignore() already (in

[Qemu-block] [PATCH v2 0/5] iotests: Make some tests less flaky

2017-11-09 Thread Max Reitz
There are a couple of tests that fail (on my machine) from time to time (and by that I mean that recently I've rarely ever had a test run with both 083 and 136 working on first try). This series should fix most (at least the issues I am aware of). Notes: - 083 might have another issue, but if so

[Qemu-block] [PATCH v2 4/5] iotests: Make 083 less flaky

2017-11-09 Thread Max Reitz
083 has (at least) two issues: 1. By launching the nbd-fault-injector in background, it may not be scheduled until the first grep on its output file is executed. However, until then, that file may not have been created yet -- so it either does not exist yet (thus making the grep emit an

Re: [Qemu-block] [PATCH v2 4/5] iotests: Make 083 less flaky

2017-11-09 Thread Max Reitz
On 2017-11-09 21:58, Eric Blake wrote: > On 11/09/2017 02:30 PM, Max Reitz wrote: >> 083 has (at least) two issues: >> >> 1. By launching the nbd-fault-injector in background, it may not be >>scheduled until the first grep on its output file is executed. >>However, until then, that file

Re: [Qemu-block] [PATCH v2 0/5] iotests: Make some tests less flaky

2017-11-09 Thread Max Reitz
On 2017-11-09 21:30, Max Reitz wrote: > There are a couple of tests that fail (on my machine) from time to > time (and by that I mean that recently I've rarely ever had a test run > with both 083 and 136 working on first try). > This series should fix most (at least the issues I am aware of).

Re: [Qemu-block] [PATCH for-2.11] iotests: Use new-style NBD connections

2017-11-09 Thread Max Reitz
On 2017-11-09 23:12, Eric Blake wrote: > Old-style NBD is deprecated upstream (it is documented, but no > longer implemented in the reference implementation), and it is > severely limited (it cannot support structured replies, which > means it cannot support efficient handling of zeroes), when >

Re: [Qemu-block] [Qemu-devel] [PATCH v8 01/14] block/dirty-bitmap: add bdrv_dirty_bitmap_enable_successor()

2017-11-09 Thread John Snow
On 10/30/2017 12:32 PM, Vladimir Sementsov-Ogievskiy wrote: > Enabling bitmap successor is necessary to enable successors of bitmaps > being migrated before target vm start. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > include/block/dirty-bitmap.h | 1 + >

Re: [Qemu-block] segfault in parallel blockjobs (iotest 30)

2017-11-09 Thread Fam Zheng
On Thu, 11/09 17:26, Alberto Garcia wrote: > On Wed 08 Nov 2017 03:45:38 PM CET, Alberto Garcia wrote: > > > I'm thinking that perhaps we should add the pause point directly to > > block_job_defer_to_main_loop(), to prevent any block job from running > > the exit function when it's paused. > > I

Re: [Qemu-block] [Qemu-devel] Intermittent hang of iotest 194 (bdrv_drain_all after non-shared storage migration)

2017-11-09 Thread Fam Zheng
On Thu, 11/09 20:31, Max Reitz wrote: > On 2017-11-09 16:30, Fam Zheng wrote: > > On Thu, 11/09 16:14, Max Reitz wrote: > >> On 2017-11-09 05:21, Fam Zheng wrote: > >>> On Thu, 11/09 01:48, Max Reitz wrote: > Hi, > > More exciting news from the bdrv_drain() front! > > I've

Re: [Qemu-block] [Qemu-devel] [PATCH for-2.11] block: Keep strong reference when draining all BDS

2017-11-09 Thread Fam Zheng
On Thu, 11/09 21:43, Max Reitz wrote: > Draining a BDS may lead to graph modifications, which in turn may result > in it and other BDS being stripped of their current references. If > bdrv_drain_all_begin() and bdrv_drain_all_end() do not keep strong > references themselves, the BDS they are

Re: [Qemu-block] [Qemu-devel] [PATCH 5/5] iotests: Make 136 less flaky

2017-11-09 Thread Eric Blake
On 11/08/2017 07:38 PM, Max Reitz wrote: > 136 executes some AIO requests without a final aio_flush; then it > advances the virtual clock and thus expects the last access time of the > device to be less than the current time when queried (i.e. idle_time_ns > to be greater than 0). However,

Re: [Qemu-block] [PATCH v2 6/7] nbd-client: Stricter enforcing of structured reply spec

2017-11-09 Thread Eric Blake
On 11/09/2017 03:37 AM, Vladimir Sementsov-Ogievskiy wrote: > 09.11.2017 00:57, Eric Blake wrote: >> Ensure that the server is not sending unexpected chunk lengths >> for either the NONE or the OFFSET_DATA chunk, nor unexpected >> hole length for OFFSET_HOLE.  This will flag any server that >>