Skip to content

block: fix 'savevm' hang with -object iothread

Stefan Hajnoczi qemu-devel 3 versions – Applied

Status from this message: Thanks, applied to the block branch.

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest4 patches 8 repliesApplied
  2. v24 patches 2 repliesSuperseded
  3. v13 patches 11 repliesSuperseded

Changes in v3 from the cover letter

* Add missing bdrv_drain_all_end() in error code paths [Kevin]

Patches in v3 Applied

#Subject and filesSizeRepliesApplied
1/4block: count bdrv_co_rw_vmstate() requestsblock/io.c+12 -50 replies
2/4block: use BDRV_POLL_WHILE() in bdrv_rw_vmstate()block/io.c+1 -30 replies
3/4migration: avoid recursive AioContext locking in save_vmstate()migration/savevm.c+11 -14 replies
4/4migration: use bdrv_drain_all_begin/end() instead bdrv_drain_all()migration/savevm.c+15 -31 reply

Reviews trailers per patch

All 4 patches have a Reviewed-by or Acked-by.

PatchEric BlakePaolo Bonzini
1/4R-b R-b
2/4R-b R-b
3/4R-b R-b
4/4R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [Qemu-devel] [PATCH v3 0/4] block: fix 'savevm' hang with -object iothread

v3:
* Add missing bdrv_drain_all_end() in error code paths [Kevin]
v2:
* New patch to use bdrv_drain_all_begin/end() in savevm/loadvm [Kevin] (All other patches unchanged)

The 'savevm' command hangs when -object iothread is used. See patches for details, but basically the vmstate read/write code didn't conform to the latest block layer locking rules.

Stefan Hajnoczi (4):
block: count bdrv_co_rw_vmstate() requests
block: use BDRV_POLL_WHILE() in bdrv_rw_vmstate()
migration: avoid recursive AioContext locking in save_vmstate()
migration: use bdrv_drain_all_begin/end() instead bdrv_drain_all()

 block/io.c         | 21 +++++++++++++--------
 migration/savevm.c | 30 ++++++++++++++++++++++++++----
 2 files changed, 39 insertions(+), 12 deletions(-)
Signature · 1 line
2.9.3