Add a 'x-blockdev-reopen' QMP command
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest posting 2/213 patches 6 repliesIn review
- v2 RFC posting 1/212 patches 1 replySuperseded
- v1 RFC10 patches 13 repliesSuperseded
Changes in v2 from the cover letter
- Patch 1: Update documentation, fix check in bdrv_drop_intermediate() and add a new one in bdrv_replace_node() [Kevin]
- Patch 2: Add a missing unfreeze call if commit_start() fails, and prevent a double unfreeze in commit_abort() [Kevin]
- Patch 4: Prevent double unfreeze in stream_abort() [Kevin]
- Patch 6: Update documentation and don't complain for a missing 'backing' option if the driver does not support backing files [Kevin]
- Patch 7: Contextual differences due to changes in previous patches.
- Patch 8: Forbid changing the backing file if there are implicit nodes on the way. Simplify code and update the permission checks to handle a new backing file [Kevin, Berto]
- Patch 9: Remove BlockDriver.runtime_opts from the previous version and use only mutable_opts [Kevin]
- Patch 10: Compare bs->options with reopen_state->options to see what options the user is trying to reset [Kevin]
- Patch 13: Update the tests to reflect all the new changes.
Patches in v2 posting 2/2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/13 | block: Allow freezing BdrvChild linksblock.c include/ include/ | +87 | 0 replies | |
| 2/13 | block: Freeze the backing chain for the duration of the commit jobblock/ | +16 | 0 replies | |
| 3/13 | block: Freeze the backing chain for the duration of the mirror jobblock/ | +8 | 0 replies | |
| 4/13 | block: Freeze the backing chain for the duration of the stream jobblock/ | +21 | 0 replies | |
| 5/13 | block: Add 'keep_old_opts' parameter to bdrv_reopen_queue()block.c block/ include/ +1 more | +24 | 0 replies | |
| 6/13 | block: Handle child references in bdrv_reopen_queue()block.c include/ | +46 | 0 replies | |
| 7/13 | block: Allow omitting the 'backing' option in certain casesblock.c | +7 | 0 replies | |
| 8/13 | block: Allow changing the backing file on reopenblock.c include/ | +164 | 0 replies | |
| 9/13 | block: Add a 'mutable_opts' field to BlockDriverblock/ block/ block/ +1 more | +42 | 0 replies | |
| 10/13 | block: Add bdrv_reset_options_allowed()block.c | +58 | 0 replies | |
| 11/13 | block: Remove the AioContext parameter from bdrv_reopen_multiple()block.c block/ include/ +1 more | +5 | 0 replies | |
| 12/13 | block: Add an 'x-blockdev-reopen' QMP commandblockdev.c qapi/ | +89 | 0 replies | |
| 13/13 | qemu-iotests: Test the x-blockdev-reopen QMP commandtests/ tests/ tests/ | +997 | 6 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.
Cover letter [Qemu-devel] [PATCH v2 00/13] Add a 'x-blockdev-reopen' QMP command
Hi,
here's a new version of the patches to add a new QMP command for bdrv_reopen().
Refer to the cover letter of v1 for a complete description of the feature:
https://lists.gnu.org/archive/html/qemu-block/2019-01/msg00623.html
Regards,
Berto
v2:
- Patch 1: Update documentation, fix check in bdrv_drop_intermediate() and add a new one in bdrv_replace_node() [Kevin]
- Patch 2: Add a missing unfreeze call if commit_start() fails, and prevent a double unfreeze in commit_abort() [Kevin]
- Patch 4: Prevent double unfreeze in stream_abort() [Kevin]
- Patch 6: Update documentation and don't complain for a missing 'backing' option if the driver does not support backing files [Kevin]
- Patch 7: Contextual differences due to changes in previous patches.
- Patch 8: Forbid changing the backing file if there are implicit nodes on the way. Simplify code and update the permission checks to handle a new backing file [Kevin, Berto]
- Patch 9: Remove BlockDriver.runtime_opts from the previous version and use only mutable_opts [Kevin]
- Patch 10: Compare bs->options with reopen_state->options to see what options the user is trying to reset [Kevin]
- Patch 13: Update the tests to reflect all the new changes.
v1: https://lists.gnu.org/archive/html/qemu-block/2019-01/msg00623.html
- Patch 10: forbid setting a new backing file with a different AioContext.
- Patch 13 (new): Remove unused parameter from bdrv_reopen_multiple.
- Patch 14: Acquire the AioContext before calling bdrv_reopen_multiple().
- Patch 15: More test cases.
- Patches 3, 8, 9, 11, 12: scripts/checkpatch.pl is more picky now with the format of multi-line comments, so correct them.
RFCv2: https://lists.gnu.org/archive/html/qemu-block/2018-11/msg00901.html
Output of backport-diff against v1:
Key:
[----] : patches are identical
[####] : number of functional differences between upstream/downstream patch [down] : patch is downstream-only
The flags [FC] indicate (F)unctional and (C)ontextual differences, respectively
001/13:[0021] [FC] 'block: Allow freezing BdrvChild links'
002/13:[0010] [FC] 'block: Freeze the backing chain for the duration of the commit job' 003/13:[----] [--] 'block: Freeze the backing chain for the duration of the mirror job' 004/13:[0009] [FC] 'block: Freeze the backing chain for the duration of the stream job' 005/13:[----] [--] 'block: Add 'keep_old_opts' parameter to bdrv_reopen_queue()' 006/13:[0009] [FC] 'block: Handle child references in bdrv_reopen_queue()' 007/13:[0004] [FC] 'block: Allow omitting the 'backing' option in certain cases' 008/13:[0118] [FC] 'block: Allow changing the backing file on reopen' 009/13:[down] 'block: Add a 'mutable_opts' field to BlockDriver' 010/13:[0070] [FC] 'block: Add bdrv_reset_options_allowed()' 011/13:[----] [--] 'block: Remove the AioContext parameter from bdrv_reopen_multiple()' 012/13:[----] [--] 'block: Add an 'x-blockdev-reopen' QMP command' 013/13:[0036] [FC] 'qemu-iotests: Test the x-blockdev-reopen QMP command'
Alberto Garcia (13):
block: Allow freezing BdrvChild links
block: Freeze the backing chain for the duration of the commit job
block: Freeze the backing chain for the duration of the mirror job
block: Freeze the backing chain for the duration of the stream job
block: Add 'keep_old_opts' parameter to bdrv_reopen_queue()
block: Handle child references in bdrv_reopen_queue()
block: Allow omitting the 'backing' option in certain cases
block: Allow changing the backing file on reopen
block: Add a 'mutable_opts' field to BlockDriver
block: Add bdrv_reset_options_allowed()
block: Remove the AioContext parameter from bdrv_reopen_multiple()
block: Add an 'x-blockdev-reopen' QMP command
qemu-iotests: Test the x-blockdev-reopen QMP command
block.c | 390 ++++++++++++++++-- block/commit.c | 16 + block/file-posix.c | 6 + block/mirror.c | 8 + block/qcow2.c | 25 ++ block/raw-format.c | 3 + block/replication.c | 7 +- block/stream.c | 21 + blockdev.c | 47 +++ include/block/block.h | 13 +- include/block/block_int.h | 14 + qapi/block-core.json | 42 ++ qemu-io-cmds.c | 4 +- tests/qemu-iotests/243 | 991 +++++++++++++++++++++++++++++++++++++++++++++ tests/qemu-iotests/243.out | 5 + tests/qemu-iotests/group | 1 + 16 files changed, 1562 insertions(+), 31 deletions(-) create mode 100644 tests/qemu-iotests/243 create mode 100644 tests/qemu-iotests/243.out
Signature · 1 line
2.11.0