qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] e917e2: mirror: Release the dirty bitmap if m


From: Peter Maydell
Subject: [Qemu-commits] [qemu/qemu] e917e2: mirror: Release the dirty bitmap if mirror_start_j...
Date: Fri, 01 Feb 2019 11:05:23 -0800

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: e917e2cb2a1715233d173de57a889808b703091e
      
https://github.com/qemu/qemu/commit/e917e2cb2a1715233d173de57a889808b703091e
  Author: Alberto Garcia <address@hidden>
  Date:   2019-02-01 (Fri, 01 Feb 2019)

  Changed paths:
    M block/mirror.c

  Log Message:
  -----------
  mirror: Release the dirty bitmap if mirror_start_job() fails

At the moment I don't see how to make this function fail after the
dirty bitmap has been created, but if that was possible then we would
hit the assert(QLIST_EMPTY(&bs->dirty_bitmaps)) in bdrv_close().

Signed-off-by: Alberto Garcia <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 67b24427fe581d836946f06c69d68511e1118bd1
      
https://github.com/qemu/qemu/commit/67b24427fe581d836946f06c69d68511e1118bd1
  Author: Alberto Garcia <address@hidden>
  Date:   2019-02-01 (Fri, 01 Feb 2019)

  Changed paths:
    M block/mirror.c
    M tests/qemu-iotests/141.out

  Log Message:
  -----------
  mirror: Block the source BlockDriverState in mirror_start_job()

The mirror_start_job() function used for the commit-active job blocks
the source, target and all intermediate nodes for the duration of the
job.

   target <- intermediate <- source

Since 4ef85a9c2339 this function creates a dummy mirror_top_bs that
goes on top of the source node, and it is this dummy node that gets
blocked instead. The source node is never blocked or added to the
job's list of nodes.

   target <- intermediate <- source <- mirror_top

At the moment I don't think it is possible to exploit this problem
because any additional job on 'source' would either be forbidden for
other reasons or it would need to involve an additional node that is
blocked, causing an error.

This can be seen in the error messages, however, because they never
refer to the source node being blocked:

  $ qemu-img create -f qcow2 hd0.qcow2 1M
  $ qemu-img create -f qcow2 -b hd0.qcow2 hd1.qcow2
  $ qemu-io -c 'write 0 1M' hd0.qcow2
  $ $QEMU -drive if=none,file=hd1.qcow2,node-name=hd1
  { "execute": "qmp_capabilities" }
  { "execute": "block-commit", "arguments": {"device": "hd1", "speed": 256}}
  { "execute": "block-stream", "arguments": {"device": "hd1"}}
  { "error": {"class": "GenericError",
    "desc": "Node 'hd0' is busy: block device is in use by block job: commit"}}

After this patch the error message refers to 'hd1', as it should.

The expected output of iotest 141 also needs to be updated for the
same reason.

Signed-off-by: Alberto Garcia <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: cdc674c7360b59486f5e5aaaa44f7395d2e15888
      
https://github.com/qemu/qemu/commit/cdc674c7360b59486f5e5aaaa44f7395d2e15888
  Author: Alberto Garcia <address@hidden>
  Date:   2019-02-01 (Fri, 01 Feb 2019)

  Changed paths:
    M block/qcow2-refcount.c

  Log Message:
  -----------
  qcow2: Assert that refcount block offsets fit in the refcount table

Refcount table entries have a field to store the offset of the
refcount block. The rest of the bits of the entry are currently
reserved.

The offset is always taken from the entry using REFT_OFFSET_MASK to
ensure that we only use the bits that belong to that field.

While that mask is used every time we read from the refcount table, it
is never used when we write to it. Due to the other constraints of the
qcow2 format QEMU can never produce refcount block offsets that don't
fit in that field so any such offset when allocating a refcount block
would indicate a bug in QEMU.

Signed-off-by: Alberto Garcia <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 76f1cf0a5e279a28fb833104b97ea561e4293c47
      
https://github.com/qemu/qemu/commit/76f1cf0a5e279a28fb833104b97ea561e4293c47
  Author: yuchenlin <address@hidden>
  Date:   2019-02-01 (Fri, 01 Feb 2019)

  Changed paths:
    A tests/qemu-iotests/239
    A tests/qemu-iotests/239.out
    M tests/qemu-iotests/check
    M tests/qemu-iotests/group
    A tests/qemu-iotests/sample_images/simple-dmg.dmg.bz2

  Log Message:
  -----------
  qemu-iotests: add test case for dmg

Recently, some bugs in dmg file have been fixed. To prevent reading dmg
is broken someday in the future, add a simple test which ensures the
conversion from dmg to raw should not hang or face any I/O error.

Signed-off-by: yuchenlin <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 4e20c1becba3fd2e8e71a2663cefb9627fd2a6e0
      
https://github.com/qemu/qemu/commit/4e20c1becba3fd2e8e71a2663cefb9627fd2a6e0
  Author: Markus Armbruster <address@hidden>
  Date:   2019-02-01 (Fri, 01 Feb 2019)

  Changed paths:
    M block/blklogwrites.c

  Log Message:
  -----------
  block: Replace qdict_put() by qdict_put_obj() where appropriate

Patch created mechanically by rerunning:

  $  spatch --sp-file scripts/coccinelle/qobject.cocci \
            --macro-file scripts/cocci-macro-file.h \
            --dir block --in-place

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Alberto Garcia <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 4720cbeea1f42fd905fc69338fd42b191e58b412
      
https://github.com/qemu/qemu/commit/4720cbeea1f42fd905fc69338fd42b191e58b412
  Author: Kevin Wolf <address@hidden>
  Date:   2019-02-01 (Fri, 01 Feb 2019)

  Changed paths:
    M block.c
    M block/block-backend.c
    M block/io.c
    M block/nbd-client.c
    M block/nvme.c
    M block/qcow2.c
    M block/qed.c
    M tests/Makefile.include
    A tests/test-block-iothread.c

  Log Message:
  -----------
  block: Fix hangs in synchronous APIs with iothreads

In the block layer, synchronous APIs are often implemented by creating a
coroutine that calls the asynchronous coroutine-based implementation and
then waiting for completion with BDRV_POLL_WHILE().

For this to work with iothreads (more specifically, when the synchronous
API is called in a thread that is not the home thread of the block
device, so that the coroutine will run in a different thread), we must
make sure to call aio_wait_kick() at the end of the operation. Many
places are missing this, so that BDRV_POLL_WHILE() keeps hanging even if
the condition has long become false.

Note that bdrv_dec_in_flight() involves an aio_wait_kick() call. This
corresponds to the BDRV_POLL_WHILE() in the drain functions, but it is
generally not enough for most other operations because they haven't set
the return value in the coroutine entry stub yet. To avoid race
conditions there, we need to kick after setting the return value.

The race window is small enough that the problem doesn't usually surface
in the common path. However, it does surface and causes easily
reproducible hangs if the operation can return early before even calling
bdrv_inc/dec_in_flight, which many of them do (trivial error or no-op
success paths).

The bug in bdrv_truncate(), bdrv_check() and bdrv_invalidate_cache() is
slightly different: These functions even neglected to schedule the
coroutine in the home thread of the node. This avoids the hang, but is
obviously wrong, too. Fix those to schedule the coroutine in the right
AioContext in addition to adding aio_wait_kick() calls.

Cc: address@hidden
Signed-off-by: Kevin Wolf <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>


  Commit: 9a378495c3cde80aba9299ceab55338d7e78691d
      
https://github.com/qemu/qemu/commit/9a378495c3cde80aba9299ceab55338d7e78691d
  Author: Max Reitz <address@hidden>
  Date:   2019-02-01 (Fri, 01 Feb 2019)

  Changed paths:
    M tests/qemu-iotests/234
    M tests/qemu-iotests/234.out

  Log Message:
  -----------
  iotests: Make 234 stable

This test waits for a MIGRATION event with status=completed on the
source VM before querying the migration status on both source and
destination.  However, just because the source says migration has
completed does not mean the destination thinks the same.  Therefore, in
some cases, the destination VM may still report "active" instead of
"completed" when asked for its migration status.

Fix this by enabling migration events on both VMs and waiting until both
source and destination emit a status=completed MIGRATION event.

Signed-off-by: Max Reitz <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 5be28490cad988c3882054fc02e87a40a94863f7
      
https://github.com/qemu/qemu/commit/5be28490cad988c3882054fc02e87a40a94863f7
  Author: Fam Zheng <address@hidden>
  Date:   2019-02-01 (Fri, 01 Feb 2019)

  Changed paths:
    M block/vmdk.c

  Log Message:
  -----------
  vmdk: Refactor vmdk_create_extent

The extracted vmdk_init_extent takes a BlockBackend object and
initializes the format metadata. It is the common part between "qemu-img
create" and "blockdev-create".

Add a "BlockBackend *pbb" parameter to vmdk_create_extent, to return the
opened BB to the caller in the next patch.

Signed-off-by: Fam Zheng <address@hidden>
Reviewed-by: Markus Armbruster <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 3015372dd09642b911f48d942d1e27fc655b1f22
      
https://github.com/qemu/qemu/commit/3015372dd09642b911f48d942d1e27fc655b1f22
  Author: Fam Zheng <address@hidden>
  Date:   2019-02-01 (Fri, 01 Feb 2019)

  Changed paths:
    M block/vmdk.c
    M qapi/block-core.json
    M qapi/qapi-schema.json

  Log Message:
  -----------
  vmdk: Implement .bdrv_co_create callback

This makes VMDK support blockdev-create. The implementation reuses the
image creation code in vmdk_co_create_opts which now acceptes a callback
pointer to "retrieve" BlockBackend pointers from the caller. This way we
separate the logic between file/extent acquisition and initialization.

The QAPI command parameters are mostly the same as the old create_opts
except the dropped legacy @compat6 switch, which is redundant with
@hwversion.

Signed-off-by: Fam Zheng <address@hidden>
Reviewed-by: Markus Armbruster <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: bab4feb2fac98e865b8009ede71cf1b7f1ac430c
      
https://github.com/qemu/qemu/commit/bab4feb2fac98e865b8009ede71cf1b7f1ac430c
  Author: Fam Zheng <address@hidden>
  Date:   2019-02-01 (Fri, 01 Feb 2019)

  Changed paths:
    M tests/qemu-iotests/common.filter
    M tests/qemu-iotests/iotests.py

  Log Message:
  -----------
  iotests: Filter cid numbers in VMDK extent info

Signed-off-by: Fam Zheng <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 1c4e7b640ba250edf0f7469ec8588a1df6dc95e5
      
https://github.com/qemu/qemu/commit/1c4e7b640ba250edf0f7469ec8588a1df6dc95e5
  Author: Kevin Wolf <address@hidden>
  Date:   2019-02-01 (Fri, 01 Feb 2019)

  Changed paths:
    A tests/qemu-iotests/237
    A tests/qemu-iotests/237.out
    M tests/qemu-iotests/group

  Log Message:
  -----------
  iotests: Add VMDK tests for blockdev-create

Signed-off-by: Fam Zheng <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 4a960ece17c94989d4082f5d3d8c32b34eded57c
      
https://github.com/qemu/qemu/commit/4a960ece17c94989d4082f5d3d8c32b34eded57c
  Author: Kevin Wolf <address@hidden>
  Date:   2019-02-01 (Fri, 01 Feb 2019)

  Changed paths:
    M block/vmdk.c
    M qapi/block-core.json
    M tests/qemu-iotests/237
    M tests/qemu-iotests/237.out

  Log Message:
  -----------
  vmdk: Reject excess extents in blockdev-create

Clarify that the number of extents provided in BlockdevCreateOptionsVmdk
must match the number of extents that will actually be used. Providing
more extents will result in an error now.

This requires adapting the test case to provide the right number of
extents.

Signed-off-by: Kevin Wolf <address@hidden>
Reviewed-by: Markus Armbruster <address@hidden>


  Commit: 0dbaaa7981e92a6b629b1cf0056dcafadd6ee8a5
      
https://github.com/qemu/qemu/commit/0dbaaa7981e92a6b629b1cf0056dcafadd6ee8a5
  Author: Peter Maydell <address@hidden>
  Date:   2019-02-01 (Fri, 01 Feb 2019)

  Changed paths:
    M block/vpc.c

  Log Message:
  -----------
  block/vpc: 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 generating the
UUID into a local variable which is definitely safely aligned and
then copying it into place.

Signed-off-by: Peter Maydell <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: ac928b8ee875f1ac256702a2b93c8eb828ddaff2
      
https://github.com/qemu/qemu/commit/ac928b8ee875f1ac256702a2b93c8eb828ddaff2
  Author: Peter Maydell <address@hidden>
  Date:   2019-02-01 (Fri, 01 Feb 2019)

  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.

Instead of passing UUID related functions the address of a possibly
unaligned QemuUUID struct, use local variables and then copy to/from
the struct field as appropriate.

Signed-off-by: Peter Maydell <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 1324f06384870fdd6e5829dc4f775afe4de61867
      
https://github.com/qemu/qemu/commit/1324f06384870fdd6e5829dc4f775afe4de61867
  Author: Peter Maydell <address@hidden>
  Date:   2019-02-01 (Fri, 01 Feb 2019)

  Changed paths:
    M block/vdi.c
    M hw/acpi/vmgenid.c
    M include/qemu/uuid.h
    M tests/vmgenid-test.c
    M util/uuid.c

  Log Message:
  -----------
  uuid: Make qemu_uuid_bswap() take and return a QemuUUID

Currently qemu_uuid_bswap() takes a pointer to the QemuUUID to
be byte-swapped. This means it can't be used when the UUID
to be swapped is in a packed member of a struct. It's also
out of line with the general bswap*() functions we provide
in bswap.h, which take the value to be swapped and return it.

Make qemu_uuid_bswap() take a QemuUUID and return the swapped version.

This fixes some clang warnings about taking the address of
a packed struct member in block/vdi.c.

Signed-off-by: Peter Maydell <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Reviewed-by: Marc-André Lureau <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 8be25de64315ef768353eb61f2b2bf6cddc34230
      
https://github.com/qemu/qemu/commit/8be25de64315ef768353eb61f2b2bf6cddc34230
  Author: Kevin Wolf <address@hidden>
  Date:   2019-02-01 (Fri, 01 Feb 2019)

  Changed paths:
    M block.c

  Log Message:
  -----------
  block: Apply auto-read-only for ro-whitelist drivers

If QEMU was configured with a driver in --block-drv-ro-whitelist, trying
to use that driver read-write resulted in an error message even if
auto-read-only=on was set.

Consider auto-read-only=on for the whitelist checking and use it to
automatically degrade to read-only for block drivers on the read-only
whitelist.

Signed-off-by: Kevin Wolf <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>


  Commit: d09ea2d22786e97c5c03cd4d4888f06bb89f8dc7
      
https://github.com/qemu/qemu/commit/d09ea2d22786e97c5c03cd4d4888f06bb89f8dc7
  Author: Thomas Huth <address@hidden>
  Date:   2019-02-01 (Fri, 01 Feb 2019)

  Changed paths:
    M block/block-backend.c
    M include/sysemu/block-backend.h

  Log Message:
  -----------
  block: Remove blk_attach_dev_legacy() / legacy_dev code

The last user of blk_attach_dev_legacy() was the code in xen_disk which
has recently been reworked. Now there is no user for this legacy function
anymore. Thus we can finally remove all code related to the "legacy_dev"
flag, too, and turn the related "void *" in block-backend.c into proper
"DeviceState *" to fix some of the remaining TODOs there.

Signed-off-by: Thomas Huth <address@hidden>
Reviewed-by: Stefano Garzarella <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 14632122b82150d42cefac04a219bbead59bc4a7
      
https://github.com/qemu/qemu/commit/14632122b82150d42cefac04a219bbead59bc4a7
  Author: Markus Armbruster <address@hidden>
  Date:   2019-02-01 (Fri, 01 Feb 2019)

  Changed paths:
    M block/qcow2.h
    M block/vdi.c
    M include/qemu/units.h

  Log Message:
  -----------
  block: Eliminate the S_1KiB, S_2KiB, ... macros

We define 54 macros for the powers of two >= 1024.  We use six, in six
macro definitions.  Four of them could just as well use the common MiB
macro, so do that.  The remaining two can't, because they get passed
to stringify.  Replace the macro by the literal number there.
Slightly harder to read in one instance (1048576 vs. S_1MiB), so add a
comment there.  The other instance is a wash: 65536 vs S_64KiB.  65536
has been good enough for more than seven years there.

This effectively reverts commit 540b8492618 and 1240ac558d3.

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Alberto Garcia <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: a6f230c8d13a7ff3a0c7f1097412f44bfd9eff0b
      
https://github.com/qemu/qemu/commit/a6f230c8d13a7ff3a0c7f1097412f44bfd9eff0b
  Author: Alberto Garcia <address@hidden>
  Date:   2019-02-01 (Fri, 01 Feb 2019)

  Changed paths:
    M hw/scsi/virtio-scsi.c
    A tests/qemu-iotests/240
    A tests/qemu-iotests/240.out
    M tests/qemu-iotests/group

  Log Message:
  -----------
  virtio-scsi: Move BlockBackend back to the main AioContext on unplug

This fixes a crash when attaching a disk to a SCSI device using
iothreads, then detaching it and reattaching it again. Test case
included.

Signed-off-by: Alberto Garcia <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 3ff35ba391134e4e43ab96152deb38a62e62f858
      
https://github.com/qemu/qemu/commit/3ff35ba391134e4e43ab96152deb38a62e62f858
  Author: Alberto Garcia <address@hidden>
  Date:   2019-02-01 (Fri, 01 Feb 2019)

  Changed paths:
    M hw/scsi/scsi-disk.c
    M tests/qemu-iotests/240
    M tests/qemu-iotests/240.out

  Log Message:
  -----------
  scsi-disk: Acquire the AioContext in scsi_*_realize()

This fixes a crash when attaching two disks with the same blockdev to
a SCSI device that is using iothreads. Test case included.

Signed-off-by: Alberto Garcia <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: eb97813ff5fd5bdffc8ed9f5be5a3a50eae70a2c
      
https://github.com/qemu/qemu/commit/eb97813ff5fd5bdffc8ed9f5be5a3a50eae70a2c
  Author: Alberto Garcia <address@hidden>
  Date:   2019-02-01 (Fri, 01 Feb 2019)

  Changed paths:
    M hw/scsi/virtio-scsi.c
    M tests/qemu-iotests/240
    M tests/qemu-iotests/240.out

  Log Message:
  -----------
  virtio-scsi: Forbid devices with different iothreads sharing a blockdev

This patch forbids attaching a disk to a SCSI device if its using a
different AioContext. Test case included.

Signed-off-by: Alberto Garcia <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: fff2388d5d9caecca6200455d0ab6d5e13f4e9bd
      
https://github.com/qemu/qemu/commit/fff2388d5d9caecca6200455d0ab6d5e13f4e9bd
  Author: Max Reitz <address@hidden>
  Date:   2019-02-01 (Fri, 01 Feb 2019)

  Changed paths:
    M tests/qemu-iotests/229
    M tests/qemu-iotests/229.out

  Log Message:
  -----------
  iotests: Filter second BLOCK_JOB_ERROR from 229

Without this filter, this test sometimes fails.

Signed-off-by: Max Reitz <address@hidden>
Reviewed-by: John Snow <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 039be85c410bfb4b53cdee2083b4245e0d4e4181
      
https://github.com/qemu/qemu/commit/039be85c410bfb4b53cdee2083b4245e0d4e4181
  Author: John Snow <address@hidden>
  Date:   2019-02-01 (Fri, 01 Feb 2019)

  Changed paths:
    M tests/qemu-iotests/236.out
    M tests/qemu-iotests/iotests.py

  Log Message:
  -----------
  iotests/236: fix transaction kwarg order

It's not enough to order the kwargs for consistent QMP log output,
we must also sort any sub-dictionaries in lists that appear as values.

Reported-by: Kevin Wolf <address@hidden>
Signed-off-by: John Snow <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Vladimir Sementsov-Ogievskiy <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 78fc3b3a26c145eebcdee992988644974b243a74
      
https://github.com/qemu/qemu/commit/78fc3b3a26c145eebcdee992988644974b243a74
  Author: Kevin Wolf <address@hidden>
  Date:   2019-02-01 (Fri, 01 Feb 2019)

  Changed paths:
    M block.c

  Log Message:
  -----------
  block: Fix invalidate_cache error path for parent activation

bdrv_co_invalidate_cache() clears the BDRV_O_INACTIVE flag before
actually activating a node so that the correct permissions etc. are
taken. In case of errors, the flag must be restored so that the next
call to bdrv_co_invalidate_cache() retries activation.

Restoring the flag was missing in the error path for a failed
parent->role->activate() call. The consequence is that this attempt to
activate all images correctly fails because we still set errp, however
on the next attempt BDRV_O_INACTIVE is already clear, so we return
success without actually retrying the failed action.

An example where this is observable in practice is migration to a QEMU
instance that has a raw format block node attached to a guest device
with share-rw=off (the default) while another process holds
BLK_PERM_WRITE for the same image. In this case, all activation steps
before parent->role->activate() succeed because raw can tolerate other
writers to the image. Only the parent callback (in particular
blk_root_activate()) tries to implement the share-rw=on property and
requests exclusive write permissions. This fails when the migration
completes and correctly displays an error. However, a manual 'cont' will
incorrectly resume the VM without calling blk_root_activate() again.

This case is described in more detail in the following bug report:
https://bugzilla.redhat.com/show_bug.cgi?id=1531888

Fix this by correctly restoring the BDRV_O_INACTIVE flag in the error
path.

Cc: address@hidden
Signed-off-by: Kevin Wolf <address@hidden>
Tested-by: Markus Armbruster <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>


  Commit: a5df73baaf27a2aa4a911545ee1ee6286a5372e4
      
https://github.com/qemu/qemu/commit/a5df73baaf27a2aa4a911545ee1ee6286a5372e4
  Author: Alberto Garcia <address@hidden>
  Date:   2019-02-01 (Fri, 01 Feb 2019)

  Changed paths:
    M scripts/qtest.py

  Log Message:
  -----------
  qtest.py: Wait for the result of qtest commands

The cmd() method of the QEMUQtestProtocol class sends a qtest command
to QEMU but doesn't wait for the return message ("OK", "FAIL", "ERR").
Because of this, it can return control to the caller before the
command has actually finished.

In cases like clock_step or clock_set this means that cmd() can return
before all the timers triggered by the clock change have been fired.
This can be fixed by making cmd() wait for the output of the qtest
command.

This fixes iotests 093 and 136, which are flaky since commit
8258292e18c39480b64eba9f3551 when the machine is under heavy workload.

Signed-off-by: Alberto Garcia <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: a8f58afcdb86e266e06c9dc41a71605e570244c3
      
https://github.com/qemu/qemu/commit/a8f58afcdb86e266e06c9dc41a71605e570244c3
  Author: Kevin Wolf <address@hidden>
  Date:   2019-02-01 (Fri, 01 Feb 2019)

  Changed paths:
    M hw/scsi/scsi-disk.c

  Log Message:
  -----------
  scsi-disk: Don't use empty string as device id

scsi-disk includes in the Device Identification VPD page, depending on
configuration amongst others, a vendor specific designator that consists
either of the serial number if given or the BlockBackend name (which is
a host detail that better shouldn't have been leaked to the guest, but
now we have to maintain it for compatibility).

With anonymous BlockBackends, i.e. scsi-disk devices constructed with
drive=<node-name>, and no serial number explicitly specified, this ends
up as an empty string. If this happens to more than one disk, we have
accidentally signalled to the OS that this is a multipath setup, which
is obviously not what was intended.

Instead of using an empty string for the vendor specific designator,
simply leave out that designator, which makes Linux detect such setups
as separate disks again.

Signed-off-by: Kevin Wolf <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>


  Commit: 7471a649fc3a391dd497297013fb2525ca9821ba
      
https://github.com/qemu/qemu/commit/7471a649fc3a391dd497297013fb2525ca9821ba
  Author: Kevin Wolf <address@hidden>
  Date:   2019-02-01 (Fri, 01 Feb 2019)

  Changed paths:
    M hw/scsi/scsi-disk.c

  Log Message:
  -----------
  scsi-disk: Add device_id property

The new device_id property specifies which value to use for the vendor
specific designator in the Device Identification VPD page.

In particular, this is necessary for libvirt to maintain guest ABI
compatibility when no serial number is given and a VM is switched from
-drive (where the BlockBackend name is used) to -blockdev (where the
vendor specific designator is left out by default).

Signed-off-by: Kevin Wolf <address@hidden>
Reviewed-by: Eric Blake <address@hidden>


  Commit: b3fc0af1ff5e922d4dd7c875394dbd26dc7313b4
      
https://github.com/qemu/qemu/commit/b3fc0af1ff5e922d4dd7c875394dbd26dc7313b4
  Author: Peter Maydell <address@hidden>
  Date:   2019-02-01 (Fri, 01 Feb 2019)

  Changed paths:
    M block.c
    M block/blklogwrites.c
    M block/block-backend.c
    M block/io.c
    M block/mirror.c
    M block/nbd-client.c
    M block/nvme.c
    M block/qcow2-refcount.c
    M block/qcow2.c
    M block/qcow2.h
    M block/qed.c
    M block/vdi.c
    M block/vmdk.c
    M block/vpc.c
    M hw/acpi/vmgenid.c
    M hw/scsi/scsi-disk.c
    M hw/scsi/virtio-scsi.c
    M include/qemu/units.h
    M include/qemu/uuid.h
    M include/sysemu/block-backend.h
    M qapi/block-core.json
    M qapi/qapi-schema.json
    M scripts/qtest.py
    M tests/Makefile.include
    M tests/qemu-iotests/141.out
    M tests/qemu-iotests/229
    M tests/qemu-iotests/229.out
    M tests/qemu-iotests/234
    M tests/qemu-iotests/234.out
    M tests/qemu-iotests/236.out
    A tests/qemu-iotests/237
    A tests/qemu-iotests/237.out
    A tests/qemu-iotests/239
    A tests/qemu-iotests/239.out
    A tests/qemu-iotests/240
    A tests/qemu-iotests/240.out
    M tests/qemu-iotests/check
    M tests/qemu-iotests/common.filter
    M tests/qemu-iotests/group
    M tests/qemu-iotests/iotests.py
    A tests/qemu-iotests/sample_images/simple-dmg.dmg.bz2
    A tests/test-block-iothread.c
    M tests/vmgenid-test.c
    M util/uuid.c

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging

Block layer patches:

- vmdk: Support for blockdev-create
- block: Apply auto-read-only for ro-whitelist drivers
- virtio-scsi: Fixes related to attaching/detaching iothreads
- scsi-disk: Fixed erroneously detected multipath setup with multiple
  disks created with node-names. Added device_id property.
- block: Fix hangs in synchronous APIs with iothreads
- block: Fix invalidate_cache error path for parent activation
- block-backend, mirror, qcow2, vpc, vdi, qemu-iotests:
  Minor fixes and code improvements

# gpg: Signature made Fri 01 Feb 2019 15:23:10 GMT
# gpg:                using RSA key 7F09B272C88F2FD6
# gpg: Good signature from "Kevin Wolf <address@hidden>" [full]
# Primary key fingerprint: DC3D EB15 9A9A F95D 3D74  56FE 7F09 B272 C88F 2FD6

* remotes/kevin/tags/for-upstream: (27 commits)
  scsi-disk: Add device_id property
  scsi-disk: Don't use empty string as device id
  qtest.py: Wait for the result of qtest commands
  block: Fix invalidate_cache error path for parent activation
  iotests/236: fix transaction kwarg order
  iotests: Filter second BLOCK_JOB_ERROR from 229
  virtio-scsi: Forbid devices with different iothreads sharing a blockdev
  scsi-disk: Acquire the AioContext in scsi_*_realize()
  virtio-scsi: Move BlockBackend back to the main AioContext on unplug
  block: Eliminate the S_1KiB, S_2KiB, ... macros
  block: Remove blk_attach_dev_legacy() / legacy_dev code
  block: Apply auto-read-only for ro-whitelist drivers
  uuid: Make qemu_uuid_bswap() take and return a QemuUUID
  block/vdi: Don't take address of fields in packed structs
  block/vpc: Don't take address of fields in packed structs
  vmdk: Reject excess extents in blockdev-create
  iotests: Add VMDK tests for blockdev-create
  iotests: Filter cid numbers in VMDK extent info
  vmdk: Implement .bdrv_co_create callback
  vmdk: Refactor vmdk_create_extent
  ...

Signed-off-by: Peter Maydell <address@hidden>


Compare: https://github.com/qemu/qemu/compare/e83d74286cad...b3fc0af1ff5e



reply via email to

[Prev in Thread] Current Thread [Next in Thread]