Branch: refs/heads/master Home: https://github.com/qemu/qemu Commit: a2b83a5165c567bb81fe4303d97a3cca5ccc8a15 https://github.com/qemu/qemu/commit/a2b83a5165c567bb81fe4303d97a3cca5ccc8a15 Author: Thomas Huth <th...@redhat.com> Date: 2018-11-05 (Mon, 05 Nov 2018)
Changed paths: M block/vvfat.c Log Message: ----------- block/vvfat: Fix crash when reporting error about too many files in directory 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 \ file.driver=vvfat,file.dir=.,read-only=on,media=cdrom Seems like read_directory() is changing the mapping->path variable. Make sure we use the right pointer instead. Signed-off-by: Thomas Huth <th...@redhat.com> Signed-off-by: Kevin Wolf <kw...@redhat.com> Commit: 415bbca86dd671fd766cdb24f40add3fda70c38a https://github.com/qemu/qemu/commit/415bbca86dd671fd766cdb24f40add3fda70c38a Author: Alberto Garcia <be...@igalia.com> Date: 2018-11-05 (Mon, 05 Nov 2018) Changed paths: M block.c Log Message: ----------- block: replace "discard" literal with BDRV_OPT_DISCARD macro Signed-off-by: Alberto Garcia <be...@igalia.com> Signed-off-by: Kevin Wolf <kw...@redhat.com> Commit: cf67b692b38a5e0a76d6d94f77fd4aa1b5d31849 https://github.com/qemu/qemu/commit/cf67b692b38a5e0a76d6d94f77fd4aa1b5d31849 Author: Stefan Weil <s...@weilnetz.de> Date: 2018-11-05 (Mon, 05 Nov 2018) Changed paths: M qemu-io-cmds.c Log Message: ----------- qemu-io-cmds: Fix two format strings 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 <s...@weilnetz.de> Reviewed-by: Philippe Mathieu-Daudé <f4...@amsat.org> Signed-off-by: Kevin Wolf <kw...@redhat.com> Commit: 3b698f52f9fabb4fb7844f57160c65cd6ce6513c https://github.com/qemu/qemu/commit/3b698f52f9fabb4fb7844f57160c65cd6ce6513c Author: Peter Maydell <peter.mayd...@linaro.org> Date: 2018-11-05 (Mon, 05 Nov 2018) Changed paths: M block/qcow2.c Log Message: ----------- block/qcow2: Don't take address of fields in packed structs 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 swapping functions. There are a few places where the in-place swap function is used on something other than a packed struct field; we convert those anyway, for consistency. This patch was produced with the following spatch script (and hand-editing to fold a few resulting overlength lines): @@ expression E; @@ -be16_to_cpus(&E); +E = be16_to_cpu(E); @@ expression E; @@ -be32_to_cpus(&E); +E = be32_to_cpu(E); @@ expression E; @@ -be64_to_cpus(&E); +E = be64_to_cpu(E); @@ expression E; @@ -cpu_to_be16s(&E); +E = cpu_to_be16(E); @@ expression E; @@ -cpu_to_be32s(&E); +E = cpu_to_be32(E); @@ expression E; @@ -cpu_to_be64s(&E); +E = cpu_to_be64(E); Signed-off-by: Peter Maydell <peter.mayd...@linaro.org> Reviewed-by: Richard Henderson <richard.hender...@linaro.org> Tested-by: John Snow <js...@redhat.com> Reviewed-by: John Snow <js...@redhat.com> Signed-off-by: Kevin Wolf <kw...@redhat.com> Commit: a5fdff18a737f3c70fbb915a9257440028ffde91 https://github.com/qemu/qemu/commit/a5fdff18a737f3c70fbb915a9257440028ffde91 Author: Peter Maydell <peter.mayd...@linaro.org> Date: 2018-11-05 (Mon, 05 Nov 2018) Changed paths: M block/qcow.c Log Message: ----------- block/qcow: Don't take address of fields in packed structs 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 swapping functions. There are a few places where the in-place swap function is used on something other than a packed struct field; we convert those anyway, for consistency. This patch was produced with the following spatch script: @@ expression E; @@ -be16_to_cpus(&E); +E = be16_to_cpu(E); @@ expression E; @@ -be32_to_cpus(&E); +E = be32_to_cpu(E); @@ expression E; @@ -be64_to_cpus(&E); +E = be64_to_cpu(E); @@ expression E; @@ -cpu_to_be16s(&E); +E = cpu_to_be16(E); @@ expression E; @@ -cpu_to_be32s(&E); +E = cpu_to_be32(E); @@ expression E; @@ -cpu_to_be64s(&E); +E = cpu_to_be64(E); Signed-off-by: Peter Maydell <peter.mayd...@linaro.org> Reviewed-by: Richard Henderson <richard.hender...@linaro.org> Tested-by: John Snow <js...@redhat.com> Reviewed-by: John Snow <js...@redhat.com> Signed-off-by: Kevin Wolf <kw...@redhat.com> Commit: caacea4b2ed7ccf3f32ad03b810146f56125626b https://github.com/qemu/qemu/commit/caacea4b2ed7ccf3f32ad03b810146f56125626b Author: Peter Maydell <peter.mayd...@linaro.org> Date: 2018-11-05 (Mon, 05 Nov 2018) Changed paths: M block/qcow2-bitmap.c Log Message: ----------- block/qcow2-bitmap: Don't take address of fields in packed structs 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 swapping functions. There are a few places where the in-place swap function is used on something other than a packed struct field; we convert those anyway, for consistency. This patch was produced with the following spatch script: @@ expression E; @@ -be16_to_cpus(&E); +E = be16_to_cpu(E); @@ expression E; @@ -be32_to_cpus(&E); +E = be32_to_cpu(E); @@ expression E; @@ -be64_to_cpus(&E); +E = be64_to_cpu(E); @@ expression E; @@ -cpu_to_be16s(&E); +E = cpu_to_be16(E); @@ expression E; @@ -cpu_to_be32s(&E); +E = cpu_to_be32(E); @@ expression E; @@ -cpu_to_be64s(&E); +E = cpu_to_be64(E); Signed-off-by: Peter Maydell <peter.mayd...@linaro.org> Reviewed-by: Richard Henderson <richard.hender...@linaro.org> Tested-by: John Snow <js...@redhat.com> Reviewed-by: John Snow <js...@redhat.com> Signed-off-by: Kevin Wolf <kw...@redhat.com> Commit: 07809a7fa8bad7f6255a4955e1520ad09ad738a4 https://github.com/qemu/qemu/commit/07809a7fa8bad7f6255a4955e1520ad09ad738a4 Author: Daniel P. Berrangé <berra...@redhat.com> Date: 2018-11-05 (Mon, 05 Nov 2018) Changed paths: M crypto/block-qcow.c Log Message: ----------- crypto: initialize sector size even when opening with no IO flag 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é <berra...@redhat.com> Reviewed-by: Alberto Garcia <be...@igalia.com> Signed-off-by: Kevin Wolf <kw...@redhat.com> Commit: 6f8f015c0cd9f3ea44de4d73144db98beef97e3c https://github.com/qemu/qemu/commit/6f8f015c0cd9f3ea44de4d73144db98beef97e3c Author: Alberto Garcia <be...@igalia.com> Date: 2018-11-05 (Mon, 05 Nov 2018) Changed paths: M block/qcow2.c Log Message: ----------- qcow2: Get the request alignment for encrypted images from QCryptoBlock 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: Alberto Garcia <be...@igalia.com> Reviewed-by: Daniel P. Berrangé <berra...@redhat.com> Signed-off-by: Kevin Wolf <kw...@redhat.com> Commit: 967105651bad6560f54eeb8ba17ac41a9a1f5eb5 https://github.com/qemu/qemu/commit/967105651bad6560f54eeb8ba17ac41a9a1f5eb5 Author: Li Qiang <liq...@163.com> Date: 2018-11-05 (Mon, 05 Nov 2018) Changed paths: M block/block-backend.c M include/sysemu/block-backend.h Log Message: ----------- block: change some function return type to bool Signed-off-by: Li Qiang <liq...@163.com> Reviewed-by: Alberto Garcia <be...@igalia.com> Signed-off-by: Kevin Wolf <kw...@redhat.com> Commit: d98205c58667ca6750658834e8466ac41a3e572e https://github.com/qemu/qemu/commit/d98205c58667ca6750658834e8466ac41a3e572e Author: Cleber Rosa <cr...@redhat.com> Date: 2018-11-05 (Mon, 05 Nov 2018) Changed paths: M tests/qemu-iotests/083 Log Message: ----------- iotests: make 083 specific to raw 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: not generic parallels: fail qcow: fail qcow2: fail qed: fail vdi: fail vhdx: fail vmdk: fail vpc: fail luks: fail The errors are a mixture I/O and "image not in xxx format", such as: === Check disconnect before data === Unexpected end-of-file before all bytes were read -read failed: Input/output error +can't open device nbd+tcp://127.0.0.1:PORT/foo: Could not open 'nbd://127.0.0.1:PORT/foo': Input/output error === Check disconnect after data === -read 512/512 bytes at offset 0 -512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) +can't open device nbd+tcp://127.0.0.1:PORT/foo: Image not in qcow format I'm not aware if there's a quick fix, so, for the time being, it looks like the honest approach is to make the test known to work on raw only. Signed-off-by: Cleber Rosa <cr...@redhat.com> Signed-off-by: Kevin Wolf <kw...@redhat.com> Commit: c317b646d752e97f64e97ba2145d8dfc55589c92 https://github.com/qemu/qemu/commit/c317b646d752e97f64e97ba2145d8dfc55589c92 Author: Kevin Wolf <kw...@redhat.com> Date: 2018-11-05 (Mon, 05 Nov 2018) Changed paths: M block/vpc.c Log Message: ----------- vpc: Don't leak opts in vpc_open() Signed-off-by: Kevin Wolf <kw...@redhat.com> Reviewed-by: Alberto Garcia <be...@igalia.com> Commit: 1229e46d3cfe61ee0b11f08fbbc7530af1578637 https://github.com/qemu/qemu/commit/1229e46d3cfe61ee0b11f08fbbc7530af1578637 Author: Peter Maydell <peter.mayd...@linaro.org> Date: 2018-11-05 (Mon, 05 Nov 2018) Changed paths: M block/vhdx-endian.c M block/vhdx-log.c M block/vhdx.c M block/vhdx.h Log Message: ----------- block/vhdx: Don't take address of fields in packed structs 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 swapping functions. There are a few places where the in-place swap function is used on something other than a packed struct field; we convert those anyway, for consistency. Patch produced with scripts/coccinelle/inplace-byteswaps.cocci. Signed-off-by: Peter Maydell <peter.mayd...@linaro.org> Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com> Signed-off-by: Kevin Wolf <kw...@redhat.com> Commit: 091901841af285f963ea80cd18d616fd0350ddbc https://github.com/qemu/qemu/commit/091901841af285f963ea80cd18d616fd0350ddbc Author: Peter Maydell <peter.mayd...@linaro.org> Date: 2018-11-05 (Mon, 05 Nov 2018) Changed paths: M block/vdi.c Log Message: ----------- block/vdi: Don't take address of fields in packed structs 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 swapping functions. There are a few places where the in-place swap function is used on something other than a packed struct field; we convert those anyway, for consistency. Patch produced with scripts/coccinelle/inplace-byteswaps.cocci. There are other places where we take the address of a packed member in this file for other purposes than passing it to a byteswap function (all the calls to qemu_uuid_*()); we leave those for now. Signed-off-by: Peter Maydell <peter.mayd...@linaro.org> Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com> Signed-off-by: Kevin Wolf <kw...@redhat.com> Commit: 6840e8d8ae3c2f8efd76d9d01cce84d047132c7a https://github.com/qemu/qemu/commit/6840e8d8ae3c2f8efd76d9d01cce84d047132c7a Author: Alberto Garcia <be...@igalia.com> Date: 2018-11-05 (Mon, 05 Nov 2018) Changed paths: M block/quorum.c Log Message: ----------- quorum: Remove quorum_err() 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 <be...@igalia.com> Reported-by: Markus Armbruster <arm...@redhat.com> Signed-off-by: Kevin Wolf <kw...@redhat.com> Commit: 83aedca872b5c2bacf9fd35f62cf96479fbf062e https://github.com/qemu/qemu/commit/83aedca872b5c2bacf9fd35f62cf96479fbf062e Author: Alberto Garcia <be...@igalia.com> Date: 2018-11-05 (Mon, 05 Nov 2018) Changed paths: M block/quorum.c Log Message: ----------- quorum: Return an error if the blkverify mode has invalid settings 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 disabling the blkverify setting. This patch makes quorum_open() fail and return an error in this case. Signed-off-by: Alberto Garcia <be...@igalia.com> Reported-by: Markus Armbruster <arm...@redhat.com> Signed-off-by: Kevin Wolf <kw...@redhat.com> Commit: 82c4c85978da41294fbd1d621fec373a4be6788f https://github.com/qemu/qemu/commit/82c4c85978da41294fbd1d621fec373a4be6788f Author: Alberto Garcia <be...@igalia.com> Date: 2018-11-05 (Mon, 05 Nov 2018) Changed paths: M tests/qemu-iotests/081 M tests/qemu-iotests/081.out Log Message: ----------- iotest: Test the blkverify mode of the Quorum driver Signed-off-by: Alberto Garcia <be...@igalia.com> Signed-off-by: Kevin Wolf <kw...@redhat.com> Commit: 808b27d464287666821483257289b1a3379264b2 https://github.com/qemu/qemu/commit/808b27d464287666821483257289b1a3379264b2 Author: Alberto Garcia <be...@igalia.com> Date: 2018-11-05 (Mon, 05 Nov 2018) Changed paths: M block/quorum.c Log Message: ----------- quorum: Forbid adding children in blkverify mode 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 the vote threshold. Signed-off-by: Alberto Garcia <be...@igalia.com> Reported-by: Kevin Wolf <kw...@redhat.com> Signed-off-by: Kevin Wolf <kw...@redhat.com> Commit: 04f600ef7cacaa2a81b74b2cdd3670cfc106d0e2 https://github.com/qemu/qemu/commit/04f600ef7cacaa2a81b74b2cdd3670cfc106d0e2 Author: Alberto Garcia <be...@igalia.com> Date: 2018-11-05 (Mon, 05 Nov 2018) Changed paths: M tests/qemu-iotests/081 M tests/qemu-iotests/081.out Log Message: ----------- iotest: Test x-blockdev-change on a Quorum This patch tests that you can add and remove drives from a Quorum using the x-blockdev-change command. Signed-off-by: Alberto Garcia <be...@igalia.com> Signed-off-by: Kevin Wolf <kw...@redhat.com> Commit: eeae6a596b0efc092f5101c67683053e245e6250 https://github.com/qemu/qemu/commit/eeae6a596b0efc092f5101c67683053e245e6250 Author: Kevin Wolf <kw...@redhat.com> Date: 2018-11-05 (Mon, 05 Nov 2018) Changed paths: M block.c Log Message: ----------- block: Update flags in bdrv_set_read_only() 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 <kw...@redhat.com> Reviewed-by: Eric Blake <ebl...@redhat.com> Reviewed-by: Alberto Garcia <be...@igalia.com> Commit: e35bdc123a4ace9f4d3fccaaf88907014e2438cd https://github.com/qemu/qemu/commit/e35bdc123a4ace9f4d3fccaaf88907014e2438cd Author: Kevin Wolf <kw...@redhat.com> Date: 2018-11-05 (Mon, 05 Nov 2018) Changed paths: M block.c M block/vvfat.c M blockdev.c M include/block/block.h M qapi/block-core.json Log Message: ----------- block: Add auto-read-only option 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 reopen them read-write if they are on read-write storage. However, without option inheritance, reopen only changes the read-only option for the root node (typically the format layer), but not the protocol layer, so reopening fails (the format layer wants to get write permissions, but the protocol layer is still read-only). A simple workaround for the problem in the management tool would be to open the protocol layer always read-write and to make only the format layer read-only for backing files. However, sometimes the file is actually stored on read-only storage and we don't know whether the image can be opened read-write (for example, for NBD it depends on the server we're trying to connect to). This adds an option that makes QEMU try to open the image read-write, but allows it to degrade to a read-only mode without returning an error. The documentation for this option is consciously phrased in a way that allows QEMU to switch to a better model eventually: Instead of trying when the image is first opened, making the read-only flag dynamic and changing it automatically whenever the first BLK_PERM_WRITE user is attached or the last one is detached would be much more useful behaviour. Unfortunately, this more useful behaviour is also a lot harder to implement, and libvirt needs a solution now before it can switch to -blockdev, so let's start with this easier approach for now. Instead of adding a new auto-read-only option, turning the existing read-only into an enum (with a bool alternate for compatibility) was considered, but it complicated the implementation to the point that it didn't seem to be worth it. Signed-off-by: Kevin Wolf <kw...@redhat.com> Reviewed-by: Eric Blake <ebl...@redhat.com> Commit: a51b9c4862c29f427931f45ee1d39ac1663ba859 https://github.com/qemu/qemu/commit/a51b9c4862c29f427931f45ee1d39ac1663ba859 Author: Kevin Wolf <kw...@redhat.com> Date: 2018-11-05 (Mon, 05 Nov 2018) Changed paths: M block/rbd.c Log Message: ----------- rbd: Close image in qemu_rbd_open() error path 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. Signed-off-by: Kevin Wolf <kw...@redhat.com> Reviewed-by: Eric Blake <ebl...@redhat.com> Commit: eaa2410f1ea864609090c0a5fda9e0ce9499da79 https://github.com/qemu/qemu/commit/eaa2410f1ea864609090c0a5fda9e0ce9499da79 Author: Kevin Wolf <kw...@redhat.com> Date: 2018-11-05 (Mon, 05 Nov 2018) Changed paths: M block.c M block/bochs.c M block/cloop.c M block/dmg.c M block/rbd.c M block/vvfat.c M include/block/block.h Log Message: ----------- block: Require auto-read-only for existing fallbacks 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. This is the only use of bdrv_set_read_only(), so we can make it a bit more specific and turn it into a bdrv_apply_auto_read_only() that is more convenient for drivers to use. Signed-off-by: Kevin Wolf <kw...@redhat.com> Reviewed-by: Eric Blake <ebl...@redhat.com> Commit: 6c2e581d4d7751f035e9bac0384703879c8a1538 https://github.com/qemu/qemu/commit/6c2e581d4d7751f035e9bac0384703879c8a1538 Author: Kevin Wolf <kw...@redhat.com> Date: 2018-11-05 (Mon, 05 Nov 2018) Changed paths: M block/nbd-client.c Log Message: ----------- nbd: Support auto-read-only option 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 <kw...@redhat.com> Reviewed-by: Eric Blake <ebl...@redhat.com> Commit: 64107dc044a54ebe46348ac0fe87584be2eb3e81 https://github.com/qemu/qemu/commit/64107dc044a54ebe46348ac0fe87584be2eb3e81 Author: Kevin Wolf <kw...@redhat.com> Date: 2018-11-05 (Mon, 05 Nov 2018) Changed paths: M block/file-posix.c Log Message: ----------- file-posix: Support auto-read-only option 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 <kw...@redhat.com> Reviewed-by: Eric Blake <ebl...@redhat.com> Commit: 6ceef36acb11819b255732b1de0ca62885da04bd https://github.com/qemu/qemu/commit/6ceef36acb11819b255732b1de0ca62885da04bd Author: Kevin Wolf <kw...@redhat.com> Date: 2018-11-05 (Mon, 05 Nov 2018) Changed paths: M block/curl.c Log Message: ----------- curl: Support auto-read-only option If read-only=off, but auto-read-only=on is given, just degrade to read-only. Signed-off-by: Kevin Wolf <kw...@redhat.com> Reviewed-by: Eric Blake <ebl...@redhat.com> Commit: 54ea21bd16202c4a3e43c67b573b5d1aa2ec1c0c https://github.com/qemu/qemu/commit/54ea21bd16202c4a3e43c67b573b5d1aa2ec1c0c Author: Kevin Wolf <kw...@redhat.com> Date: 2018-11-05 (Mon, 05 Nov 2018) Changed paths: M block/gluster.c Log Message: ----------- gluster: Support auto-read-only option 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 <kw...@redhat.com> Reviewed-by: Niels de Vos <nde...@redhat.com> Commit: 8f3bf50d340372662a35564c669e567c6c846943 https://github.com/qemu/qemu/commit/8f3bf50d340372662a35564c669e567c6c846943 Author: Kevin Wolf <kw...@redhat.com> Date: 2018-11-05 (Mon, 05 Nov 2018) Changed paths: M block/iscsi.c Log Message: ----------- iscsi: Support auto-read-only option 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 <kw...@redhat.com> Reviewed-by: Eric Blake <ebl...@redhat.com> Commit: 9384a444f6ebcd66bba0ae3c8434120d03c8dfea https://github.com/qemu/qemu/commit/9384a444f6ebcd66bba0ae3c8434120d03c8dfea Author: Kevin Wolf <kw...@redhat.com> Date: 2018-11-05 (Mon, 05 Nov 2018) Changed paths: M blockdev.c Log Message: ----------- block: Make auto-read-only=on default for -drive 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 images for read-only guest devices without having to specify read-only=on explicitly. If they try to attach the image to a read-write device, they will still get an error message. Signed-off-by: Kevin Wolf <kw...@redhat.com> Reviewed-by: Eric Blake <ebl...@redhat.com> Commit: 36f808fa15f85a894c2f6cce9df46d27e8f0f129 https://github.com/qemu/qemu/commit/36f808fa15f85a894c2f6cce9df46d27e8f0f129 Author: Kevin Wolf <kw...@redhat.com> Date: 2018-11-05 (Mon, 05 Nov 2018) Changed paths: A tests/qemu-iotests/232 A tests/qemu-iotests/232.out M tests/qemu-iotests/group Log Message: ----------- qemu-iotests: Test auto-read-only with -drive and -blockdev Signed-off-by: Kevin Wolf <kw...@redhat.com> Reviewed-by: Eric Blake <ebl...@redhat.com> Commit: 638987127db0e3b0c23e86cb9dcc19f988d84be4 https://github.com/qemu/qemu/commit/638987127db0e3b0c23e86cb9dcc19f988d84be4 Author: Max Reitz <mre...@redhat.com> Date: 2018-11-05 (Mon, 05 Nov 2018) Changed paths: M include/qemu/option.h M qemu-img.c M tests/qemu-iotests/082.out M util/qemu-option.c Log Message: ----------- option: Make option help nicer to read 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 patch also restores the description alignment we had before commit 9cbef9d68ee1d8d0, just at 24 instead of 16 characters like we used to. This increase is because now we have the type and two spaces of indentation before the description, and with a usual type name length of three chracters, this sums up to eight additional characters -- which means that we now need 24 characters to get the same amount of padding for most options. Also, 24 is a third of 80, which makes it kind of a round number in terminal terms. Finally, this patch amends the reference output of iotest 082 to match the changes (and thus makes it pass again). Signed-off-by: Max Reitz <mre...@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lur...@redhat.com> Signed-off-by: Kevin Wolf <kw...@redhat.com> Commit: 8513ec28beda57a8e037b811a681a2b54d9be80f https://github.com/qemu/qemu/commit/8513ec28beda57a8e037b811a681a2b54d9be80f Author: Max Reitz <mre...@redhat.com> Date: 2018-11-05 (Mon, 05 Nov 2018) Changed paths: M chardev/char.c Log Message: ----------- chardev: Indent list of chardevs Following the example of qemu_opts_print_help(), indent all entries in the list of character devices. Signed-off-by: Max Reitz <mre...@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lur...@redhat.com> Signed-off-by: Kevin Wolf <kw...@redhat.com> Commit: 9c2762b406b088608561a72a85d52a036c7bf29a https://github.com/qemu/qemu/commit/9c2762b406b088608561a72a85d52a036c7bf29a Author: Max Reitz <mre...@redhat.com> Date: 2018-11-05 (Mon, 05 Nov 2018) Changed paths: M qdev-monitor.c Log Message: ----------- qdev-monitor: Make device options help nicer 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 parentheses, because that is what we do everywhere else. This does look a bit funny here because basically all bits have the description "on/off", but funny does not mean it is less readable. Signed-off-by: Max Reitz <mre...@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lur...@redhat.com> Signed-off-by: Kevin Wolf <kw...@redhat.com> Commit: da3273adcde967b53de6bb6d6b4af607cbccff8a https://github.com/qemu/qemu/commit/da3273adcde967b53de6bb6d6b4af607cbccff8a Author: Max Reitz <mre...@redhat.com> Date: 2018-11-05 (Mon, 05 Nov 2018) Changed paths: M vl.c Log Message: ----------- object: Make option help nicer to read 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. Signed-off-by: Max Reitz <mre...@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lur...@redhat.com> Signed-off-by: Kevin Wolf <kw...@redhat.com> Commit: 679be303f7b40accfd8040c059680f253fc3c3b5 https://github.com/qemu/qemu/commit/679be303f7b40accfd8040c059680f253fc3c3b5 Author: Max Reitz <mre...@redhat.com> Date: 2018-11-05 (Mon, 05 Nov 2018) Changed paths: M vl.c Log Message: ----------- fw_cfg: Drop newline in @file description There is no good reason why there should be a newline in this description, so remove it. Signed-off-by: Max Reitz <mre...@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <phi...@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lur...@redhat.com> Signed-off-by: Kevin Wolf <kw...@redhat.com> Commit: 3dd5b8f4718c6ca1eadb16dd67a8cad76455ddb0 https://github.com/qemu/qemu/commit/3dd5b8f4718c6ca1eadb16dd67a8cad76455ddb0 Author: Leonid Bloch <lbl...@janustech.com> Date: 2018-11-05 (Mon, 05 Nov 2018) Changed paths: M block/vdi.c Log Message: ----------- vdi: Use a literal number of bytes for DEFAULT_CLUSTER_SIZE 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 value. Signed-off-by: Leonid Bloch <lbl...@janustech.com> Reviewed-by: Stefan Weil <s...@weilnetz.de> Signed-off-by: Kevin Wolf <kw...@redhat.com> Commit: 1240ac558d348f6c7a5752b1a57c1da58e4efe3e https://github.com/qemu/qemu/commit/1240ac558d348f6c7a5752b1a57c1da58e4efe3e Author: Leonid Bloch <lbl...@janustech.com> Date: 2018-11-05 (Mon, 05 Nov 2018) Changed paths: M include/qemu/units.h Log Message: ----------- include: Add a comment to explain the origin of sizes' lookup table 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 stringification of sizes. Beyond that, it is convenient to use these shortcuts for all power-of-two sizes, even if they don't have to be literal numbers. Despite its convenience, this table introduced 55 lines of "dumb" code, the purpose and origin of which are obscure without reading the message of the commit which introduced it. This patch fixes that by adding a comment to the code itself with a brief explanation for the reasoning behind this table. This comment includes the short AWK script that generated the table, so that anyone who's interested could make sure that the values in it are correct (otherwise these values look as if they were typed manually). Signed-off-by: Leonid Bloch <lbl...@janustech.com> Signed-off-by: Kevin Wolf <kw...@redhat.com> Commit: 3cb99f4124faeca3235bd76ba2879ad091b43a50 https://github.com/qemu/qemu/commit/3cb99f4124faeca3235bd76ba2879ad091b43a50 Author: Peter Maydell <peter.mayd...@linaro.org> Date: 2018-11-05 (Mon, 05 Nov 2018) Changed paths: M block.c M block/block-backend.c M block/bochs.c M block/cloop.c M block/curl.c M block/dmg.c M block/file-posix.c M block/gluster.c M block/iscsi.c M block/nbd-client.c M block/qcow.c M block/qcow2-bitmap.c M block/qcow2.c M block/quorum.c M block/rbd.c M block/vdi.c M block/vhdx-endian.c M block/vhdx-log.c M block/vhdx.c M block/vhdx.h M block/vpc.c M block/vvfat.c M blockdev.c M chardev/char.c M crypto/block-qcow.c M include/block/block.h M include/qemu/option.h M include/qemu/units.h M include/sysemu/block-backend.h M qapi/block-core.json M qdev-monitor.c M qemu-img.c M qemu-io-cmds.c M tests/qemu-iotests/081 M tests/qemu-iotests/081.out M tests/qemu-iotests/082.out M tests/qemu-iotests/083 A tests/qemu-iotests/232 A tests/qemu-iotests/232.out M tests/qemu-iotests/group M util/qemu-option.c M vl.c Log Message: ----------- Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging Block layer patches: - auto-read-only option to fix commit job when used with -blockdev - Fix help text related qemu-iotests failure (by improving the help text and updating the reference output) - quorum: Add missing checks when adding/removing child nodes - Don't take address of fields in packed structs - vvfat: Fix crash when reporting error about too many files in directory # gpg: Signature made Mon 05 Nov 2018 15:35:25 GMT # 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: (36 commits) include: Add a comment to explain the origin of sizes' lookup table vdi: Use a literal number of bytes for DEFAULT_CLUSTER_SIZE fw_cfg: Drop newline in @file description object: Make option help nicer to read qdev-monitor: Make device options help nicer chardev: Indent list of chardevs option: Make option help nicer to read qemu-iotests: Test auto-read-only with -drive and -blockdev block: Make auto-read-only=on default for -drive iscsi: Support auto-read-only option gluster: Support auto-read-only option curl: Support auto-read-only option file-posix: Support auto-read-only option nbd: Support auto-read-only option block: Require auto-read-only for existing fallbacks rbd: Close image in qemu_rbd_open() error path block: Add auto-read-only option block: Update flags in bdrv_set_read_only() iotest: Test x-blockdev-change on a Quorum quorum: Forbid adding children in blkverify mode ... Signed-off-by: Peter Maydell <peter.mayd...@linaro.org> Compare: https://github.com/qemu/qemu/compare/b2f7a038bb4c...3cb99f4124fa **NOTE:** This service has been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/ Functionality will be removed from GitHub.com on January 31st, 2019.