qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] 5e7717: mirror: Confirm we're quiesced only i


From: Peter Maydell
Subject: [Qemu-commits] [qemu/qemu] 5e7717: mirror: Confirm we're quiesced only if the job is ...
Date: Tue, 19 Mar 2019 10:09:35 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 5e771752a1ffba3a99d7d75b6d492b4a86b59e1b
      
https://github.com/qemu/qemu/commit/5e771752a1ffba3a99d7d75b6d492b4a86b59e1b
  Author: Sergio Lopez <address@hidden>
  Date:   2019-03-19 (Tue, 19 Mar 2019)

  Changed paths:
    M block/mirror.c

  Log Message:
  -----------
  mirror: Confirm we're quiesced only if the job is paused or cancelled

While child_job_drained_begin() calls to job_pause(), the job doesn't
actually transition between states until it runs again and reaches a
pause point. This means bdrv_drained_begin() may return with some jobs
using the node still having 'busy == true'.

As a consequence, block_job_detach_aio_context() may get into a
deadlock, waiting for the job to be actually paused, while the coroutine
servicing the job is yielding and doesn't get the opportunity to get
scheduled again. This situation can be reproduced by issuing a
'block-commit' immediately followed by a 'device_del'.

To ensure bdrv_drained_begin() only returns when the jobs have been
paused, we change mirror_drained_poll() to only confirm it's quiesced
when job->paused == true and there aren't any in-flight requests, except
if we reached that point by a drained section initiated by the
mirror/commit job itself.

The other block jobs shouldn't need any changes, as the default
drained_poll() behavior is to only confirm it's quiesced if the job is
not busy or completed.

Signed-off-by: Sergio Lopez <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: a0cf83639c7adbdee08a5bac840c5aada019b8f3
      
https://github.com/qemu/qemu/commit/a0cf83639c7adbdee08a5bac840c5aada019b8f3
  Author: Kevin Wolf <address@hidden>
  Date:   2019-03-19 (Tue, 19 Mar 2019)

  Changed paths:
    M block/qcow2.c

  Log Message:
  -----------
  qcow2: Fix data file error condition in qcow2_co_create()

We were trying to check whether bdrv_open_blockdev_ref() returned
success, but accidentally checked the wrong variable. Spotted by
Coverity (CID 1399703).

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


  Commit: 1f46ab2e526d1fc0716c76dc78f2180fd68b09c1
      
https://github.com/qemu/qemu/commit/1f46ab2e526d1fc0716c76dc78f2180fd68b09c1
  Author: Vladimir Sementsov-Ogievskiy <address@hidden>
  Date:   2019-03-19 (Tue, 19 Mar 2019)

  Changed paths:
    M qapi/block-core.json

  Log Message:
  -----------
  qapi: fix block-latency-histogram-set description and examples

There no @device parameter, only the @id one.

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


  Commit: b69864e5a8c7b762e94d1bfd170b8774b28ab993
      
https://github.com/qemu/qemu/commit/b69864e5a8c7b762e94d1bfd170b8774b28ab993
  Author: Sam Eiderman <address@hidden>
  Date:   2019-03-19 (Tue, 19 Mar 2019)

  Changed paths:
    M block/vmdk.c

  Log Message:
  -----------
  vmdk: Support version=3 in VMDK descriptor files

Commit 509d39aa22909c0ed1aabf896865f19c81fb38a1 added support for read
only VMDKs of version 3.

This commit fixes the probe function to correctly handle descriptors of
version 3.

This commit has two effects:
    1. We no longer need to supply '-f vmdk' when pointing to descriptor
       files of version 3 in qemu/qemu-img command line arguments.
    2. This fixes the scenario where a VMDK points to a parent version 3
       descriptor file which is being probed as "raw" instead of "vmdk".

Reviewed-by: Arbel Moshe <address@hidden>
Reviewed-by: Mark Kanda <address@hidden>
Signed-off-by: Shmuel Eiderman <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 2345bde647a179ac88723e8e0c2fc1643b3a7a7e
      
https://github.com/qemu/qemu/commit/2345bde647a179ac88723e8e0c2fc1643b3a7a7e
  Author: Kevin Wolf <address@hidden>
  Date:   2019-03-19 (Tue, 19 Mar 2019)

  Changed paths:
    M block.c

  Log Message:
  -----------
  block: Silence Coverity in bdrv_drop_intermediate()

Coverity doesn't like that the return value of bdrv_check_update_perm()
stays unused only in this place (CID 1399710).

Even if checking local_err should be equivalent to checking ret < 0,
let's switch to using the return value to be more consistent (and in
case of a bug somewhere down the call chain, forgetting to assign errp
is more likely than returning 0 for an error case).

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


  Commit: 9cd97956cfdde85d5887f2ea54ff598f615ee1b1
      
https://github.com/qemu/qemu/commit/9cd97956cfdde85d5887f2ea54ff598f615ee1b1
  Author: Sergio Lopez <address@hidden>
  Date:   2019-03-19 (Tue, 19 Mar 2019)

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

  Log Message:
  -----------
  iotests: 153: Wait for an answer to QMP commands

There are various actions in this test that must be executed
sequentially, as the result of it depends on the state triggered by the
previous one.

If the last argument of _send_qemu_cmd() is an empty string, it just
sends the QMP commands without waiting for an answer. While unlikely, it
may happen that the next action in the test gets invoked before QEMU
processes the QMP request.

This issue seems to be easier to reproduce on servers with limited
resources or highly loaded.

With this change, we wait for an answer on all _send_qemu_cmd() calls.

Signed-off-by: Sergio Lopez <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: e60483f2f8498ae08ae79ca4c6fb03a3317f5e1e
      
https://github.com/qemu/qemu/commit/e60483f2f8498ae08ae79ca4c6fb03a3317f5e1e
  Author: Markus Armbruster <address@hidden>
  Date:   2019-03-19 (Tue, 19 Mar 2019)

  Changed paths:
    M vl.c

  Log Message:
  -----------
  vl: Fix to create migration object before block backends again

Recent commit cda4aa9a5a0 moved block backend creation before machine
property evaluation.  This broke qemu-iotests 055.  Turns out we need
to create the migration object before block backends, so block
backends can add migration blockers.  Fix by calling
migration_object_init() earlier, right before configure_blockdev().

Fixes: cda4aa9a5a08777cf13e164c0543bd4888b8adce
Reported-by: Kevin Wolf <address@hidden>
Signed-off-by: Markus Armbruster <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 27e42789b7769ee9556767627542cf8fd9bfbc4d
      
https://github.com/qemu/qemu/commit/27e42789b7769ee9556767627542cf8fd9bfbc4d
  Author: Kevin Wolf <address@hidden>
  Date:   2019-03-19 (Tue, 19 Mar 2019)

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

  Log Message:
  -----------
  qemu-iotests: Fix 232 for non-qcow2

232 is marked as generic, but commit 12efe428c9e added code that assumes
qcow2. What the new test really needs is backing files and support for
updating the backing file link (.bdrv_change_backing_file).

Split the non-generic code into a new test case 247 and make it work
with qed, too.

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


  Commit: 8d9648cbf3ea60aad05fb10485ae6d2ff6ae587c
      
https://github.com/qemu/qemu/commit/8d9648cbf3ea60aad05fb10485ae6d2ff6ae587c
  Author: Vladimir Sementsov-Ogievskiy <address@hidden>
  Date:   2019-03-19 (Tue, 19 Mar 2019)

  Changed paths:
    M blockjob.c

  Log Message:
  -----------
  blockjob: fix user pause in block_job_error_action

Job (especially mirror) may call block_job_error_action several
times before actual pause if it has several in-flight requests.

block_job_error_action will call job_pause more than once in this case,
which lead to following block-job-resume qmp command can't actually
resume the job.

Fix it by do not increase pause level in block_job_error_action if
user_paused already set.

Signed-off-by: Vladimir Sementsov-Ogievskiy <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 782b9d06bf9853678fe3225426659539d0bdf668
      
https://github.com/qemu/qemu/commit/782b9d06bf9853678fe3225426659539d0bdf668
  Author: Alberto Garcia <address@hidden>
  Date:   2019-03-19 (Tue, 19 Mar 2019)

  Changed paths:
    M block/copy-on-read.c
    M block/crypto.c
    M block/replication.c

  Log Message:
  -----------
  block: Make bdrv_{copy_on_read,crypto_luks,replication} static

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


  Commit: 74ce9e466ae5632889d3187382764fc3b55fcc91
      
https://github.com/qemu/qemu/commit/74ce9e466ae5632889d3187382764fc3b55fcc91
  Author: Max Reitz <address@hidden>
  Date:   2019-03-19 (Tue, 19 Mar 2019)

  Changed paths:
    M blockdev.c

  Log Message:
  -----------
  blockdev: Check @replaces in blockdev_mirror_common

There is no reason why the constraints we put on @replaces should be
limited to drive-mirror.  Therefore, move the sanity checks from
qmp_drive_mirror() to blockdev_mirror_common() so they apply to
blockdev-mirror as well.

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


  Commit: 59fba0aaee7438002d9803a86c888f21a1070cc8
      
https://github.com/qemu/qemu/commit/59fba0aaee7438002d9803a86c888f21a1070cc8
  Author: Lukáš Doktor <address@hidden>
  Date:   2019-03-19 (Tue, 19 Mar 2019)

  Changed paths:
    M tests/qemu-iotests/051

  Log Message:
  -----------
  qemu-iotests: Treat custom TEST_DIR in 051

When custom TEST_DIR is specified the output includes it without leading
'/':

    $ TEST_DIR=/var/tmp ./check -file -qcow2 051
    ....
-drive0 (NODE_NAME): json:{"backing": {"driver": "qcow2", "file":
{"driver": "file", "filename": "TEST_DIR/t.qcow2"}}, "driver": "qcow2",
"file": {"driver": "file", "filename": SNAPSHOT_PATH}} (qcow2,
read-only)
+drive0 (NODE_NAME): json:{"backing": {"driver": "qcow2", "file":
{"driver": "file", "filename": "TEST_DIR/t.qcow2"}}, "driver": "qcow2",
"file": {"driver": "file", "filename": "TEST_DIR/vl.ziHfeP"}} (qcow2,
read-only)

Let's remove it from the sed regexp.

Signed-off-by: Lukáš Doktor <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: e0991e2616f70ec382db0f944c61f420e272e539
      
https://github.com/qemu/qemu/commit/e0991e2616f70ec382db0f944c61f420e272e539
  Author: Peter Maydell <address@hidden>
  Date:   2019-03-19 (Tue, 19 Mar 2019)

  Changed paths:
    M block.c
    M block/copy-on-read.c
    M block/crypto.c
    M block/mirror.c
    M block/qcow2.c
    M block/replication.c
    M block/vmdk.c
    M blockdev.c
    M blockjob.c
    M qapi/block-core.json
    M tests/qemu-iotests/051
    M tests/qemu-iotests/153
    M tests/qemu-iotests/153.out
    M tests/qemu-iotests/232
    M tests/qemu-iotests/232.out
    A tests/qemu-iotests/247
    A tests/qemu-iotests/247.out
    M tests/qemu-iotests/group
    M vl.c

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

Block layer patches:

- mirror: Fix early return from drain (could cause deadlocks)
- vmdk: Fixed probing for version 3 images
- vl: Fix to create migration object before block backends again (fixes
  segfault for block drivers that set migration blockers)
- Several minor fixes, documentation and test case improvements

# gpg: Signature made Tue 19 Mar 2019 14:59:17 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:
  qemu-iotests: Treat custom TEST_DIR in 051
  blockdev: Check @replaces in blockdev_mirror_common
  block: Make bdrv_{copy_on_read,crypto_luks,replication} static
  blockjob: fix user pause in block_job_error_action
  qemu-iotests: Fix 232 for non-qcow2
  vl: Fix to create migration object before block backends again
  iotests: 153: Wait for an answer to QMP commands
  block: Silence Coverity in bdrv_drop_intermediate()
  vmdk: Support version=3 in VMDK descriptor files
  qapi: fix block-latency-histogram-set description and examples
  qcow2: Fix data file error condition in qcow2_co_create()
  mirror: Confirm we're quiesced only if the job is paused or cancelled

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


Compare: https://github.com/qemu/qemu/compare/9bc59ffd9e15...e0991e2616f7



reply via email to

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