Re: [Qemu-block] [Qemu-devel] [RFC] Require Python 3 for building QEMU

2018-10-16 Thread Peter Maydell
On 15 October 2018 at 19:01, Eduardo Habkost wrote: > On Mon, Oct 15, 2018 at 05:55:27PM +0100, Peter Maydell wrote: >> I also suspect "a few months" is an underestimate. My guess >> would be we're going to want to keep Python 2 support for >> at least the next year, maybe two. > > Python 2.7 will

[Qemu-block] [PATCH] crypto: initialize sector size even when opening with no IO flag

2018-10-16 Thread Daniel P . Berrangé
The qcow2 block driver expects to see a valid sector size even when it has opened the crypto layer with QCRYPTO_BLOCK_OPEN_NO_IO. Signed-off-by: Daniel P. Berrangé --- crypto/block-qcow.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crypto/block-qcow.c b/crypto/block-qcow.c index 4284e0

Re: [Qemu-block] [PATCH] qcow2: Get the request alignment for encrypted images from QCryptoBlock

2018-10-16 Thread Daniel P . Berrangé
On Mon, Oct 15, 2018 at 06:38:14PM +0200, Max Reitz wrote: > On 11.10.18 12:58, Alberto Garcia wrote: > > This doesn't have any practical effect at the moment because the > > values of BDRV_SECTOR_SIZE, QCRYPTO_BLOCK_LUKS_SECTOR_SIZE and > > QCRYPTO_BLOCK_QCOW_SECTOR_SIZE are all the same (512 byte

Re: [Qemu-block] [PATCH] crypto: initialize sector size even when opening with no IO flag

2018-10-16 Thread Alberto Garcia
On Tue 16 Oct 2018 12:31:05 PM CEST, Daniel P. Berrangé wrote: > The qcow2 block driver expects to see a valid sector size even when it > has opened the crypto layer with QCRYPTO_BLOCK_OPEN_NO_IO. > > Signed-off-by: Daniel P. Berrangé I was actually preparing a patch along these lines :-) Review

Re: [Qemu-block] [PATCH] crypto: initialize sector size even when opening with no IO flag

2018-10-16 Thread Kevin Wolf
Am 16.10.2018 um 12:31 hat Daniel P. Berrangé geschrieben: > The qcow2 block driver expects to see a valid sector size even when it > has opened the crypto layer with QCRYPTO_BLOCK_OPEN_NO_IO. > > Signed-off-by: Daniel P. Berrangé Thanks, applied to the block branch (and staged before the other

Re: [Qemu-block] [PATCH 1/5] option: Make option help nicer to read

2018-10-16 Thread Kevin Wolf
Am 15.10.2018 um 19:28 hat Max Reitz geschrieben: > This adds some whitespace into the option help (including indentation) > and replaces '=' by ': ' (not least because '=' should be used for > values, not types). Furthermore, the list name is no longer printed as > part of every line, but only on

Re: [Qemu-block] [RFC PATCH] block: Clean up bdrv_img_create()'s error reporting

2018-10-16 Thread Kevin Wolf
Am 16.10.2018 um 08:41 hat Markus Armbruster geschrieben: > bdrv_img_create() takes an Error ** argument and used it in the > conventional way, except for one place: when qemu_opts_do_parse() > fails, it first reports its error to stderr or the HMP monitor with > error_report_err(), then error_setg

Re: [Qemu-block] [RFC PATCH] iotests: make 083 specific to raw

2018-10-16 Thread Kevin Wolf
Am 15.10.2018 um 22:03 hat Cleber Rosa geschrieben: > While testing the Python 3 changes which touch the 083 test, I noticed > that it would fail with qcow2. Expanding the testing, I noticed it > had nothing to do with the Python 3 changes, and in fact, it would not > pass on anything but raw: >

[Qemu-block] [PATCH v2] Introduce attributes to qemu timer subsystem

2018-10-16 Thread Artem Pisarenko
Attributes are simple flags, associated with individual timers for their whole lifetime. They intended to be used to mark individual timers for special handling by various qemu features operating at qemu core level. New/init functions family in timer interface updated and their comments improved

[Qemu-block] [PATCH] migration/block-dirty-bitmap: fix Coverity CID1390625

2018-10-16 Thread Vladimir Sementsov-Ogievskiy
Theoretically possible that we finish the skipping loop with bs = NULL and the following code will crash trying to dereference it. Fix that. Signed-off-by: Vladimir Sementsov-Ogievskiy --- migration/block-dirty-bitmap.c | 4 1 file changed, 4 insertions(+) diff --git a/migration/block-dirt

Re: [Qemu-block] [PATCH v2] Introduce attributes to qemu timer subsystem

2018-10-16 Thread Paolo Bonzini
On 16/10/2018 15:03, Artem Pisarenko wrote: > +if (!timer_list) { > +timer_list = main_loop_tlg.tl[type]; > +} > +timer_init_full(ts, timer_list, scale, attributes, cb, opaque); Please move this "if" to timer_init_full, so that here you can just pass timer_list. timer_init_ful

Re: [Qemu-block] [PATCH v2 3/8] block: Require auto-read-only for existing fallbacks

2018-10-16 Thread Kevin Wolf
Am 12.10.2018 um 19:02 hat Eric Blake geschrieben: > On 10/12/18 6:55 AM, Kevin Wolf wrote: > > Some block drivers have traditionally changed their node to read-only > > mode without asking the user. This behaviour has been marked deprecated > > since 2.11, expecting users to provide an explicit re

Re: [Qemu-block] [Qemu-devel] [RFC PATCH] block: Clean up bdrv_img_create()'s error reporting

2018-10-16 Thread Markus Armbruster
Kevin Wolf writes: > Am 16.10.2018 um 08:41 hat Markus Armbruster geschrieben: >> bdrv_img_create() takes an Error ** argument and used it in the >> conventional way, except for one place: when qemu_opts_do_parse() >> fails, it first reports its error to stderr or the HMP monitor with >> error_re

[Qemu-block] [PATCH] block/vhdx: Don't take address of fields in packed structs

2018-10-16 Thread Peter Maydell
Taking the address of a field in a packed struct is a bad idea, because it might not be actually aligned enough for that pointer type (and thus cause a crash on dereference on some host architectures). Newer versions of clang warn about this. Avoid the bug by not using the "modify in place" byte sw

[Qemu-block] [PATCH] block/vdi: Don't take address of fields in packed structs

2018-10-16 Thread Peter Maydell
Taking the address of a field in a packed struct is a bad idea, because it might not be actually aligned enough for that pointer type (and thus cause a crash on dereference on some host architectures). Newer versions of clang warn about this. Avoid the bug by not using the "modify in place" byte sw

Re: [Qemu-block] [Qemu-devel] [PATCH 1/9] iotests: Make nbd-fault-injector flush

2018-10-16 Thread Eric Blake
On 10/15/18 9:14 AM, Max Reitz wrote: When closing a connection, make the nbd-fault-injector flush the socket. Without this, the output is a bit unreliable with Python 3. Signed-off-by: Max Reitz --- tests/qemu-iotests/083.out | 9 + tests/qemu-iotests/nbd-fault-injecto

Re: [Qemu-block] [PATCH v2 2/8] block: Add auto-read-only option

2018-10-16 Thread Eric Blake
On 10/15/18 4:37 AM, Kevin Wolf wrote: Am 12.10.2018 um 18:47 hat Eric Blake geschrieben: On 10/12/18 6:55 AM, Kevin Wolf wrote: If a management application builds the block graph node by node, the protocol layer doesn't inherit its read-only option from the format layer any more, so it must be

Re: [Qemu-block] [PATCH v2 3/8] block: Require auto-read-only for existing fallbacks

2018-10-16 Thread Eric Blake
On 10/16/18 9:12 AM, Kevin Wolf wrote: Am 12.10.2018 um 19:02 hat Eric Blake geschrieben: On 10/12/18 6:55 AM, Kevin Wolf wrote: Some block drivers have traditionally changed their node to read-only mode without asking the user. This behaviour has been marked deprecated since 2.11, expecting us

Re: [Qemu-block] [Qemu-devel] [PATCH 1/5] option: Make option help nicer to read

2018-10-16 Thread Markus Armbruster
Max Reitz writes: > This adds some whitespace into the option help (including indentation) > and replaces '=' by ': ' (not least because '=' should be used for > values, not types). Furthermore, the list name is no longer printed as > part of every line, but only once in advance, and only if the