Skip to content

blockdev: Fix AioContext handling for various blockdev actions

Sergio Lopez qemu-devel 6 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v6 Latest8 patches 4 repliesIn review
  2. v54 patches 7 repliesSuperseded
  3. v45 patches 5 repliesSuperseded
Earlier versions · 3
VersionPostedPatchesRepliesStatus
v38 patches9 repliesSuperseded
v22 patches6 repliesSuperseded
v11 patch5 repliesSuperseded

Changes in v6 from the cover letter

- Rename the patch series.
- Add "block/backup-top: Don't acquire context while dropping top"
- Add "blockdev: Acquire AioContext on dirty bitmap functions"
- Add "blockdev: Return bs to the proper context on snapshot abort"
- Add "iotests: Test handling of AioContexts with some blockdev actions" (thanks Kevin Wolf)
- Fix context release on error. (thanks Kevin Wolf)

Patches in v6 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8blockdev: fix coding style issues in drive_backup_prepareblockdev.c+5 -30 replies
2/8blockdev: unify qmp_drive_backup and drive-backup transaction pathsblockdev.c tests/qemu-iotests/141.out tests/qemu-iotests/185.out +2 more+117 -1260 replies
3/8blockdev: unify qmp_blockdev_backup and blockdev-backup transaction pathsblockdev.c+13 -470 replies
4/8blockdev: honor bdrv_try_set_aio_context() context requirementsblockdev.c+60 -80 replies
5/8block/backup-top: Don't acquire context while dropping topblock/backup-top.c block/backup.c+3 -50 replies
6/8blockdev: Acquire AioContext on dirty bitmap functionsblockdev.c+17 -31 reply
7/8blockdev: Return bs to the proper context on snapshot abortblockdev.c+21 -01 reply
8/8iotests: Test handling of AioContexts with some blockdev actionstests/qemu-iotests/281 tests/qemu-iotests/281.out tests/qemu-iotests/group+253 -00 replies

Reviews trailers per patch

3 of 8 patches have a Reviewed-by or Acked-by.

PatchMax ReitzKevin Wolf
1/8R-b R-b
2/8R-b
3/8R-b R-b
4/8
5/8
6/8
7/8
8/8

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

Read the v6 thread

Cover letter [PATCH v6 0/8] blockdev: Fix AioContext handling for various blockdev actions

This patch series includes fixes for various issues related to AioContext mismanagement for various blockdev-initiated actions.

It also adds tests for those actions when executed on drives running on an IOThread AioContext.

---
Changelog:

v6:
- Rename the patch series.
- Add "block/backup-top: Don't acquire context while dropping top"
- Add "blockdev: Acquire AioContext on dirty bitmap functions"
- Add "blockdev: Return bs to the proper context on snapshot abort"
- Add "iotests: Test handling of AioContexts with some blockdev actions" (thanks Kevin Wolf)
- Fix context release on error. (thanks Kevin Wolf)

v5:
- Include fix for iotest 141 in patch 2. (thanks Max Reitz)
- Also fix iotest 185 and 219 in patch 2. (thanks Max Reitz)
- Move error block after context acquisition/release, to we can use goto to bail out and release resources. (thanks Max Reitz)
- Properly release old_context in qmp_blockdev_mirror. (thanks Max Reitz)

v4:
- Unify patches 1-4 and 5-7 to avoid producing broken interim states. (thanks Max Reitz)
- Include a fix for iotest 141. (thanks Kevin Wolf)

v3:
- Rework the whole patch series to fix the issue by consolidating all operations in the transaction model. (thanks Kevin Wolf)

v2:
- Honor bdrv_try_set_aio_context() context acquisition requirements (thanks Max Reitz).
- Release the context at drive_backup_prepare() instead of avoiding re-acquiring it at do_drive_baclup(). (thanks Max Reitz)
- Convert a single patch into a two-patch series.
---

Sergio Lopez (8):
blockdev: fix coding style issues in drive_backup_prepare
blockdev: unify qmp_drive_backup and drive-backup transaction paths
blockdev: unify qmp_blockdev_backup and blockdev-backup transaction
paths
blockdev: honor bdrv_try_set_aio_context() context requirements block/backup-top: Don't acquire context while dropping top
blockdev: Acquire AioContext on dirty bitmap functions
blockdev: Return bs to the proper context on snapshot abort
iotests: Test handling of AioContexts with some blockdev actions

 block/backup-top.c         |   5 -
 block/backup.c             |   3 +
 blockdev.c                 | 391 ++++++++++++++++++++-----------------
 tests/qemu-iotests/141.out |   2 +
 tests/qemu-iotests/185.out |   2 +
 tests/qemu-iotests/219     |   7 +-
 tests/qemu-iotests/219.out |   8 +
 tests/qemu-iotests/281     | 247 +++++++++++++++++++++++
 tests/qemu-iotests/281.out |   5 +
 tests/qemu-iotests/group   |   1 +
 10 files changed, 484 insertions(+), 187 deletions(-)
 create mode 100755 tests/qemu-iotests/281
 create mode 100644 tests/qemu-iotests/281.out
Signature · 1 line
2.23.0