Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 7376eda7c2e0451e819e81bd05fabc56a9deb946
      
https://github.com/qemu/qemu/commit/7376eda7c2e0451e819e81bd05fabc56a9deb946
  Author: Stefan Hajnoczi <stefa...@redhat.com>
  Date:   2018-03-12 (Mon, 12 Mar 2018)

  Changed paths:
    M include/block/aio-wait.h
    M util/aio-wait.c

  Log Message:
  -----------
  block: make BDRV_POLL_WHILE() re-entrancy safe

Nested BDRV_POLL_WHILE() calls can occur.  Currently
assert(!wait_->wakeup) fails in AIO_WAIT_WHILE() when this happens.

This patch converts the bool wait_->need_kick flag to an unsigned
wait_->num_waiters counter.

Nesting works correctly because outer AIO_WAIT_WHILE() callers evaluate
the condition again after the inner caller completes (invoking the inner
caller counts as aio_poll() progress).

Reported-by: "fuweiwei (C)" <fuweiw...@huawei.com>
Reviewed-by: Eric Blake <ebl...@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefa...@redhat.com>
Message-id: 20180307124619.6218-1-stefa...@redhat.com
Cc: Paolo Bonzini <pbonz...@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefa...@redhat.com>


  Commit: 834eddf22ec762839b724538c7be1d1d3b2d9d3b
      
https://github.com/qemu/qemu/commit/834eddf22ec762839b724538c7be1d1d3b2d9d3b
  Author: Peter Maydell <peter.mayd...@linaro.org>
  Date:   2018-03-13 (Tue, 13 Mar 2018)

  Changed paths:
    M include/block/aio-wait.h
    M util/aio-wait.c

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

# gpg: Signature made Mon 12 Mar 2018 16:01:16 GMT
# gpg:                using RSA key 9CA4ABB381AB73C8
# gpg: Good signature from "Stefan Hajnoczi <stefa...@redhat.com>"
# gpg:                 aka "Stefan Hajnoczi <stefa...@gmail.com>"
# Primary key fingerprint: 8695 A8BF D3F9 7CDA AC35  775A 9CA4 ABB3 81AB 73C8

* remotes/stefanha/tags/block-pull-request:
  block: make BDRV_POLL_WHILE() re-entrancy safe

Signed-off-by: Peter Maydell <peter.mayd...@linaro.org>


Compare: https://github.com/qemu/qemu/compare/73988d529e2e...834eddf22ec7

Reply via email to