Re: [Qemu-block] [PATCH] block/snapshot: dirty all dirty bitmaps on snapshot-switch

2017-10-27 Thread Eric Blake
On 10/23/2017 11:29 AM, Vladimir Sementsov-Ogievskiy wrote: > Snapshot-switch actually changes active state of disk so it should > reflect on dirty bitmaps. Otherwise next incremental backup using > these bitmaps will be invalid. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > block/snap

Re: [Qemu-block] [Qemu-devel] [PATCH v6 00/12] nbd minimal structured read

2017-10-27 Thread Eric Blake
On 10/27/2017 12:59 PM, no-re...@patchew.org wrote: > Hi, > > This series failed build test on ppc host. Please find the details below. > > /var/tmp/patchew-tester-tmp-xb4sc6ly/src/nbd/server.c: In function > ‘nbd_co_client_start’: > /var/tmp/patchew-tester-tmp-xb4sc6ly/src/nbd/server.c:819:12:

Re: [Qemu-block] [PATCH 3/4] block/parallels: Don't update header until the first actual write

2017-10-27 Thread Denis V. Lunev
On 10/27/2017 10:57 AM, Jeff Cody wrote: > The on disk image format 'inuse' header field is updated blindly if the > image is opened RDWR. This can cause problems if the QEMU runstate is > set to INMIGRATE, at which point the underlying file is set to INACTIVE. > This causes an assert in bdrv_co_p

Re: [Qemu-block] [Qemu-devel] [PATCH v6 00/12] nbd minimal structured read

2017-10-27 Thread no-reply
Hi, This series failed build test on ppc host. Please find the details below. Subject: [Qemu-devel] [PATCH v6 00/12] nbd minimal structured read Message-id: 20171027104037.8319-1-ebl...@redhat.com Type: series === TEST SCRIPT BEGIN === #!/bin/bash # Testing script will be invoked under the git c

[Qemu-block] [PATCH v6 12/12] nbd: Minimal structured read for client

2017-10-27 Thread Eric Blake
From: Vladimir Sementsov-Ogievskiy Minimal implementation: for structured error only error_report error message. Note that test 83 is now more verbose, because the implementation prints more warnings about unexpected communication errors; perhaps future patches should tone things down by using t

[Qemu-block] [PATCH v6 08/12] nbd/server: Include human-readable message in structured errors

2017-10-27 Thread Eric Blake
The NBD spec permits including a human-readable error string if structured replies are in force, so we might as well send the client the message that we logged on any error. Signed-off-by: Eric Blake Reviewed-by: Vladimir Sementsov-Ogievskiy --- v6: add R-b v5: allow NULL msg, cast away const f

[Qemu-block] [RFC PATCH v6 13/12] tweak test 83 verbosity

2017-10-27 Thread Eric Blake
Commenting these two lines is enough to avoid the change to 083.out in 12/12. That is evidence that we may want these two lines to be trace points rather than error messages; or maybe we really do like the extra verbosity in the case of an unexpected communication break. This patch does not meet

[Qemu-block] [PATCH v6 09/12] nbd/client: refactor nbd_receive_starttls

2017-10-27 Thread Eric Blake
From: Vladimir Sementsov-Ogievskiy Split out nbd_request_simple_option to be reused for structured reply option. Signed-off-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Eric Blake --- v6: error message tweak [Vladimir] v5: only check length for ACK responses v4: reduce redundant traces, ty

[Qemu-block] [PATCH v6 11/12] nbd: Move nbd_read() to common header

2017-10-27 Thread Eric Blake
An upcoming change to block/nbd-client.c will want to read the tail of a structured reply chunk directly from the wire. Move this function to make it easier. Based on a patch from Vladimir Sementsov-Ogievskiy. Signed-off-by: Eric Blake Reviewed-by: Vladimir Sementsov-Ogievskiy --- include/blo

[Qemu-block] [PATCH v6 07/12] nbd: Minimal structured read for server

2017-10-27 Thread Eric Blake
From: Vladimir Sementsov-Ogievskiy Minimal implementation of structured read: one structured reply chunk, no segmentation. Minimal structured error implementation: no text message. Support DF flag, but just ignore it, as there is no segmentation any way. Signed-off-by: Vladimir Sementsov-Ogievsk

[Qemu-block] [PATCH v6 10/12] nbd/client: prepare nbd_receive_reply for structured reply

2017-10-27 Thread Eric Blake
From: Vladimir Sementsov-Ogievskiy In following patch nbd_receive_reply will be used both for simple and structured reply header receiving. NBDReply is altered into union of simple reply header and structured reply chunk header, simple error translation moved to block/nbd-client to be consistent

[Qemu-block] [PATCH v6 00/12] nbd minimal structured read

2017-10-27 Thread Eric Blake
I've incorporated a few more tweaks since v5, addressing the various bugs I pointed out there: https://lists.gnu.org/archive/html/qemu-devel/2017-10/msg04817.html - make sure iotests pass - split a large patch - consistently use absolute offsets - clean up awkward logic in handling option requests

[Qemu-block] [PATCH v6 04/12] nbd/server: Report error for write to read-only export

2017-10-27 Thread Eric Blake
When the server is read-only, we were already reporting an error message for NBD_CMD_WRITE_ZEROES, but failed to set errp for a similar NBD_CMD_WRITE. This will matter more once structured replies allow the server to propagate the errp information back to the client. While at it, use an error mes

[Qemu-block] [PATCH v6 05/12] nbd/server: Simplify nbd_negotiate_options loop

2017-10-27 Thread Eric Blake
Instead of making each caller check whether a transmission error occurred, we can sink a common error check to the end of the loop. Signed-off-by: Eric Blake --- v6: split from length validation [Vladimir] --- nbd/server.c | 18 +++--- 1 file changed, 3 insertions(+), 15 deletions(-

[Qemu-block] [PATCH v6 01/12] nbd: Include error names in trace messages

2017-10-27 Thread Eric Blake
NBD errors were originally sent over the wire based on Linux errno values; but not all the world is Linux, and not all platforms share the same values. Since a number isn't very easy to decipher on all platforms, update the trace messages to include the name of NBD errors being sent/received over

[Qemu-block] [PATCH v6 02/12] nbd: Move nbd_errno_to_system_errno() to public header

2017-10-27 Thread Eric Blake
This is needed in preparation for structured reply handling, as we will be performing the translation from NBD error to system errno value higher in the stack at block/nbd-client.c. Signed-off-by: Eric Blake Reviewed-by: Vladimir Sementsov-Ogievskiy --- include/block/nbd.h | 13 + n

[Qemu-block] [PATCH v6 03/12] nbd: Expose constants and structs for structured read

2017-10-27 Thread Eric Blake
Upcoming patches will implement the NBD structured reply extension [1] for both client and server roles. Declare the constants, structs, and lookup routines that will be valuable whether the server or client code is backported in isolation. This includes moving one constant from an internal heade

[Qemu-block] [PATCH v6 06/12] nbd/server: Refactor zero-length option check

2017-10-27 Thread Eric Blake
Consolidate the response for a non-zero-length option payload into a new function, nbd_reject_length(). This check will also be used when introducing support for structured replies. Note that STARTTLS response differs based on time: if the connection is still unencrypted, we set fatal to true (a

Re: [Qemu-block] [PATCH 3/4] block/parallels: Don't update header until the first actual write

2017-10-27 Thread Jeff Cody
On Fri, Oct 27, 2017 at 11:09:19AM +0200, Kevin Wolf wrote: > Am 27.10.2017 um 10:57 hat Jeff Cody geschrieben: > > The on disk image format 'inuse' header field is updated blindly if the > > image is opened RDWR. This can cause problems if the QEMU runstate is > > set to INMIGRATE, at which point

Re: [Qemu-block] [Qemu-devel] [PULL 00/35] Block layer patches

2017-10-27 Thread Peter Maydell
On 26 October 2017 at 14:17, Kevin Wolf wrote: > The following changes since commit ae49fbbcd8e4e9d8bf7131add34773f579e1aff7: > > Merge remote-tracking branch 'remotes/rth/tags/pull-tcg-20171025' into > staging (2017-10-25 16:38:57 +0100) > > are available in the git repository at: > > git://

Re: [Qemu-block] [PATCH 3/4] block/parallels: Don't update header until the first actual write

2017-10-27 Thread Kevin Wolf
Am 27.10.2017 um 10:57 hat Jeff Cody geschrieben: > The on disk image format 'inuse' header field is updated blindly if the > image is opened RDWR. This can cause problems if the QEMU runstate is > set to INMIGRATE, at which point the underlying file is set to INACTIVE. > This causes an assert in

[Qemu-block] [PATCH 2/4] block/parallels: code movement

2017-10-27 Thread Jeff Cody
Code movement, to make subsequent patches simpler. Signed-off-by: Jeff Cody --- block/parallels.c | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/block/parallels.c b/block/parallels.c index 2b6c6e5709..fed199eccd 100644 --- a/block/parallels.c +++ b

[Qemu-block] [PATCH 1/4] block/vhdx.c: Don't blindly update the header

2017-10-27 Thread Jeff Cody
The VHDX specification requires that before user data modification of the vhdx image, the VHDX header file and data GUIDs need to be updated. In vhdx_open(), if the image is set to RDWR, we go ahead and update the header. However, just because the image is set to RDWR does not mean we can go ahead

[Qemu-block] [PATCH 3/4] block/parallels: Don't update header until the first actual write

2017-10-27 Thread Jeff Cody
The on disk image format 'inuse' header field is updated blindly if the image is opened RDWR. This can cause problems if the QEMU runstate is set to INMIGRATE, at which point the underlying file is set to INACTIVE. This causes an assert in bdrv_co_pwritev(). Do something similar to what is done i

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

2017-10-27 Thread Jeff Cody
VHDX and Parallels both blindly write headers to the image file if the images are opened R/W. This causes an assert if the QEMU run state is INMIGRATE. Rather than blindly write on open, latch the first write to the image, and update the header then. Jeff Cody (4): block/vhdx.c: Don't blindly

[Qemu-block] [PATCH 4/4] qemu-iotests: update unsupported image formats in 194

2017-10-27 Thread Jeff Cody
Test 194 checks for 'luks' to exclude as an unsupported format, However, most formats are unsupported, due to migration blockers. Rather than specifying a blacklist of unsupported formats, whitelist supported formats (specifically, qcow2, qed, raw, dmg). Signed-off-by: Jeff Cody --- tests/qemu-

Re: [Qemu-block] [PATCH] replication: Fix replication open fail

2017-10-27 Thread Kevin Wolf
Am 25.10.2017 um 08:51 hat Wang Guang geschrieben: > replication_child_perm request write > permissions for all child which will lead bdrv_check_perm fail. > replication_child_perm() should request write > permissions only if it is writable itself. > > Signed-off-by: Wang Guang > Signed-off-by: W