Branch: refs/heads/master Home: https://github.com/qemu/qemu Commit: 71b74b25444ed3ddfe7b025d059ca882916a4b02 https://github.com/qemu/qemu/commit/71b74b25444ed3ddfe7b025d059ca882916a4b02 Author: Eric Blake <ebl...@redhat.com> Date: 2018-03-26 (Mon, 26 Mar 2018)
Changed paths: M tests/qemu-iotests/group Log Message: ----------- iotests: 163 is not quick Testing on ext4, most 'quick' qcow2 tests took less than 5 seconds, but 163 took more than 20. Let's remove it from the quick set. Signed-off-by: Eric Blake <ebl...@redhat.com> Signed-off-by: Kevin Wolf <kw...@redhat.com> Commit: cb83d2efe1f591cdc7ff2e8fbc67544155f264d6 https://github.com/qemu/qemu/commit/cb83d2efe1f591cdc7ff2e8fbc67544155f264d6 Author: Fabiano Rosas <faro...@linux.vnet.ibm.com> Date: 2018-03-26 (Mon, 26 Mar 2018) Changed paths: M block/replication.c M replication.h Log Message: ----------- block/replication: Remove protocol_name field The protocol_name field is used when selecting a driver via protocol syntax (i.e. <protocol_name>:<filename:options:...>). Drivers that are only selected explicitly (e.g. driver=replication,mode=primary,...) should not have a protocol_name. This patch removes the protocol_name field from the brdv_replication structure so that attempts to invoke this driver using protocol syntax will fail gracefully: $ qemu-img info replication:foo qemu-img: Could not open 'replication:': Unknown protocol 'replication' Buglink: https://bugs.launchpad.net/qemu/+bug/1726733 Signed-off-by: Fabiano Rosas <faro...@linux.vnet.ibm.com> Reviewed-by: Max Reitz <mre...@redhat.com> Signed-off-by: Kevin Wolf <kw...@redhat.com> Commit: 65d2c3e2f64b116f6a25d38cde5919d38f36d26d https://github.com/qemu/qemu/commit/65d2c3e2f64b116f6a25d38cde5919d38f36d26d Author: Fabiano Rosas <faro...@linux.vnet.ibm.com> Date: 2018-03-26 (Mon, 26 Mar 2018) Changed paths: M block/quorum.c Log Message: ----------- block/quorum: Remove protocol-related fields The quorum driver is not a protocol so it should implement bdrv_open instead of bdrv_file_open and not provide a protocol_name. Attempts to invoke this driver using protocol syntax (i.e. quorum:<filename:options:...>) will now fail gracefully: $ qemu-img info quorum:foo qemu-img: Could not open 'quorum:foo': Unknown protocol 'quorum' Signed-off-by: Fabiano Rosas <faro...@linux.vnet.ibm.com> Reviewed-by: Max Reitz <mre...@redhat.com> Reviewed-by: Alberto Garcia <be...@igalia.com> Signed-off-by: Kevin Wolf <kw...@redhat.com> Commit: a7328ba55f4535613a54b4ad65a3eb8b1a47cbb7 https://github.com/qemu/qemu/commit/a7328ba55f4535613a54b4ad65a3eb8b1a47cbb7 Author: Fabiano Rosas <faro...@linux.vnet.ibm.com> Date: 2018-03-26 (Mon, 26 Mar 2018) Changed paths: M block/throttle.c Log Message: ----------- block/throttle: Remove protocol-related fields The throttle driver is not a protocol so it should implement bdrv_open instead of bdrv_file_open and not provide a protocol_name. Attempts to invoke this driver using protocol syntax (i.e. throttle:<filename:options:...>) will now fail gracefully: $ qemu-img info throttle:foo qemu-img: Could not open 'throttle:foo': Unknown protocol 'throttle' Signed-off-by: Fabiano Rosas <faro...@linux.vnet.ibm.com> Reviewed-by: Max Reitz <mre...@redhat.com> Reviewed-by: Alberto Garcia <be...@igalia.com> Signed-off-by: Kevin Wolf <kw...@redhat.com> Commit: 8140e786f045a074928070640e20914873aeb396 https://github.com/qemu/qemu/commit/8140e786f045a074928070640e20914873aeb396 Author: Fabiano Rosas <faro...@linux.vnet.ibm.com> Date: 2018-03-26 (Mon, 26 Mar 2018) Changed paths: M block/blkreplay.c Log Message: ----------- block/blkreplay: Remove protocol-related fields The blkreplay driver is not a protocol so it should implement bdrv_open instead of bdrv_file_open and not provide a protocol_name. Attempts to invoke this driver using protocol syntax (i.e. blkreplay:<filename:options:...>) will now fail gracefully: $ qemu-img info blkreplay:foo qemu-img: Could not open 'blkreplay:foo': Unknown protocol 'blkreplay' Signed-off-by: Fabiano Rosas <faro...@linux.vnet.ibm.com> Reviewed-by: Pavel Dovgalyuk <pavel.dovga...@ispras.ru> Reviewed-by: Max Reitz <mre...@redhat.com> Signed-off-by: Kevin Wolf <kw...@redhat.com> Commit: 1e486cf30a3817b9136b333d31e7e77379fd6a90 https://github.com/qemu/qemu/commit/1e486cf30a3817b9136b333d31e7e77379fd6a90 Author: Fabiano Rosas <faro...@linux.vnet.ibm.com> Date: 2018-03-26 (Mon, 26 Mar 2018) Changed paths: M include/block/block_int.h Log Message: ----------- include/block/block_int: Document protocol related functions Clarify that: - for protocols the brdv_file_open function is used instead of bdrv_open; - when protocol_name is set, a driver should expect to be given only a filename and no other options. Signed-off-by: Fabiano Rosas <faro...@linux.vnet.ibm.com> Signed-off-by: Kevin Wolf <kw...@redhat.com> Commit: abf754fe406ecaf5b5018a6f34b2eba569352673 https://github.com/qemu/qemu/commit/abf754fe406ecaf5b5018a6f34b2eba569352673 Author: Alberto Garcia <be...@igalia.com> Date: 2018-03-26 (Mon, 26 Mar 2018) Changed paths: M block/qcow2-refcount.c M tests/qemu-iotests/026.out M tests/qemu-iotests/121 M tests/qemu-iotests/121.out Log Message: ----------- qcow2: Reset free_cluster_index when allocating a new refcount block When we try to allocate new clusters we first look for available ones starting from s->free_cluster_index and once we find them we increase their reference counts. Before we get to call update_refcount() to do this last step s->free_cluster_index is already pointing to the next cluster after the ones we are trying to allocate. During update_refcount() it may happen however that we also need to allocate a new refcount block in order to store the refcounts of these new clusters (and to complicate things further that may also require us to grow the refcount table). After all this we don't know if the clusters that we originally tried to allocate are still available, so we return -EAGAIN to ask the caller to restart the search for free clusters. This is what can happen in a common scenario: 1) We want to allocate a new cluster and we see that cluster N is free. 2) We try to increase N's refcount but all refcount blocks are full, so we allocate a new one at N+1 (where s->free_cluster_index was pointing at). 3) Once we're done we return -EAGAIN to look again for a free cluster, but now s->free_cluster_index points at N+2, so that's the one we allocate. Cluster N remains unallocated and we have a hole in the qcow2 file. This can be reproduced easily: qemu-img create -f qcow2 -o cluster_size=512 hd.qcow2 1M qemu-io -c 'write 0 124k' hd.qcow2 After this the image has 132608 bytes (256 clusters), and the refcount block is full. If we write 512 more bytes it should allocate two new clusters: the data cluster itself and a new refcount block. qemu-io -c 'write 124k 512' hd.qcow2 However the image has now three new clusters (259 in total), and the first one of them is empty (and unallocated): dd if=hd.qcow2 bs=512c skip=256 count=1 | hexdump -C If we write larger amounts of data in the last step instead of the 512 bytes used in this example we can create larger holes in the qcow2 file. What this patch does is reset s->free_cluster_index to its previous value when alloc_refcount_block() returns -EAGAIN. This way the caller will try to allocate again the original clusters if they are still free. The output of iotest 026 also needs to be updated because now that images have no holes some tests fail at a different point and the number of leaked clusters is different. Signed-off-by: Alberto Garcia <be...@igalia.com> Reviewed-by: Eric Blake <ebl...@redhat.com> Signed-off-by: Kevin Wolf <kw...@redhat.com> Commit: 61fa64871dcd823633aac129762d424a8a19e6ee https://github.com/qemu/qemu/commit/61fa64871dcd823633aac129762d424a8a19e6ee Author: Kevin Wolf <kw...@redhat.com> Date: 2018-03-26 (Mon, 26 Mar 2018) Changed paths: M block/vdi.c M qapi/block-core.json Log Message: ----------- vdi: Change 'static' create option to 'preallocation' in QMP What static=on really does is what we call metadata preallocation for other block drivers. While we can still change the QMP interface, make it more consistent by using 'preallocation' for VDI, too. This doesn't implement any new functionality, so the only supported preallocation modes are 'off' and 'metadata' for now. Signed-off-by: Kevin Wolf <kw...@redhat.com> Reviewed-by: Eric Blake <ebl...@redhat.com> Commit: 95a14d51b24ea8adeb5d863517727916fee63f05 https://github.com/qemu/qemu/commit/95a14d51b24ea8adeb5d863517727916fee63f05 Author: Kevin Wolf <kw...@redhat.com> Date: 2018-03-26 (Mon, 26 Mar 2018) Changed paths: M block/vdi.c Log Message: ----------- vdi: Fix build with CONFIG_VDI_DEBUG Use qemu_uuid_unparse() instead of uuid_unparse() to make vdi.c compile again when CONFIG_VDI_DEBUG is set. In order to prevent future bitrot, replace '#ifdef CONFIG_VDI_DEBUG' by 'if (VDI_DEBUG)' so that the compiler always sees the code. Signed-off-by: Kevin Wolf <kw...@redhat.com> Reviewed-by: Eric Blake <ebl...@redhat.com> Commit: b7de0777dcae2b39f9245cf600ab96e517d83fa3 https://github.com/qemu/qemu/commit/b7de0777dcae2b39f9245cf600ab96e517d83fa3 Author: Kevin Wolf <kw...@redhat.com> Date: 2018-03-26 (Mon, 26 Mar 2018) Changed paths: A tests/qemu-iotests/211 A tests/qemu-iotests/211.out M tests/qemu-iotests/group Log Message: ----------- qemu-iotests: Test vdi image creation with QMP Signed-off-by: Kevin Wolf <kw...@redhat.com> Reviewed-by: Eric Blake <ebl...@redhat.com> Commit: 633c175f8cccf647f19cf8954dc46b82ce7926e4 https://github.com/qemu/qemu/commit/633c175f8cccf647f19cf8954dc46b82ce7926e4 Author: Kevin Wolf <kw...@redhat.com> Date: 2018-03-26 (Mon, 26 Mar 2018) Changed paths: M tests/qemu-iotests/025 Log Message: ----------- qemu-iotests: Enable 025 for luks We want to test resizing even for luks. The only change that is needed is to explicitly zero out new space for luks because it's undefined. Signed-off-by: Kevin Wolf <kw...@redhat.com> Reviewed-by: Eric Blake <ebl...@redhat.com> Reviewed-by: Daniel P. Berrangé <berra...@redhat.com> Commit: 120bc742c028419c25ed7aa49497b490ce96536c https://github.com/qemu/qemu/commit/120bc742c028419c25ed7aa49497b490ce96536c Author: Kevin Wolf <kw...@redhat.com> Date: 2018-03-26 (Mon, 26 Mar 2018) Changed paths: M block/crypto.c Log Message: ----------- luks: Turn another invalid assertion into check Commit e39e959e fixed an invalid assertion in the .bdrv_length implementation, but left a similar assertion in place for .bdrv_truncate. Instead of crashing when the user requests a too large image size, fail gracefully. A file size of exactly INT64_MAX caused failure before, but is actually legal. Signed-off-by: Kevin Wolf <kw...@redhat.com> Reviewed-by: Eric Blake <ebl...@redhat.com> Reviewed-by: Daniel P. Berrangé <berra...@redhat.com> Commit: 50880f25c88f2a629bd68a5fb1a46aa9bf0a2543 https://github.com/qemu/qemu/commit/50880f25c88f2a629bd68a5fb1a46aa9bf0a2543 Author: Kevin Wolf <kw...@redhat.com> Date: 2018-03-26 (Mon, 26 Mar 2018) Changed paths: M tests/qemu-iotests/210 M tests/qemu-iotests/210.out Log Message: ----------- qemu-iotests: Test invalid resize on luks This tests that the .bdrv_truncate implementation for luks doesn't crash for invalid image sizes. Signed-off-by: Kevin Wolf <kw...@redhat.com> Reviewed-by: Eric Blake <ebl...@redhat.com> Commit: 2332d82589ef9e9f7e065ec1f759a2c164ad4932 https://github.com/qemu/qemu/commit/2332d82589ef9e9f7e065ec1f759a2c164ad4932 Author: Kevin Wolf <kw...@redhat.com> Date: 2018-03-26 (Mon, 26 Mar 2018) Changed paths: M block/parallels.c Log Message: ----------- parallels: Check maximum cluster size on create It's unclear what the real maximum cluster size is for the Parallels format, but let's at least make sure that we don't get integer overflows in our .bdrv_co_create implementation. Signed-off-by: Kevin Wolf <kw...@redhat.com> Reviewed-by: Eric Blake <ebl...@redhat.com> Commit: e8f6ea6fb6c1fd9a778abebc66806203f2bf667b https://github.com/qemu/qemu/commit/e8f6ea6fb6c1fd9a778abebc66806203f2bf667b Author: Kevin Wolf <kw...@redhat.com> Date: 2018-03-26 (Mon, 26 Mar 2018) Changed paths: A tests/qemu-iotests/212 A tests/qemu-iotests/212.out M tests/qemu-iotests/group Log Message: ----------- qemu-iotests: Test parallels image creation with QMP Signed-off-by: Kevin Wolf <kw...@redhat.com> Commit: b412f49407e81dd6cdd9aaf5310895e579ed21d6 https://github.com/qemu/qemu/commit/b412f49407e81dd6cdd9aaf5310895e579ed21d6 Author: Kevin Wolf <kw...@redhat.com> Date: 2018-03-26 (Mon, 26 Mar 2018) Changed paths: M block/vhdx.c Log Message: ----------- vhdx: Require power-of-two block size on create Images with a non-power-of-two block size are invalid and cannot be opened. Reject such block sizes when creating an image. Signed-off-by: Kevin Wolf <kw...@redhat.com> Reviewed-by: Eric Blake <ebl...@redhat.com> Reviewed-by: Jeff Cody <jc...@redhat.com> Commit: 0fcc38e7d0fb102ab9e9a9734459bdff89d3121f https://github.com/qemu/qemu/commit/0fcc38e7d0fb102ab9e9a9734459bdff89d3121f Author: Kevin Wolf <kw...@redhat.com> Date: 2018-03-26 (Mon, 26 Mar 2018) Changed paths: M block/vhdx.c Log Message: ----------- vhdx: Don't use error_setg_errno() with constant errno error_setg_errno() is meant for cases where we got an errno from the OS that can add useful extra information to an error message. It's pointless if we pass a constant errno, these cases should use plain error_setg(). Signed-off-by: Kevin Wolf <kw...@redhat.com> Reviewed-by: Eric Blake <ebl...@redhat.com> Reviewed-by: Jeff Cody <jc...@redhat.com> Commit: 6f16f7c5625fde5634cc4c40857b66cdee09dc17 https://github.com/qemu/qemu/commit/6f16f7c5625fde5634cc4c40857b66cdee09dc17 Author: Kevin Wolf <kw...@redhat.com> Date: 2018-03-26 (Mon, 26 Mar 2018) Changed paths: M block/vhdx.c Log Message: ----------- vhdx: Check for 4 GB maximum log size on creation It's unclear what the real maximum is, but we use an uint32_t to store the log size in vhdx_co_create(), so we should check that the given value fits in 32 bits. Signed-off-by: Kevin Wolf <kw...@redhat.com> Reviewed-by: Eric Blake <ebl...@redhat.com> Reviewed-by: Jeff Cody <jc...@redhat.com> Commit: 0b7e7f66813a7e346e12d47be977a32a530a6316 https://github.com/qemu/qemu/commit/0b7e7f66813a7e346e12d47be977a32a530a6316 Author: Kevin Wolf <kw...@redhat.com> Date: 2018-03-26 (Mon, 26 Mar 2018) Changed paths: A tests/qemu-iotests/213 A tests/qemu-iotests/213.out M tests/qemu-iotests/group Log Message: ----------- qemu-iotests: Test vhdx image creation with QMP Signed-off-by: Kevin Wolf <kw...@redhat.com> Commit: 62a2b55e8d098d91908b17fc37cb1a4f2a854f8f https://github.com/qemu/qemu/commit/62a2b55e8d098d91908b17fc37cb1a4f2a854f8f Author: Peter Maydell <peter.mayd...@linaro.org> Date: 2018-03-26 (Mon, 26 Mar 2018) Changed paths: M block/blkreplay.c M block/crypto.c M block/parallels.c M block/qcow2-refcount.c M block/quorum.c M block/replication.c M block/throttle.c M block/vdi.c M block/vhdx.c M include/block/block_int.h M qapi/block-core.json M replication.h M tests/qemu-iotests/025 M tests/qemu-iotests/026.out M tests/qemu-iotests/121 M tests/qemu-iotests/121.out M tests/qemu-iotests/210 M tests/qemu-iotests/210.out A tests/qemu-iotests/211 A tests/qemu-iotests/211.out A tests/qemu-iotests/212 A tests/qemu-iotests/212.out A tests/qemu-iotests/213 A tests/qemu-iotests/213.out M tests/qemu-iotests/group Log Message: ----------- Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging Block layer patches # gpg: Signature made Mon 26 Mar 2018 15:33:01 BST # gpg: using RSA key 7F09B272C88F2FD6 # gpg: Good signature from "Kevin Wolf <kw...@redhat.com>" # Primary key fingerprint: DC3D EB15 9A9A F95D 3D74 56FE 7F09 B272 C88F 2FD6 * remotes/kevin/tags/for-upstream: qemu-iotests: Test vhdx image creation with QMP vhdx: Check for 4 GB maximum log size on creation vhdx: Don't use error_setg_errno() with constant errno vhdx: Require power-of-two block size on create qemu-iotests: Test parallels image creation with QMP parallels: Check maximum cluster size on create qemu-iotests: Test invalid resize on luks luks: Turn another invalid assertion into check qemu-iotests: Enable 025 for luks qemu-iotests: Test vdi image creation with QMP vdi: Fix build with CONFIG_VDI_DEBUG vdi: Change 'static' create option to 'preallocation' in QMP qcow2: Reset free_cluster_index when allocating a new refcount block include/block/block_int: Document protocol related functions block/blkreplay: Remove protocol-related fields block/throttle: Remove protocol-related fields block/quorum: Remove protocol-related fields block/replication: Remove protocol_name field iotests: 163 is not quick Signed-off-by: Peter Maydell <peter.mayd...@linaro.org> Compare: https://github.com/qemu/qemu/compare/7b93d78a04aa...62a2b55e8d09