[Qemu-devel] [PATCH v2 0/6] block: Fixes regarding dataplane and management operations

Fam Zheng posted 6 patches 7 years ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20170407065414.9143-1-famz@redhat.com
There is a newer version of this series
block.c                    | 30 ++++++++++++++++++++++++++----
block/blkdebug.c           |  4 ++--
block/blkverify.c          |  8 ++++----
block/block-backend.c      |  4 ++--
block/io.c                 | 14 +++++++-------
block/mirror.c             |  3 ++-
block/quorum.c             | 16 ++++++++--------
block/sheepdog.c           |  4 ++--
blockdev.c                 |  4 ++--
blockjob.c                 |  4 ++--
hw/9pfs/9p.c               |  4 ++--
hw/9pfs/coth.c             |  4 ++--
include/block/block.h      | 11 +++++++++++
include/qemu/coroutine.h   | 11 ++++++-----
include/qemu/main-loop.h   |  2 +-
migration/colo.c           |  3 ++-
migration/migration.c      |  2 +-
nbd/server.c               |  5 +++--
qemu-img.c                 |  4 ++--
qemu-io-cmds.c             |  2 +-
tests/test-blockjob-txn.c  |  6 +++++-
tests/test-coroutine.c     | 41 +++++++++++++++++++++--------------------
tests/test-thread-pool.c   |  2 +-
util/async.c               |  4 ++--
util/qemu-coroutine-io.c   |  3 ++-
util/qemu-coroutine-lock.c |  6 ++++--
util/qemu-coroutine.c      | 10 +++++-----
util/trace-events          |  2 +-
28 files changed, 129 insertions(+), 84 deletions(-)
[Qemu-devel] [PATCH v2 0/6] block: Fixes regarding dataplane and management operations
Posted by Fam Zheng 7 years ago
v2: - Drop patch 4 in v1. A second thought made me feel neither it nor Kevin's
      suggestion to move the BH process to bdrv_drain_recurse/BDRV_POLL_WHILE
      is a complete fix. So leave it for a separate patch.
    - Add rev-by to patches 1, 3, 4.
    - Split from patch 1 in v1 and add patch 2, for the new assertions. [Kevin]
    - Rewrite patch 5. Fix block job's co when a BDS is moved to a different
      aio context. [Kevin]
    - Add patch 6.

Crashes are reported on dataplane devices when doing snapshot and commit under
guest I/O.

With this series, Ed's test case '176' now passes (reran 10+ times):

    https://github.com/skyportsystems/qemu-1/commits/eswierk-iotests-2.9

The biggest fix for this is patch 5, which fixes a race condition between main
thread and iothread.

Fam Zheng (6):
  block: Fix unpaired aio_disable_external in external snapshot
  block: Assert attached child node has right aio context
  mirror: Fix aio context of mirror_top_bs
  block: Quiesce old aio context during bdrv_set_aio_context
  coroutine: Explicitly specify AioContext when entering coroutine
  tests/block-job-txn: Don't start block job before adding to txn

 block.c                    | 30 ++++++++++++++++++++++++++----
 block/blkdebug.c           |  4 ++--
 block/blkverify.c          |  8 ++++----
 block/block-backend.c      |  4 ++--
 block/io.c                 | 14 +++++++-------
 block/mirror.c             |  3 ++-
 block/quorum.c             | 16 ++++++++--------
 block/sheepdog.c           |  4 ++--
 blockdev.c                 |  4 ++--
 blockjob.c                 |  4 ++--
 hw/9pfs/9p.c               |  4 ++--
 hw/9pfs/coth.c             |  4 ++--
 include/block/block.h      | 11 +++++++++++
 include/qemu/coroutine.h   | 11 ++++++-----
 include/qemu/main-loop.h   |  2 +-
 migration/colo.c           |  3 ++-
 migration/migration.c      |  2 +-
 nbd/server.c               |  5 +++--
 qemu-img.c                 |  4 ++--
 qemu-io-cmds.c             |  2 +-
 tests/test-blockjob-txn.c  |  6 +++++-
 tests/test-coroutine.c     | 41 +++++++++++++++++++++--------------------
 tests/test-thread-pool.c   |  2 +-
 util/async.c               |  4 ++--
 util/qemu-coroutine-io.c   |  3 ++-
 util/qemu-coroutine-lock.c |  6 ++++--
 util/qemu-coroutine.c      | 10 +++++-----
 util/trace-events          |  2 +-
 28 files changed, 129 insertions(+), 84 deletions(-)

-- 
2.9.3


Re: [Qemu-devel] [PATCH v2 0/6] block: Fixes regarding dataplane and management operations
Posted by Kevin Wolf 7 years ago
Am 07.04.2017 um 08:54 hat Fam Zheng geschrieben:
> v2: - Drop patch 4 in v1. A second thought made me feel neither it nor Kevin's
>       suggestion to move the BH process to bdrv_drain_recurse/BDRV_POLL_WHILE
>       is a complete fix. So leave it for a separate patch.
>     - Add rev-by to patches 1, 3, 4.
>     - Split from patch 1 in v1 and add patch 2, for the new assertions. [Kevin]
>     - Rewrite patch 5. Fix block job's co when a BDS is moved to a different
>       aio context. [Kevin]
>     - Add patch 6.
> 
> Crashes are reported on dataplane devices when doing snapshot and commit under
> guest I/O.
> 
> With this series, Ed's test case '176' now passes (reran 10+ times):
> 
>     https://github.com/skyportsystems/qemu-1/commits/eswierk-iotests-2.9
> 
> The biggest fix for this is patch 5, which fixes a race condition between main
> thread and iothread.

Thanks, applied patch 1-3 for now. I feel the other patches still need
closer review and potentially discussion.

Kevin