qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] 539343: dma-helpers: ensure AIO callback is i


From: Peter Maydell
Subject: [Qemu-commits] [qemu/qemu] 539343: dma-helpers: ensure AIO callback is invoked after ...
Date: Mon, 19 Aug 2019 06:13:29 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 539343c0a47e19d5dd64d846d64d084d9793681f
      
https://github.com/qemu/qemu/commit/539343c0a47e19d5dd64d846d64d084d9793681f
  Author: Paolo Bonzini <address@hidden>
  Date:   2019-08-16 (Fri, 16 Aug 2019)

  Changed paths:
    M dma-helpers.c

  Log Message:
  -----------
  dma-helpers: ensure AIO callback is invoked after cancellation

dma_aio_cancel unschedules the BH if there is one, which corresponds
to the reschedule_dma case of dma_blk_cb.  This can stall the DMA
permanently, because dma_complete will never get invoked and therefore
nobody will ever invoke the original AIO callback in dbs->common.cb.

Fix this by invoking the callback (which is ensured to happen after
a bdrv_aio_cancel_async, or done manually in the dbs->bh case), and
add assertions to check that the DMA state machine is indeed waiting
for dma_complete or reschedule_dma, but never both.

Reported-by: John Snow <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
Message-id: address@hidden
Signed-off-by: John Snow <address@hidden>


  Commit: 8ec41c4265714255d5a138f8b538faf3583dcff6
      
https://github.com/qemu/qemu/commit/8ec41c4265714255d5a138f8b538faf3583dcff6
  Author: John Snow <address@hidden>
  Date:   2019-08-16 (Fri, 16 Aug 2019)

  Changed paths:
    M hw/ide/ahci.c
    M hw/ide/core.c

  Log Message:
  -----------
  Revert "ide/ahci: Check for -ECANCELED in aio callbacks"

This reverts commit 0d910cfeaf2076b116b4517166d5deb0fea76394.

It's not correct to just ignore an error code in a callback; we need to
handle that error and possible report failure to the guest so that they
don't wait indefinitely for an operation that will now never finish.

This ought to help cases reported by Nutanix where iSCSI returns a
legitimate -ECANCELED for certain operations which should be propagated
normally.

Reported-by: Shaju Abraham <address@hidden>
Signed-off-by: John Snow <address@hidden>
Message-id: address@hidden
Signed-off-by: John Snow <address@hidden>


  Commit: 614ab7d127536655ef105d4153ea264c88e855c1
      
https://github.com/qemu/qemu/commit/614ab7d127536655ef105d4153ea264c88e855c1
  Author: Philippe Mathieu-Daudé <address@hidden>
  Date:   2019-08-16 (Fri, 16 Aug 2019)

  Changed paths:
    M hw/ide/atapi.c

  Log Message:
  -----------
  hw/ide/atapi: Use the ldst API

The big-endian load/store functions are already provided
by "qemu/bswap.h".
Avoid code duplication, use the generic API.

Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
Message-id: address@hidden
Signed-off-by: John Snow <address@hidden>


  Commit: 9f3a972e225600d76c673ed23da2bcb07f27aa4d
      
https://github.com/qemu/qemu/commit/9f3a972e225600d76c673ed23da2bcb07f27aa4d
  Author: Peter Maydell <address@hidden>
  Date:   2019-08-19 (Mon, 19 Aug 2019)

  Changed paths:
    M dma-helpers.c
    M hw/ide/ahci.c
    M hw/ide/atapi.c
    M hw/ide/core.c

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/jnsnow/tags/ide-pull-request' into 
staging

Pull request

Stable notes: patches one and two can be considered
              for the next -stable release.

# gpg: Signature made Sat 17 Aug 2019 00:15:50 BST
# gpg:                using RSA key F9B7ABDBBCACDF95BE76CBD07DEF8106AAFC390E
# gpg: Good signature from "John Snow (John Huston) <address@hidden>" [full]
# Primary key fingerprint: FAEB 9711 A12C F475 812F  18F2 88A9 064D 1835 61EB
#      Subkey fingerprint: F9B7 ABDB BCAC DF95 BE76  CBD0 7DEF 8106 AAFC 390E

* remotes/jnsnow/tags/ide-pull-request:
  hw/ide/atapi: Use the ldst API
  Revert "ide/ahci: Check for -ECANCELED in aio callbacks"
  dma-helpers: ensure AIO callback is invoked after cancellation

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


Compare: https://github.com/qemu/qemu/compare/1f37316238d0...9f3a972e2256



reply via email to

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