Transactional block-graph modifying API
Get series with b4
b4 am [email protected]Versions newest first
- v5 Latest45 patches 32 repliesIn review
Patches in v5 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/45 | block: BlockDriver: add .filtered_child_is_backing fieldblock/ block/ include/ | +15 | 1 reply | |
| 2/45 | block: introduce bdrv_open_file_child() helperblock.c block/ block/ +21 more | +94 | 1 reply | |
| 3/45 | block/blklogwrites: don't care to remove bs->file child on failureblock/ | +0 | 1 reply | |
| 4/45 | test-bdrv-graph-mod: update test_parallel_perm_update test casetests/ | +44 | 2 replies | |
| 5/45 | tests-bdrv-drain: bdrv_replace_test driver: declare supports_backingtests/ | +1 | 1 reply | |
| 6/45 | test-bdrv-graph-mod: fix filters to be filtersinclude/ tests/ | +20 | 1 reply | |
| 7/45 | block: document connection between child roles and bs->backing/bs->fileinclude/ | +42 | 1 reply | |
| 8/45 | block/snapshot: stress that we fallback to primary childblock/ | +10 | 1 reply | |
| 9/45 | Revert "block: Let replace_child_noperm free children"block.c | +23 | 2 replies | |
| 10/45 | Revert "block: Let replace_child_tran keep indirect pointer"block.c | +10 | 0 replies | |
| 11/45 | Revert "block: Restructure remove_file_or_backing_child()"block.c | +9 | 0 replies | |
| 12/45 | Revert "block: Pass BdrvChild ** to replace_child_noperm"block.c | +11 | 0 replies | |
| 13/45 | block: Manipulate bs->file / bs->backing pointers in .attach/.detachblock.c block/ block/ +2 more | +89 | 2 replies | |
| 14/45 | block/snapshot: drop indirection around bdrv_snapshot_fallback_ptrblock/ | +17 | 2 replies | |
| 15/45 | block: refactor bdrv_remove_file_or_backing_child to bdrv_remove_childblock.c | +8 | 1 reply | |
| 16/45 | block: drop bdrv_detach_child()block.c | +18 | 1 reply | |
| 17/45 | block: drop bdrv_remove_filter_or_cow_childblock.c | +1 | 1 reply | |
| 18/45 | block: bdrv_refresh_perms(): allow external tranblock.c | +20 | 1 reply | |
| 19/45 | block: refactor bdrv_list_refresh_perms to allow any list of nodesblock.c | +32 | 1 reply | |
| 20/45 | block: make permission update functions publicblock.c include/ | +7 | 1 reply | |
| 21/45 | block: add bdrv_try_set_aio_context_tran transaction actionblock.c | +48 | 7 replies | |
| 22/45 | block: implemet bdrv_unref_tran()block.c include/ include/ +1 more | +156 | 2 replies | |
| 23/45 | blockdev: refactor transaction to use Transaction APIblockdev.c | +186 | 0 replies | |
| 24/45 | blockdev: transactions: rename some thingsblockdev.c | +15 | 0 replies | |
| 25/45 | blockdev: qmp_transaction: refactor loop to classic forblockdev.c | +3 | 0 replies | |
| 26/45 | blockdev: transaction: refactor handling transaction propertiesblockdev.c | +19 | 0 replies | |
| 27/45 | blockdev: qmp_transaction: drop extra generic layerblockdev.c | +89 | 0 replies | |
| 28/45 | qapi: block: add blockdev-del transaction actionblockdev.c qapi/ qapi/ | +95 | 0 replies | |
| 29/45 | block: introduce BDRV_O_NOPERM flagblock.c block/ blockdev.c +3 more | +83 | 2 replies | |
| 30/45 | block: bdrv_insert_node(): use BDRV_O_NOPERMblock.c | +2 | 0 replies | |
| 31/45 | qapi: block: add blockdev-add transaction actionblockdev.c qapi/ | +60 | 0 replies | |
| 32/45 | iotests: add blockdev-add-transactiontests/ tests/ | +58 | 0 replies | |
| 33/45 | block-backend: blk_root(): drop const specifier on return typeblock/ include/ | +2 | 0 replies | |
| 34/45 | block/export: add blk_by_export_id()block/ include/ | +19 | 0 replies | |
| 35/45 | block: make bdrv_find_child() function publicblock.c blockdev.c include/ | +14 | 0 replies | |
| 36/45 | block: bdrv_replace_child_bs(): move to external transactionblock.c block/ include/ | +36 | 0 replies | |
| 37/45 | qapi: add x-blockdev-replace commandblockdev.c qapi/ stubs/ +1 more | +137 | 0 replies | |
| 38/45 | qapi: add x-blockdev-replace transaction actionblock.c blockdev.c include/ +1 more | +42 | 0 replies | |
| 39/45 | block: bdrv_get_xdbg_block_graph(): report export idsblock.c block/ include/ +2 more | +28 | 0 replies | |
| 40/45 | iotests.py: qemu_img_create: use imgfmt by defaulttests/ | +2 | 0 replies | |
| 41/45 | iotests.py: introduce VM.assert_edges_list() methodtests/ | +17 | 0 replies | |
| 42/45 | iotests.py: add VM.qmp_check() helpertests/ | +4 | 0 replies | |
| 43/45 | iotests: add filter-insertiontests/ tests/ | +258 | 0 replies | |
| 44/45 | block: bdrv_open_inherit: create BlockBackend only when necessaryblock.c | +25 | 0 replies | |
| 45/45 | block/copy-before-write: correct permission schemeblock/ tests/ tests/ | +23 | 0 replies |
Reviews trailers per patch
11 of 45 patches have a Reviewed-by or Acked-by.
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v5 00/45] Transactional block-graph modifying API
Hi all!
v5: rebased on master, sorry for the noise
That's a big series, which unites some of my previous ones, and completes them with necessary additions to finally implement block-graph modifying API. The series is called "v4" as it inherits "[PATCH v3 00/11] blockdev-replace" (among other things).
After this series, we have blockdev-add, blockdev-del and x-blockdev-replace transaction actions, which allows to insert and remove filters.
Additional challenge is to avoid intermediate permission update. That's and existing paradigm of block graph modifications: first do all the modifications and then refresh the permissions. Now we should bring this paradigm to block-graph modifying transactions: if several graph modifying commands are sequential in one transaction, permission are updated after the last of these commands. The application of this is possibility to correct copy-before-write filter permission requirements (see last patch).
I now unite all these things into one series because:
- they depend on each other and I have to rebase them together when something needs fix or refactoring
- just to resend with my new email address
If needed, parts may go in separate, and I can split them again if necessary.
So, what is here:
1. "[PATCH 00/14] block: cleanup backing and file handling" series, unchanged:
block: BlockDriver: add .filtered_child_is_backing field
block: introduce bdrv_open_file_child() helper block/blklogwrites: don't care to remove bs->file child on failure
test-bdrv-graph-mod: update test_parallel_perm_update test case
tests-bdrv-drain: bdrv_replace_test driver: declare supports_backing
test-bdrv-graph-mod: fix filters to be filters
block: document connection between child roles and
bs->backing/bs->file
block/snapshot: stress that we fallback to primary child Revert "block: Let replace_child_noperm free children" Revert "block: Let replace_child_tran keep indirect pointer" Revert "block: Restructure remove_file_or_backing_child()" Revert "block: Pass BdrvChild ** to replace_child_noperm"
block: Manipulate bs->file / bs->backing pointers in .attach/.detach block/snapshot: drop indirection around bdrv_snapshot_fallback_ptr
2. implement bdrv_unref_tran() - the key thing to implement blockdev-del transaction action later.
This part inherits from "[PATCH 00/14] block: blockdev-del force=false". Still force=false is not realized and qcow2 is untouched, as the target now is transactional removement.
block: refactor bdrv_remove_file_or_backing_child to bdrv_remove_child
block: drop bdrv_detach_child()
block: drop bdrv_remove_filter_or_cow_child
block: bdrv_refresh_perms(): allow external tran
block: refactor bdrv_list_refresh_perms to allow any list of nodes
block: make permission update functions public
block: add bdrv_try_set_aio_context_tran transaction action
block: implemet bdrv_unref_tran()
3. Move blockdev.c transactions to util/transactions.c API.
blockdev: refactor transaction to use Transaction API
blockdev: transactions: rename some things
blockdev: qmp_transaction: refactor loop to classic for
blockdev: transaction: refactor handling transaction properties
blockdev: qmp_transaction: drop extra generic layer
4. add blockdev-del transaction action
qapi: block: add blockdev-del transaction action
5. add blockdev-add transaction action (inherits from "[PATCH 0/2] blockdev-add transaction")
block: introduce BDRV_O_NOPERM flag
block: bdrv_insert_node(): use BDRV_O_NOPERM
qapi: block: add blockdev-add transaction action
iotests: add blockdev-add-transaction
6. add x-blockdev-replace command and transaction action (inherits from "[PATCH v3 00/11] blockdev-replace")
block-backend: blk_root(): drop const specifier on return type block/export: add blk_by_export_id()
block: make bdrv_find_child() function public
block: bdrv_replace_child_bs(): move to external transaction
qapi: add x-blockdev-replace command
qapi: add x-blockdev-replace transaction action
block: bdrv_get_xdbg_block_graph(): report export ids iotests.py: qemu_img_create: use imgfmt by default iotests.py: introduce VM.assert_edges_list() method iotests.py: add VM.qmp_check() helper
iotests: add filter-insertion
7. Correct permission scheme of copy-before-write filter, with help of new design of graph-modifying API.
block: bdrv_open_inherit: create BlockBackend only when necessary block/copy-before-write: correct permission scheme
block.c | 871 ++++++++++-------- block/blkdebug.c | 9 +- block/blklogwrites.c | 11 +- block/blkreplay.c | 7 +- block/blkverify.c | 9 +- block/block-backend.c | 11 +- block/bochs.c | 7 +- block/cloop.c | 7 +- block/commit.c | 1 + block/copy-before-write.c | 24 +- block/copy-on-read.c | 9 +- block/crypto.c | 11 +- block/dmg.c | 7 +- block/export/export.c | 31 + block/filter-compress.c | 6 +- block/mirror.c | 1 + block/monitor/block-hmp-cmds.c | 2 +- block/parallels.c | 7 +- block/preallocate.c | 9 +- block/qcow.c | 6 +- block/qcow2.c | 8 +- block/qed.c | 8 +- block/raw-format.c | 4 +- block/replication.c | 8 +- block/snapshot.c | 60 +- block/throttle.c | 8 +- block/vdi.c | 7 +- block/vhdx.c | 7 +- block/vmdk.c | 7 +- block/vpc.c | 7 +- blockdev.c | 842 +++++++++-------- include/block/block-common.h | 47 +- include/block/block-global-state.h | 24 +- include/block/block_int-common.h | 36 +- include/block/block_int-global-state.h | 3 +- include/block/block_int-io.h | 1 + include/block/export.h | 1 + include/sysemu/block-backend-global-state.h | 3 +- qapi/block-core.json | 73 +- qapi/transaction.json | 35 +- stubs/blk-by-qdev-id.c | 9 + stubs/blk-exp-find-by-blk.c | 9 + stubs/meson.build | 2 + tests/qemu-iotests/iotests.py | 23 + .../tests/blockdev-add-transaction | 52 ++ .../tests/blockdev-add-transaction.out | 6 + tests/qemu-iotests/tests/filter-insertion | 253 +++++ tests/qemu-iotests/tests/filter-insertion.out | 5 + tests/qemu-iotests/tests/image-fleecing | 20 +- tests/qemu-iotests/tests/image-fleecing.out | 8 - tests/unit/test-bdrv-drain.c | 11 +- tests/unit/test-bdrv-graph-mod.c | 94 +- 52 files changed, 1725 insertions(+), 1002 deletions(-) create mode 100644 stubs/blk-by-qdev-id.c create mode 100644 stubs/blk-exp-find-by-blk.c create mode 100755 tests/qemu-iotests/tests/blockdev-add-transaction create mode 100644 tests/qemu-iotests/tests/blockdev-add-transaction.out create mode 100755 tests/qemu-iotests/tests/filter-insertion create mode 100644 tests/qemu-iotests/tests/filter-insertion.out
Signature · 1 line
2.35.1