qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] 9e3727: block: Don't inactivate children befo


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] 9e3727: block: Don't inactivate children before parents
Date: Tue, 27 Nov 2018 07:34:18 -0800

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 9e37271f50ec2e95f299dc297ac08f9be0096b48
      
https://github.com/qemu/qemu/commit/9e37271f50ec2e95f299dc297ac08f9be0096b48
  Author: Kevin Wolf <address@hidden>
  Date:   2018-11-27 (Tue, 27 Nov 2018)

  Changed paths:
    M block.c

  Log Message:
  -----------
  block: Don't inactivate children before parents

bdrv_child_cb_inactivate() asserts that parents are already inactive
when children get inactivated. This precondition is necessary because
parents could still issue requests in their inactivation code.

When block nodes are created individually with -blockdev, all of them
are monitor owned and will be returned by bdrv_next() in an undefined
order (in practice, in the order of their creation, which is usually
children before parents), which obviously fails the assertion:

qemu: block.c:899: bdrv_child_cb_inactivate: Assertion `bs->open_flags & 
BDRV_O_INACTIVE' failed.

This patch fixes the ordering by skipping nodes with still active
parents in bdrv_inactivate_recurse() because we know that they will be
covered by recursion when the last active parent becomes inactive.

With the correct parents-before-children ordering, we also got rid of
the reason why commit aad0b7a0bfb introduced two passes, so we can go
back to a single-pass recursion. This is necessary so we can rely on the
BDRV_O_INACTIVE flag to skip nodes with active parents (the flag used
to be set only in pass 2, so we would always skip non-root nodes in
pass 1 because all parents would still be considered active; setting the
flag in pass 1 would mean, that we never skip anything in pass 2 because
all parents are already considered inactive).

Because of the change to single pass, this patch is best reviewed with
whitespace changes ignored.

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


  Commit: 330ca111ea0979d8c6fc9b3958f72d6dce164d5a
      
https://github.com/qemu/qemu/commit/330ca111ea0979d8c6fc9b3958f72d6dce164d5a
  Author: Kevin Wolf <address@hidden>
  Date:   2018-11-27 (Tue, 27 Nov 2018)

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

  Log Message:
  -----------
  iotests: Test migration with -blockdev

Check that block node activation and inactivation works with a block
graph that is built with individually created nodes.

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


  Commit: 6da021815e752b3ca3a547eed53f3e92a8a35452
      
https://github.com/qemu/qemu/commit/6da021815e752b3ca3a547eed53f3e92a8a35452
  Author: Keith Busch <address@hidden>
  Date:   2018-11-27 (Tue, 27 Nov 2018)

  Changed paths:
    M hw/block/nvme.c

  Log Message:
  -----------
  nvme: Fix spurious interrupts

The code had asserted an interrupt every time it was requested to check
for new completion queue entries.This can result in spurious interrupts
seen by the guest OS.

Fix this by asserting an interrupt only if there are un-acknowledged
completion queue entries available.

Reported-by: Guenter Roeck <address@hidden>
Signed-off-by: Keith Busch <address@hidden>
Tested-by: Guenter Roeck <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 59ed3fe8d334e3247abb703b8f2eb7c0ac7afc62
      
https://github.com/qemu/qemu/commit/59ed3fe8d334e3247abb703b8f2eb7c0ac7afc62
  Author: Peter Maydell <address@hidden>
  Date:   2018-11-27 (Tue, 27 Nov 2018)

  Changed paths:
    M block.c
    M hw/block/nvme.c
    A tests/qemu-iotests/234
    A tests/qemu-iotests/234.out
    M tests/qemu-iotests/group

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

Block layer patches:

- block: Fix crash on migration with explicit child nodes
- nvme: Fix spurious interrupts

# gpg: Signature made Tue 27 Nov 2018 11:59:40 GMT
# gpg:                using RSA key 7F09B272C88F2FD6
# gpg: Good signature from "Kevin Wolf <address@hidden>"
# Primary key fingerprint: DC3D EB15 9A9A F95D 3D74  56FE 7F09 B272 C88F 2FD6

* remotes/kevin/tags/for-upstream:
  nvme: Fix spurious interrupts
  iotests: Test migration with -blockdev
  block: Don't inactivate children before parents

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


Compare: https://github.com/qemu/qemu/compare/2264faa55f0f...59ed3fe8d334
      **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.

reply via email to

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