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

2018-10-12 Thread Kevin Wolf
See patch 2 for an explanation of the motivation. v2: - Turn bdrv_set_read_only() into bdrv_apply_auto_read_only() - Support the option in a lot more block drivers Kevin Wolf (8): block: Update flags in bdrv_set_read_only() block: Add auto-read-only option block: Require auto-read-only for

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

2018-10-12 Thread Kevin Wolf
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 set explicitly. Backing files should work on read-only storage, but at the same time, a block job like commit should be able to reo

[Qemu-block] [PATCH v2 4/8] nbd: Support auto-read-only option

2018-10-12 Thread Kevin Wolf
If read-only=off, but auto-read-only=on is given, open a read-write NBD connection if the server provides a read-write export, but instead of erroring out for read-only exports, just degrade to read-only. Signed-off-by: Kevin Wolf --- block/nbd-client.c | 10 +- 1 file changed, 5 inserti

[Qemu-block] [PATCH v2 8/8] iscsi: Support auto-read-only option

2018-10-12 Thread Kevin Wolf
If read-only=off, but auto-read-only=on is given, open the volume read-write if we have the permissions, but instead of erroring out for read-only volumes, just degrade to read-only. Signed-off-by: Kevin Wolf --- block/iscsi.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff -

[Qemu-block] [PATCH v2 1/8] block: Update flags in bdrv_set_read_only()

2018-10-12 Thread Kevin Wolf
To fully change the read-only state of a node, we must not only change bs->read_only, but also update bs->open_flags. Signed-off-by: Kevin Wolf --- block.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/block.c b/block.c index 0d6e5f1a76..d7bd6d29b4 100644 --- a/block.c +++ b/block.c

[Qemu-block] [PATCH v2 5/8] file-posix: Support auto-read-only option

2018-10-12 Thread Kevin Wolf
If read-only=off, but auto-read-only=on is given, open the file read-write if we have the permissions, but instead of erroring out for read-only files, just degrade to read-only. Signed-off-by: Kevin Wolf --- block/file-posix.c | 13 + 1 file changed, 13 insertions(+) diff --git a/b

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

2018-10-12 Thread Kevin Wolf
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 read-only=on option. Now that we have auto-read-only=on, enable these drivers to make use of the option.

[Qemu-block] [PATCH v2 6/8] curl: Support auto-read-only option

2018-10-12 Thread Kevin Wolf
If read-only=off, but auto-read-only=on is given, just degrade to read-only. Signed-off-by: Kevin Wolf --- block/curl.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/block/curl.c b/block/curl.c index fabb2b4da7..db5d2bd8ef 100644 --- a/block/curl.c +++ b/block/curl.

[Qemu-block] [PATCH v2 7/8] gluster: Support auto-read-only option

2018-10-12 Thread Kevin Wolf
If read-only=off, but auto-read-only=on is given, open the file read-write if we have the permissions, but instead of erroring out for read-only files, just degrade to read-only. Signed-off-by: Kevin Wolf --- block/gluster.c | 9 + 1 file changed, 9 insertions(+) diff --git a/block/glus

[Qemu-block] [PATCH v2 0/2] improve block-latency-histogram-set

2018-10-12 Thread Vladimir Sementsov-Ogievskiy
Support QOM path for block-latency-histogram-set and drop x- prefix. Libvirt discussion (not yet updated for using id instead of device): https://www.redhat.com/archives/libvir-list/2018-September/msg00011.html v2: id,device -> id (with fall back to device name) fix versions and all remaining

[Qemu-block] [PATCH v2 2/2] qapi: drop x- from x-block-latency-histogram-set

2018-10-12 Thread Vladimir Sementsov-Ogievskiy
Drop x- and x_ prefixes for latency histograms and update version to 3.1 Signed-off-by: Vladimir Sementsov-Ogievskiy --- qapi/block-core.json | 20 ++-- block/qapi.c | 12 ++-- blockdev.c | 2 +- 3 files changed, 17 insertions(+), 17 deletions(-) diff

[Qemu-block] [PATCH v2 1/2] qapi: move to QOM path for x-block-latency-histogram-set

2018-10-12 Thread Vladimir Sementsov-Ogievskiy
Move to way of device selecting, however fall back to device name if path is not found. Signed-off-by: Vladimir Sementsov-Ogievskiy --- qapi/block-core.json | 4 ++-- blockdev.c | 16 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/qapi/block-core.json

Re: [Qemu-block] [PATCH v2 4/8] nbd: Support auto-read-only option

2018-10-12 Thread Eric Blake
On 10/12/18 6:55 AM, Kevin Wolf wrote: If read-only=off, but auto-read-only=on is given, open a read-write NBD connection if the server provides a read-write export, but instead of erroring out for read-only exports, just degrade to read-only. Signed-off-by: Kevin Wolf --- block/nbd-client.c

Re: [Qemu-block] [PATCH v2 1/8] block: Update flags in bdrv_set_read_only()

2018-10-12 Thread Eric Blake
On 10/12/18 6:55 AM, Kevin Wolf wrote: To fully change the read-only state of a node, we must not only change bs->read_only, but also update bs->open_flags. Signed-off-by: Kevin Wolf --- block.c | 7 +++ 1 file changed, 7 insertions(+) Reviewed-by: Eric Blake diff --git a/block.c b

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

2018-10-12 Thread Eric Blake
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 set explicitly. The documentation for this option is consciously phrased in a way that

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

2018-10-12 Thread Eric Blake
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 read-only=on option. Now that we have auto-read-only=on, enable

Re: [Qemu-block] [PATCH v2 5/8] file-posix: Support auto-read-only option

2018-10-12 Thread Eric Blake
On 10/12/18 6:55 AM, Kevin Wolf wrote: If read-only=off, but auto-read-only=on is given, open the file read-write if we have the permissions, but instead of erroring out for read-only files, just degrade to read-only. Signed-off-by: Kevin Wolf --- block/file-posix.c | 13 + 1 fil

Re: [Qemu-block] [PATCH v2 6/8] curl: Support auto-read-only option

2018-10-12 Thread Eric Blake
On 10/12/18 6:55 AM, Kevin Wolf wrote: If read-only=off, but auto-read-only=on is given, just degrade to read-only. Signed-off-by: Kevin Wolf --- block/curl.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) Reviewed-by: Eric Blake -- Eric Blake, Principal Software Engineer

Re: [Qemu-block] [PATCH v2 7/8] gluster: Support auto-read-only option

2018-10-12 Thread Eric Blake
On 10/12/18 6:55 AM, Kevin Wolf wrote: If read-only=off, but auto-read-only=on is given, open the file read-write if we have the permissions, but instead of erroring out for read-only files, just degrade to read-only. Signed-off-by: Kevin Wolf --- block/gluster.c | 9 + 1 file change

Re: [Qemu-block] [PATCH v2 8/8] iscsi: Support auto-read-only option

2018-10-12 Thread Eric Blake
On 10/12/18 6:55 AM, Kevin Wolf wrote: If read-only=off, but auto-read-only=on is given, open the volume read-write if we have the permissions, but instead of erroring out for read-only volumes, just degrade to read-only. Signed-off-by: Kevin Wolf --- block/iscsi.c | 8 +--- 1 file chang

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

2018-10-12 Thread Eduardo Habkost
Signed-off-by: Eduardo Habkost --- I'd like to do this in QEMU 3.1. I think it's time to drop support for old systems that have only Python 2. We still have a few scripts that are not required for building QEMU that still work only with Python 2 (iotests being the most relevant set). Requiring