Re: [Qemu-block] [PATCH v2 2/5] chardev: Indent list of chardevs

2018-11-05 Thread Marc-André Lureau
On Fri, Oct 19, 2018 at 8:49 PM Max Reitz wrote: > > Following the example of qemu_opts_print_help(), indent all entries in > the list of character devices. > > Signed-off-by: Max Reitz Reviewed-by: Marc-André Lureau > --- > chardev/char.c | 2 +- > 1 file changed, 1 insertion(+), 1

Re: [Qemu-block] [PATCH v2 5/5] fw_cfg: Drop newline in @file description

2018-11-05 Thread Marc-André Lureau
On Fri, Oct 19, 2018 at 8:50 PM Max Reitz wrote: > > There is no good reason why there should be a newline in this > description, so remove it. > > Signed-off-by: Max Reitz > Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Marc-André Lureau > --- > vl.c | 2 +- > 1 file changed, 1

Re: [Qemu-block] [PATCH v2 3/5] qdev-monitor: Make device options help nicer

2018-11-05 Thread Marc-André Lureau
On Fri, Oct 19, 2018 at 8:49 PM Max Reitz wrote: > > Just like in qemu_opts_print_help(), print the device name as a caption > instead of on every single line, indent all options, add angle brackets > around types, and align the descriptions after 24 characters. Also, > separate the descriptions

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

2018-11-05 Thread Marc-André Lureau
On Fri, Oct 19, 2018 at 8:49 PM Max Reitz wrote: > > This adds some whitespace into the option help (including indentation) > and puts angle brackets around the type names. Furthermore, the list > name is no longer printed as part of every line, but only once in > advance, and only if the caller

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

2018-11-05 Thread Marc-André Lureau
On Fri, Oct 19, 2018 at 8:49 PM Max Reitz wrote: > > Just like in qemu_opts_print_help(), print the object name as a caption > instead of on every single line, indent all options, add angle brackets > around types, and align the descriptions after 24 characters. > > Also, indent every object name

Re: [Qemu-block] [Qemu-devel] [PATCH] tests: Disable test-bdrv-drain

2018-11-05 Thread Peter Maydell
On 4 November 2018 at 22:03, Paolo Bonzini wrote: > On 02/11/2018 14:33, Peter Maydell wrote: >> On 9 October 2018 at 12:16, Paolo Bonzini wrote: >>> Yup, we have to stop using pthread_key_create. Luckily, these days >>> there is always qemu_thread_start that wraps the thread, so we can call

Re: [Qemu-block] [Qemu-devel] [PATCH] vdi: Use a literal number of bytes for DEFAULT_CLUSTER_SIZE

2018-11-05 Thread no-reply
Hi, This series failed docker-mingw@fedora build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. Type: series Message-id: 20181103014831.29889-1-lbl...@janustech.com Subject: [Qemu-devel] [PATCH] vdi: Use a

Re: [Qemu-block] [PATCH v2 0/5] Various option help readability improvement suggestions

2018-11-05 Thread Kevin Wolf
Am 19.10.2018 um 18:49 hat Max Reitz geschrieben: > I noticed that with the (more or less) recent series from Marc-André the > output of qemu-img amend -f qcow2 -o help changed to this: > > $ ./qemu-img amend -f qcow2 -o help > Creation options for 'qcow2': > qcow2-create-opts.backing_file=str -

Re: [Qemu-block] [PATCH v3 5/6] vnc: allow specifying a custom authorization object name

2018-11-05 Thread Juan Quintela
Daniel P. Berrangé wrote: > From: "Daniel P. Berrange" > > The VNC server has historically had support for ACLs to check both the > SASL username and the TLS x509 distinguished name. The VNC server was > responsible for creating the initial ACL, and the client app was then > responsible for

Re: [Qemu-block] [PATCH v3 6/6] monitor: deprecate acl_show, acl_reset, acl_policy, acl_add, acl_remove

2018-11-05 Thread Juan Quintela
Daniel P. Berrangé wrote: > The various ACL related commands are obsolete now that the QAuthZ > framework for authorization is fully integrated throughout QEMU network > services. Mark it as deprecated with no replacement to be provided. > > Authorization is now provided by using 'object_add'

Re: [Qemu-block] [PATCH v2 0/1] vdi: Use a literal number of bytes for

2018-11-05 Thread Kevin Wolf
Am 04.11.2018 um 19:09 hat Leonid Bloch geschrieben: > Please see the commit message for the rationale. > > Difference from v1: > * Format string is fixed. Thanks, applied to the block branch. Kevin

Re: [Qemu-block] [PATCH v2 0/1] include: Add a comment to explain the origin of

2018-11-05 Thread Kevin Wolf
Am 04.11.2018 um 19:07 hat Leonid Bloch geschrieben: > Please see the commit message for the rationale. > > Difference from v1: > * Tabs removed from the code indentation of the sample code in the > comment, in order to pass checkpatch. Thanks, applied to the block branch. Kevin

Re: [Qemu-block] [PATCH 0/3] block/qcow*: Don't take address of fields in packed structs

2018-11-05 Thread Peter Maydell
On 10 October 2018 at 11:55, Kevin Wolf wrote: > Am 09.10.2018 um 19:24 hat Peter Maydell geschrieben: >> 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

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

2018-11-05 Thread Peter Maydell
On 17 October 2018 at 15:36, Kevin Wolf wrote: > Am 16.10.2018 um 19:09 hat Peter Maydell geschrieben: >> 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

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

2018-11-05 Thread Peter Maydell
On 17 October 2018 at 15:55, Kevin Wolf wrote: > Am 16.10.2018 um 19:25 hat Peter Maydell geschrieben: >> 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

Re: [Qemu-block] [PATCH 1/2] nvme: don't unref ctrl_mem when device unrealized

2018-11-05 Thread Li Qiang
Ping... I think this is a serious issue, can go 3.1 Thanks, Li Qiang Li Qiang 于2018年10月29日周一 下午2:29写道: > Currently, when hotplug/unhotplug nvme device, it will cause an > assert in object.c. Following is the backtrack: > > ERROR:qom/object.c:981:object_unref: assertion failed: (obj->ref > 0)

[Qemu-block] [PATCH v3 2/4] configure: adding support to lzfse library.

2018-11-05 Thread Julio Faracco
This commit includes the support to lzfse opensource library. With this library dmg block driver can decompress images with this type of compression inside. Signed-off-by: Julio Faracco --- block/Makefile.objs | 2 ++ configure | 31 +++ 2 files changed,

[Qemu-block] [PATCH v3 0/4] Adding LZFSE compression support for DMG block driver.

2018-11-05 Thread Julio Faracco
Since Mac OS X El Capitain (v10.11), Apple uses LZFSE compression to generate compressed DMGs as an alternative to BZIP2. Possible, Apple want to keep this algorithm as default in long term. Some years ago, Apple opened the LZFSE algorithm to opensource and the main source (or the most active

[Qemu-block] [PATCH v3 4/4] dmg: exchanging hardcoded dmg UDIF block types to enum.

2018-11-05 Thread Julio Faracco
This change is better to understand what kind of block type is being handled by the code. Using a syntax similar to the DMG documentation is easier than tracking all hex values assigned to a block type. Signed-off-by: Julio Faracco --- block/dmg.c | 43

[Qemu-block] [PATCH v3 3/4] dmg: including dmg-lzfse module inside dmg block driver.

2018-11-05 Thread Julio Faracco
This commit includes the support to new module dmg-lzfse into dmg block driver. It includes the support for block type ULFO (0x8007). Signed-off-by: Julio Faracco --- block/dmg.c | 28 block/dmg.h | 3 +++ 2 files changed, 31 insertions(+) diff --git

[Qemu-block] [PATCH v3 1/4] block: adding lzfse decompressing support as a module.

2018-11-05 Thread Julio Faracco
QEMU dmg support includes zlib and bzip2, but it does not contains lzfse support. This commit adds the source file to extend compression support for new DMGs. Signed-off-by: Julio Faracco --- block/dmg-lzfse.c | 49 +++ 1 file changed, 49

Re: [Qemu-block] [Qemu-devel] [PATCH] block: Make more block drivers compile-time configurable

2018-11-05 Thread Markus Armbruster
Max Reitz writes: > On 19.10.18 13:34, Markus Armbruster wrote: >> From: Jeff Cody >> >> This adds configure options to control the following block drivers: >> >> * Bochs >> * Cloop >> * Dmg >> * Qcow (V1) >> * Vdi >> * Vvfat >> * qed >> * parallels >> * sheepdog >> >> Each of these defaults

Re: [Qemu-block] [PATCH 1/7] qcow2: use Z_OK instead of 0 for deflateInit2 return code check

2018-11-05 Thread Alberto Garcia
On Thu 01 Nov 2018 07:27:32 PM CET, Vladimir Sementsov-Ogievskiy wrote: > Use appropriate macro, corresponding to deflateInit2 spec. > > Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Alberto Garcia Berto

Re: [Qemu-block] [PATCH v2 1/1] include: Add a comment to explain the origin of sizes' lookup table

2018-11-05 Thread Philippe Mathieu-Daudé
Hi Leonid, On 4/11/18 19:07, Leonid Bloch wrote: The lookup table for power-of-two sizes was added in commit 540b8492618eb for the purpose of having convenient shortcuts for these sizes in cases when the literal number has to be present at compile time, and expressions as '(1 * KiB)' can not be

[Qemu-block] [PULL 15/36] quorum: Return an error if the blkverify mode has invalid settings

2018-11-05 Thread Kevin Wolf
From: Alberto Garcia The blkverify mode of Quorum can only be enabled if the number of children is exactly two and the value of vote-threshold is also two. If the user tries to enable it but the other settings are incorrect then QEMU simply prints an error message to stderr and carries on

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

2018-11-05 Thread Kevin Wolf
From: 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

[Qemu-block] [PULL 22/36] block: Require auto-read-only for existing fallbacks

2018-11-05 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.

Re: [Qemu-block] [Qemu-devel] How to emulate block I/O timeout on qemu side?

2018-11-05 Thread John Snow
On 11/03/2018 01:24 PM, Dongli Zhang wrote: > Hi all, > Hi, please reply below the quoted text when writing to qemu-devel in the future; my reply is below. > I tried with the patch at: > > https://lists.gnu.org/archive/html/qemu-devel/2018-09/msg00394.html > > The patch is applied to

Re: [Qemu-block] [PATCH 3/7] qcow2: move decompression from qcow2-cluster.c to qcow2.c

2018-11-05 Thread Alberto Garcia
On Thu 01 Nov 2018 07:27:34 PM CET, Vladimir Sementsov-Ogievskiy wrote: > Compression is done in threads in qcow2.c. We want to do decompression > in the same way, so, firstly, move it to the same file. > > The only change is braces around if-body in decompress_buffer, to > satisfy checkpatch. >

[Qemu-block] [PULL 26/36] gluster: Support auto-read-only option

2018-11-05 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 Reviewed-by: Niels de Vos --- block/gluster.c | 12 ++-- 1 file changed, 10

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

2018-11-05 Thread Kevin Wolf
From: 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

[Qemu-block] [PULL 27/36] iscsi: Support auto-read-only option

2018-11-05 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 Reviewed-by: Eric Blake --- block/iscsi.c | 8 +--- 1 file changed, 5

Re: [Qemu-block] [PATCH 2/7] qcow2: make more generic interface for qcow2_compress

2018-11-05 Thread Alberto Garcia
On Thu 01 Nov 2018 07:27:33 PM CET, Vladimir Sementsov-Ogievskiy wrote: > Give explicit size both for source and destination buffers, to make it > similar with decompression path and than cleanly reuse parameter > structure for decompression threads. > > Signed-off-by: Vladimir

[Qemu-block] [PULL 35/36] vdi: Use a literal number of bytes for DEFAULT_CLUSTER_SIZE

2018-11-05 Thread Kevin Wolf
From: Leonid Bloch If an expression is used to define DEFAULT_CLUSTER_SIZE, when compiled, it will be embedded as a literal expression in the binary (as the default value) because it is stringified to mark the size of the default value. Now this is fixed by using a defined number to define this

[Qemu-block] [PULL 28/36] block: Make auto-read-only=on default for -drive

2018-11-05 Thread Kevin Wolf
While we want machine interfaces like -blockdev and QMP blockdev-add to add as little auto-detection as possible so that management tools are explicit about their needs, -drive is a convenience option for human users. Enabling auto-read-only=on by default there enables users to use read-only

[Qemu-block] [PULL 16/36] iotest: Test the blkverify mode of the Quorum driver

2018-11-05 Thread Kevin Wolf
From: Alberto Garcia Signed-off-by: Alberto Garcia Signed-off-by: Kevin Wolf --- tests/qemu-iotests/081 | 30 ++ tests/qemu-iotests/081.out | 16 2 files changed, 46 insertions(+) diff --git a/tests/qemu-iotests/081 b/tests/qemu-iotests/081

[Qemu-block] [PULL 23/36] nbd: Support auto-read-only option

2018-11-05 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 Reviewed-by: Eric Blake --- block/nbd-client.c | 10 +-

[Qemu-block] [PULL 14/36] quorum: Remove quorum_err()

2018-11-05 Thread Kevin Wolf
From: Alberto Garcia This is a static function with only one caller, so there's no need to keep it. Inlining the code in quorum_compare() makes it much simpler. Signed-off-by: Alberto Garcia Reported-by: Markus Armbruster Signed-off-by: Kevin Wolf --- block/quorum.c | 24

[Qemu-block] [PULL 05/33] virtio-blk: fix comment for virtio_blk_rw_complete

2018-11-05 Thread Michael S. Tsirkin
From: Yaowei Bai Here should be submit_requests, there is no submit_merged_requests function. Signed-off-by: Yaowei Bai Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/block/virtio-blk.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

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

2018-11-05 Thread Peter Maydell
On 5 November 2018 at 16:37, Kevin Wolf wrote: > The following changes since commit b2f7a038bb4c4fc5ce6b8486e8513dfd97665e2a: > > Merge remote-tracking branch 'remotes/rth/tags/pull-softfloat-20181104' > into staging (2018-11-05 10:32:49 +) > > are available in the Git repository at: > >

Re: [Qemu-block] [Qemu-devel] [PATCH] qemu/units: Move out QCow2 specific definitions

2018-11-05 Thread Eric Blake
On 11/2/18 7:29 PM, Leonid Bloch wrote: Agreed. I didn't want it in the first place, arguing that if we want stringification of defaults, it would be better to have a runtime function do that, rather than adding a set of near-duplicate macro names. A runtime function will not help here, as

[Qemu-block] [PULL 03/36] qemu-io-cmds: Fix two format strings

2018-11-05 Thread Kevin Wolf
From: Stefan Weil Use %zu instead of %zd for unsigned numbers. This fixes two error messages from the LSTM static code analyzer: This argument should be of type 'ssize_t' but is of type 'unsigned long' Signed-off-by: Stefan Weil Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Kevin

[Qemu-block] [PULL 00/36] Block layer patches

2018-11-05 Thread Kevin Wolf
The following changes since commit b2f7a038bb4c4fc5ce6b8486e8513dfd97665e2a: Merge remote-tracking branch 'remotes/rth/tags/pull-softfloat-20181104' into staging (2018-11-05 10:32:49 +) are available in the Git repository at: git://repo.or.cz/qemu/kevin.git tags/for-upstream for you

[Qemu-block] [PULL 06/36] block/qcow2-bitmap: Don't take address of fields in packed structs

2018-11-05 Thread Kevin Wolf
From: 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

[Qemu-block] [PULL 01/36] block/vvfat: Fix crash when reporting error about too many files in directory

2018-11-05 Thread Kevin Wolf
From: Thomas Huth When using the vvfat driver with a directory that contains too many files, QEMU currently crashes. This can be triggered like this for example: mkdir /tmp/vvfattest cd /tmp/vvfattest for ((x=0;x<=513;x++)); do mkdir $x; done qemu-system-x86_64 -drive \

[Qemu-block] [PULL 07/36] crypto: initialize sector size even when opening with no IO flag

2018-11-05 Thread Kevin Wolf
From: 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é Reviewed-by: Alberto Garcia Signed-off-by: Kevin Wolf --- crypto/block-qcow.c | 2 ++ 1 file changed,

[Qemu-block] [PULL 09/36] block: change some function return type to bool

2018-11-05 Thread Kevin Wolf
From: Li Qiang Signed-off-by: Li Qiang Reviewed-by: Alberto Garcia Signed-off-by: Kevin Wolf --- include/sysemu/block-backend.h | 6 +++--- block/block-backend.c | 8 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/include/sysemu/block-backend.h

[Qemu-block] [PULL 33/36] object: Make option help nicer to read

2018-11-05 Thread Kevin Wolf
From: Max Reitz Just like in qemu_opts_print_help(), print the object name as a caption instead of on every single line, indent all options, add angle brackets around types, and align the descriptions after 24 characters. Also, indent every object name in the list of available objects.

[Qemu-block] [PULL 25/36] curl: Support auto-read-only option

2018-11-05 Thread Kevin Wolf
If read-only=off, but auto-read-only=on is given, just degrade to read-only. Signed-off-by: Kevin Wolf Reviewed-by: Eric Blake --- 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 ---

[Qemu-block] [PULL 24/36] file-posix: Support auto-read-only option

2018-11-05 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 Reviewed-by: Eric Blake --- block/file-posix.c | 19 --- 1 file changed,

[Qemu-block] [PULL 29/36] qemu-iotests: Test auto-read-only with -drive and -blockdev

2018-11-05 Thread Kevin Wolf
Signed-off-by: Kevin Wolf Reviewed-by: Eric Blake --- tests/qemu-iotests/232 | 147 + tests/qemu-iotests/232.out | 59 +++ tests/qemu-iotests/group | 1 + 3 files changed, 207 insertions(+) create mode 100755 tests/qemu-iotests/232

[Qemu-block] [PULL 20/36] block: Add auto-read-only option

2018-11-05 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

[Qemu-block] [PULL 34/36] fw_cfg: Drop newline in @file description

2018-11-05 Thread Kevin Wolf
From: Max Reitz There is no good reason why there should be a newline in this description, so remove it. Signed-off-by: Max Reitz Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Marc-André Lureau Signed-off-by: Kevin Wolf --- vl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[Qemu-block] [PULL 31/36] chardev: Indent list of chardevs

2018-11-05 Thread Kevin Wolf
From: Max Reitz Following the example of qemu_opts_print_help(), indent all entries in the list of character devices. Signed-off-by: Max Reitz Reviewed-by: Marc-André Lureau Signed-off-by: Kevin Wolf --- chardev/char.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[Qemu-block] [PULL 19/36] block: Update flags in bdrv_set_read_only()

2018-11-05 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 Reviewed-by: Eric Blake Reviewed-by: Alberto Garcia --- block.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/block.c b/block.c index

Re: [Qemu-block] [Qemu-devel] xen_disk qdevification

2018-11-05 Thread Markus Armbruster
Paul Durrant writes: >> -Original Message- >> From: Kevin Wolf [mailto:kw...@redhat.com] >> Sent: 02 November 2018 11:04 >> To: Tim Smith >> Cc: xen-de...@lists.xenproject.org; qemu-de...@nongnu.org; qemu- >> bl...@nongnu.org; Anthony Perard ; Paul Durrant >> ; Stefano Stabellini ; >>

[Qemu-block] [PULL 05/36] block/qcow: Don't take address of fields in packed structs

2018-11-05 Thread Kevin Wolf
From: 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

[Qemu-block] [PULL 04/36] block/qcow2: Don't take address of fields in packed structs

2018-11-05 Thread Kevin Wolf
From: 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

[Qemu-block] [PULL 08/36] qcow2: Get the request alignment for encrypted images from QCryptoBlock

2018-11-05 Thread Kevin Wolf
From: Alberto Garcia 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 bytes), but future encryption methods could have different requirements. Signed-off-by:

[Qemu-block] [PULL 30/36] option: Make option help nicer to read

2018-11-05 Thread Kevin Wolf
From: Max Reitz This adds some whitespace into the option help (including indentation) and puts angle brackets around the type names. Furthermore, the list name is no longer printed as part of every line, but only once in advance, and only if the caller did not print a caption already. This

[Qemu-block] [PULL 17/36] quorum: Forbid adding children in blkverify mode

2018-11-05 Thread Kevin Wolf
From: Alberto Garcia The blkverify mode of Quorum only works when the number of children is exactly two, so any attempt to add a new one must return an error. quorum_del_child() on the other hand doesn't need any additional check because decreasing the number of children would make it go under

[Qemu-block] [PULL 10/36] iotests: make 083 specific to raw

2018-11-05 Thread Kevin Wolf
From: Cleber Rosa 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: raw: pass bochs: not generic cloop:

[Qemu-block] [PULL 18/36] iotest: Test x-blockdev-change on a Quorum

2018-11-05 Thread Kevin Wolf
From: Alberto Garcia This patch tests that you can add and remove drives from a Quorum using the x-blockdev-change command. Signed-off-by: Alberto Garcia Signed-off-by: Kevin Wolf --- tests/qemu-iotests/081 | 86 ++ tests/qemu-iotests/081.out | 54

Re: [Qemu-block] [PATCH 1/2] The discard flag for block stream operation

2018-11-05 Thread Alberto Garcia
On Wed 31 Oct 2018 05:47:19 PM CET, Andrey Shinkevich wrote: > Adding a parameter to QMP block-stream command to allow discarding > blocks in the backing chain while blocks are being copied to the > active layer. > > Signed-off-by: Andrey Shinkevich I haven't checked the other patch yet, but

[Qemu-block] [PULL 11/36] vpc: Don't leak opts in vpc_open()

2018-11-05 Thread Kevin Wolf
Signed-off-by: Kevin Wolf Reviewed-by: Alberto Garcia --- block/vpc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/block/vpc.c b/block/vpc.c index 984187cadd..80c5b2b197 100644 --- a/block/vpc.c +++ b/block/vpc.c @@ -456,10 +456,12 @@ static int vpc_open(BlockDriverState *bs, QDict

[Qemu-block] [PULL 36/36] include: Add a comment to explain the origin of sizes' lookup table

2018-11-05 Thread Kevin Wolf
From: Leonid Bloch The lookup table for power-of-two sizes was added in commit 540b8492618eb for the purpose of having convenient shortcuts for these sizes in cases when the literal number has to be present at compile time, and expressions as '(1 * KiB)' can not be used. One such case is the

[Qemu-block] [PULL 21/36] rbd: Close image in qemu_rbd_open() error path

2018-11-05 Thread Kevin Wolf
Commit e2b8247a322 introduced an error path in qemu_rbd_open() after calling rbd_open(), but neglected to close the image again in this error path. The error path should contain everything that the regular close function qemu_rbd_close() contains. This adds the missing rbd_close() call.

[Qemu-block] [PULL 10/33] vhost-user-blk: start vhost when guest kicks

2018-11-05 Thread Michael S. Tsirkin
From: Yongji Xie Some old guests (before commit 7a11370e5: "virtio_blk: enable VQs early") kick virtqueue before setting VIRTIO_CONFIG_S_DRIVER_OK. This violates the virtio spec. But virtio 1.0 transitional devices support this behaviour. So we should start vhost when guest kicks in this case.

Re: [Qemu-block] [Qemu-devel] [PATCH] include: Add a comment to explain the origin of sizes' lookup table

2018-11-05 Thread Eric Blake
On 11/2/18 8:58 PM, Leonid Bloch wrote: The lookup table for power-of-two sizes was added in commit 540b8492618eb for the purpose of having convenient shortcuts for these sizes in cases when the literal number has to be present at compile time, and expressions as '(1 * KiB)' can not be used. One

Re: [Qemu-block] [Qemu-devel] xen_disk qdevification

2018-11-05 Thread Paul Durrant
> -Original Message- > From: Markus Armbruster [mailto:arm...@redhat.com] > Sent: 05 November 2018 15:58 > To: Paul Durrant > Cc: 'Kevin Wolf' ; Tim Smith ; > Stefano Stabellini ; qemu-block@nongnu.org; qemu- > de...@nongnu.org; Max Reitz ; Anthony Perard > ;

[Qemu-block] [PULL 02/36] block: replace "discard" literal with BDRV_OPT_DISCARD macro

2018-11-05 Thread Kevin Wolf
From: Alberto Garcia Signed-off-by: Alberto Garcia Signed-off-by: Kevin Wolf --- block.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/block.c b/block.c index 95d8635aa1..9d2adf7962 100644 --- a/block.c +++ b/block.c @@ -1327,7 +1327,7 @@ QemuOptsList

[Qemu-block] [PULL 32/36] qdev-monitor: Make device options help nicer

2018-11-05 Thread Kevin Wolf
From: Max Reitz Just like in qemu_opts_print_help(), print the device name as a caption instead of on every single line, indent all options, add angle brackets around types, and align the descriptions after 24 characters. Also, separate the descriptions with " - " instead of putting them in

Re: [Qemu-block] [PATCH v3 1/6] qemu-nbd: add support for authorization of TLS clients

2018-11-05 Thread Eric Blake
On 10/9/18 8:23 AM, Daniel P. Berrangé wrote: From: "Daniel P. Berrange" Currently any client which can complete the TLS handshake is able to use the NBD server. The server admin can turn on the 'verify-peer' option for the x509 creds to require the client to provide a x509 certificate. This

Re: [Qemu-block] [PATCH v4 3/8] block: Null pointer dereference in blk_root_get_parent_desc()

2018-11-05 Thread Liam Merwick
On 04/11/18 23:57, Max Reitz wrote: On 19.10.18 22:39, Liam Merwick wrote: The dev_id returned by the call to blk_get_attached_dev_id() in blk_root_get_parent_desc() can be NULL (an internal call to object_get_canonical_path may have returned NULL). Instead of just checking this case before

Re: [Qemu-block] [PATCH v4 6/8] block: dump_qlist() may dereference a Null pointer

2018-11-05 Thread Liam Merwick
On 05/11/18 00:07, Max Reitz wrote: On 19.10.18 22:39, Liam Merwick wrote: A NULL 'list' passed into function dump_qlist() isn't correctly validated and can be passed to qlist_first() where it is dereferenced. Given that dump_qlist() is static, and callers already do the right thing, just

Re: [Qemu-block] [PATCH v4 5/8] block: Fix potential Null pointer dereferences in vvfat.c

2018-11-05 Thread Liam Merwick
On 05/11/18 00:19, Max Reitz wrote: On 19.10.18 22:39, Liam Merwick wrote: The calls to find_mapping_for_cluster() may return NULL but it isn't always checked for before dereferencing the value returned. Additionally, add some asserts to cover cases where NULL can't be returned but which

[Qemu-block] [PATCH 1/1 V2] Add vhost-pci-blk driver

2018-11-05 Thread Vitaly Mayatskikh
This driver uses the kernel-mode acceleration for virtio-blk and allows to get a near bare metal disk performance inside a VM. Signed-off-by: Vitaly Mayatskikh --- configure | 10 + default-configs/virtio.mak| 1 + hw/block/Makefile.objs| 1 +

[Qemu-block] [PATCH 0/1 V2] Add vhost-pci-blk driver

2018-11-05 Thread Vitaly Mayatskikh
V2 changes: - checkpatch style fixes - correct size detection of disk image placed on a file system This driver moves virtio-blk host-side processing to kernel (via new vhost_blk kernel driver). It accelerates virtual disk performance close to the bare metal levels, especially for parellel loads.

[Qemu-block] [PATCH v5 4/5] block: Fix potential Null pointer dereferences in vvfat.c

2018-11-05 Thread Liam Merwick
The calls to find_mapping_for_cluster() may return NULL but it isn't always checked for before dereferencing the value returned. Additionally, add some asserts to cover cases where NULL can't be returned but which might not be obvious at first glance. Signed-off-by: Liam Merwick ---

[Qemu-block] [PATCH v5 3/5] qemu-img: assert block_job_get() does not return NULL in img_commit()

2018-11-05 Thread Liam Merwick
Although the function block_job_get() can return NULL, it would be a serious bug if it did so (because the job yields before executing anything (if it started successfully); but otherwise, commit_active_start() would have returned an error). However, as a precaution, before dereferencing the

[Qemu-block] [PATCH v5 0/5] off-by-one and NULL pointer accesses detected by static analysis

2018-11-05 Thread Liam Merwick
Below are a number of fixes to some off-by-one, read outside array bounds, and NULL pointer accesses detected by an internal Oracle static analysis tool (Parfait). https://labs.oracle.com/pls/apex/f?p=labs:49:P49_PROJECT_ID:13 v1 -> v2 Based on feedback from Eric Blake: patch2: reworded

[Qemu-block] [PATCH v5 5/5] qcow2: Read outside array bounds in qcow2_pre_write_overlap_check()

2018-11-05 Thread Liam Merwick
The commit for 0e4e4318eaa5 increments QCOW2_OL_MAX_BITNR but does not add an array entry for QCOW2_OL_BITMAP_DIRECTORY_BITNR to metadata_ol_names[]. As a result, an array dereference of metadata_ol_names[8] in qcow2_pre_write_overlap_check() could result in a read outside of the array bounds.

[Qemu-block] [PATCH v5 2/5] block: Null pointer dereference in blk_root_get_parent_desc()

2018-11-05 Thread Liam Merwick
The dev_id returned by the call to blk_get_attached_dev_id() in blk_root_get_parent_desc() can be NULL (an internal call to object_get_canonical_path may have returned NULL). Instead of just checking this case before before dereferencing, adjust blk_get_attached_dev_id() to return the empty

[Qemu-block] [PATCH v5 1/5] job: Fix off-by-one assert checks for JobSTT and JobVerbTable

2018-11-05 Thread Liam Merwick
In the assert checking the array dereference of JobVerbTable[verb] in job_apply_verb() the check of the index, verb, allows an overrun because an index equal to the array size is permitted. Similarly, in the assert check of JobSTT[s0][s1] with index s1 in job_state_transition(), an off-by-one

[Qemu-block] [PATCH 1/1] virtio-blk: fix comment for virtio_blk_rw_complete as nalloc is initially -1

2018-11-05 Thread Dongli Zhang
The initial value of nalloc is -1, but not 1. Signed-off-by: Dongli Zhang --- This is based on git://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git tags/for_upstream hw/block/virtio-blk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/block/virtio-blk.c

Re: [Qemu-block] [PATCH v2 0/5] Various option help readability improvement suggestions

2018-11-05 Thread Max Reitz
On 05.11.18 15:18, Kevin Wolf wrote: > Am 19.10.2018 um 18:49 hat Max Reitz geschrieben: >> I noticed that with the (more or less) recent series from Marc-André the >> output of qemu-img amend -f qcow2 -o help changed to this: >> >> $ ./qemu-img amend -f qcow2 -o help >> Creation options for

Re: [Qemu-block] [Qemu-devel] [PATCH] block: Make more block drivers compile-time configurable

2018-11-05 Thread Max Reitz
On 05.11.18 16:25, Markus Armbruster wrote: > Max Reitz writes: > >> On 19.10.18 13:34, Markus Armbruster wrote: >>> From: Jeff Cody >>> >>> This adds configure options to control the following block drivers: >>> >>> * Bochs >>> * Cloop >>> * Dmg >>> * Qcow (V1) >>> * Vdi >>> * Vvfat >>> * qed

Re: [Qemu-block] [Qemu-devel] [PATCH] include: Add a comment to explain the origin of sizes' lookup table

2018-11-05 Thread no-reply
Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20181103015821.30074-1-lbl...@janustech.com Subject: [Qemu-devel] [PATCH] include: Add a comment to explain the origin of sizes' lookup table === TEST SCRIPT BEGIN ===

Re: [Qemu-block] [Qemu-devel] [PULL 05/33] virtio-blk: fix comment for virtio_blk_rw_complete

2018-11-05 Thread Michael S. Tsirkin
On Tue, Nov 06, 2018 at 11:17:03AM +0800, Dongli Zhang wrote: > > > On 11/06/2018 02:15 AM, Michael S. Tsirkin wrote: > > From: Yaowei Bai > > > > Here should be submit_requests, there is no submit_merged_requests > > function. > > > > Signed-off-by: Yaowei Bai > > Reviewed-by: Michael S.

Re: [Qemu-block] [Qemu-devel] [PULL 05/33] virtio-blk: fix comment for virtio_blk_rw_complete

2018-11-05 Thread Dongli Zhang
On 11/06/2018 02:15 AM, Michael S. Tsirkin wrote: > From: Yaowei Bai > > Here should be submit_requests, there is no submit_merged_requests > function. > > Signed-off-by: Yaowei Bai > Reviewed-by: Michael S. Tsirkin > Signed-off-by: Michael S. Tsirkin > --- > hw/block/virtio-blk.c | 4

Re: [Qemu-block] [Qemu-trivial] [PATCH 1/1] virtio-blk: fix comment for virtio_blk_rw_complete as nalloc is initially -1

2018-11-05 Thread Laurent Vivier
On 06/11/2018 05:52, Dongli Zhang wrote: > The initial value of nalloc is -1, but not 1. > > Signed-off-by: Dongli Zhang > --- > This is based on git://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git > tags/for_upstream > > hw/block/virtio-blk.c | 2 +- > 1 file changed, 1 insertion(+), 1