Graph locking part 4 (node management)
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest21 patches 9 repliesIn review
- v121 patches 48 repliesSuperseded
Changes in v2 from the cover letter
- Patch 5: Improved comments, added one for bdrv_schedule_unref()
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/21 | block: Remove unused BlockReopenQueueEntry.perms_checkedblock.c | +0 | 0 replies | |
| 2/21 | preallocate: Factor out preallocate_truncate_to_real_size()block/ | +22 | 0 replies | |
| 3/21 | preallocate: Don't poll during permission updatesblock/ | +69 | 4 replies | |
| 4/21 | block: Take AioContext lock for bdrv_append() more consistentlytests/ tests/ tests/ | +12 | 0 replies | |
| 5/21 | block: Introduce bdrv_schedule_unref()block.c block/ include/ +1 more | +40 | 1 reply | |
| 6/21 | block-coroutine-wrapper: Add no_co_wrapper_bdrv_wrlock functionsinclude/ scripts/ | +15 | 0 replies | |
| 7/21 | block-coroutine-wrapper: Allow arbitrary parameter namesscripts/ | +4 | 0 replies | |
| 8/21 | block: Mark bdrv_replace_child_noperm() GRAPH_WRLOCKblock.c | +19 | 0 replies | |
| 9/21 | block: Mark bdrv_replace_child_tran() GRAPH_WRLOCKblock.c | +50 | 0 replies | |
| 10/21 | block: Mark bdrv_attach_child_common() GRAPH_WRLOCKblock.c block/ | +100 | 0 replies | |
| 11/21 | block: Call transaction callbacks with lock heldblock.c | +44 | 0 replies | |
| 12/21 | block: Mark bdrv_attach_child() GRAPH_WRLOCKblock.c block/ block/ +3 more | +43 | 0 replies | |
| 13/21 | block: Mark bdrv_parent_perms_conflict() and callers GRAPH_RDLOCKblock.c block/ block/ +6 more | +66 | 0 replies | |
| 14/21 | block: Mark bdrv_get_cumulative_perm() and callers GRAPH_RDLOCKblock.c blockdev.c include/ +1 more | +40 | 0 replies | |
| 15/21 | block: Mark bdrv_child_perm() GRAPH_RDLOCKblock.c block/ include/ | +16 | 0 replies | |
| 16/21 | block: Mark bdrv_parent_cb_change_media() GRAPH_RDLOCKblock.c | +5 | 0 replies | |
| 17/21 | block: Take graph rdlock in bdrv_drop_intermediate()block.c | +2 | 1 reply | |
| 18/21 | block: Take graph rdlock in bdrv_change_aio_context()block.c | +4 | 1 reply | |
| 19/21 | block: Mark bdrv_root_unref_child() GRAPH_WRLOCKblock.c block/ blockjob.c +1 more | +9 | 0 replies | |
| 20/21 | block: Mark bdrv_unref_child() GRAPH_WRLOCKblock.c block/ block/ +7 more | +50 | 0 replies | |
| 21/21 | block: Mark bdrv_add/del_child() and caller GRAPH_WRLOCKblock/ blockdev.c include/ +1 more | +27 | 0 replies |
Reviews trailers per patch
All 21 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.
| Patch | Eric Blake | Stefan Hajnoczi | Emanuele Giuseppe Esposito |
|---|---|---|---|
| Series | R-b | ||
| 1/21 | R-b | R-b | R-b |
| 2/21 | R-b | R-b | R-b |
| 3/21 | R-b | R-b | |
| 4/21 | R-b | R-b | R-b |
| 5/21 | R-b | ||
| 6/21 | R-b | R-b | |
| 7/21 | R-b | R-b | |
| 8/21 | R-b | R-b | |
| 9/21 | R-b | R-b | |
| 10/21 | R-b | ||
| 11/21 | R-b | ||
| 12/21 | R-b | R-b | |
| 13/21 | R-b | R-b | |
| 14/21 | R-b | R-b | |
| 15/21 | R-b | R-b | |
| 16/21 | R-b | R-b | |
| 17/21 | R-b | R-b | |
| 18/21 | R-b | R-b | |
| 19/21 | R-b | R-b | |
| 20/21 | R-b | R-b | |
| 21/21 | R-b | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.
Cover letter [PATCH v2 00/21] Graph locking part 4 (node management)
The previous parts of the graph locking changes focussed mostly on the BlockDriver side and taking reader locks while performing I/O. This series focusses more on the functions managing the graph structure, i.e adding, removing and replacing nodes and updating their permissions.
Many of these places actually need to take the writer lock to avoid readers seeing an inconsistent half-updated graph state. Therefore taking the writer lock is now moved from the very low-level function bdrv_replace_child_noperm() into its more high level callers.
v2:
- Patch 5: Improved comments, added one for bdrv_schedule_unref()
Kevin Wolf (21):
block: Remove unused BlockReopenQueueEntry.perms_checked
preallocate: Factor out preallocate_truncate_to_real_size()
preallocate: Don't poll during permission updates
block: Take AioContext lock for bdrv_append() more consistently
block: Introduce bdrv_schedule_unref()
block-coroutine-wrapper: Add no_co_wrapper_bdrv_wrlock functions
block-coroutine-wrapper: Allow arbitrary parameter names
block: Mark bdrv_replace_child_noperm() GRAPH_WRLOCK
block: Mark bdrv_replace_child_tran() GRAPH_WRLOCK
block: Mark bdrv_attach_child_common() GRAPH_WRLOCK
block: Call transaction callbacks with lock held
block: Mark bdrv_attach_child() GRAPH_WRLOCK
block: Mark bdrv_parent_perms_conflict() and callers GRAPH_RDLOCK
block: Mark bdrv_get_cumulative_perm() and callers GRAPH_RDLOCK
block: Mark bdrv_child_perm() GRAPH_RDLOCK
block: Mark bdrv_parent_cb_change_media() GRAPH_RDLOCK
block: Take graph rdlock in bdrv_drop_intermediate()
block: Take graph rdlock in bdrv_change_aio_context()
block: Mark bdrv_root_unref_child() GRAPH_WRLOCK
block: Mark bdrv_unref_child() GRAPH_WRLOCK
block: Mark bdrv_add/del_child() and caller GRAPH_WRLOCK
include/block/block-common.h | 4 + include/block/block-global-state.h | 30 +- include/block/block_int-common.h | 34 +- include/block/block_int-global-state.h | 14 +- include/sysemu/block-backend-global-state.h | 4 +- block.c | 348 ++++++++++++++------ block/blklogwrites.c | 4 + block/blkverify.c | 2 + block/block-backend.c | 29 +- block/copy-before-write.c | 10 +- block/crypto.c | 6 +- block/graph-lock.c | 26 +- block/mirror.c | 8 + block/preallocate.c | 133 +++++--- block/qcow2.c | 4 +- block/quorum.c | 23 +- block/replication.c | 9 + block/snapshot.c | 2 + block/stream.c | 20 +- block/vmdk.c | 13 + blockdev.c | 23 +- blockjob.c | 2 + tests/unit/test-bdrv-drain.c | 23 +- tests/unit/test-bdrv-graph-mod.c | 20 ++ tests/unit/test-block-iothread.c | 3 + scripts/block-coroutine-wrapper.py | 18 +- tests/qemu-iotests/051.pc.out | 6 +- 27 files changed, 591 insertions(+), 227 deletions(-)
Signature · 1 line
2.41.0