mbox series

[v3,00/11] blockdev-replace

Message ID 20220225234308.1754763-1-vsementsov@virtuozzo.com (mailing list archive)
Headers show
Series blockdev-replace | expand

Message

Vladimir Sementsov-Ogievskiy Feb. 25, 2022, 11:42 p.m. UTC
Hi all!

Finally, that's a proposal for new interface for filter insertion, which
provides generic way for inserting between different block graph nodes,
like BDS nodes, block exports and block devices.

v3: - add transaction support
    - add test, that shows transactional filter insertion in different
      cases
    - drop RFC mark. I think it's now close to be a good solution. And
      anyway, no comments on "RFC v2" version :) Still, I want to keep
      x- prefix for now, just because there were too many different
      ideas on this topic.

Vladimir Sementsov-Ogievskiy (11):
  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

 qapi/block-core.json                          |  62 +++++
 qapi/transaction.json                         |  14 +-
 include/block/block.h                         |   2 +-
 include/block/block_int.h                     |   1 +
 include/block/export.h                        |   1 +
 include/sysemu/block-backend.h                |   3 +-
 block.c                                       |  59 ++--
 block/block-backend.c                         |  10 +-
 block/export/export.c                         |  31 +++
 blockdev.c                                    | 113 +++++++-
 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/qemu-iotests/tests/filter-insertion     | 253 ++++++++++++++++++
 tests/qemu-iotests/tests/filter-insertion.out |   5 +
 16 files changed, 563 insertions(+), 34 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/filter-insertion
 create mode 100644 tests/qemu-iotests/tests/filter-insertion.out

Comments

Vladimir Sementsov-Ogievskiy Feb. 26, 2022, 12:03 a.m. UTC | #1
26.02.2022 02:42, Vladimir Sementsov-Ogievskiy wrote:
> Hi all!
> 
> Finally, that's a proposal for new interface for filter insertion, which
> provides generic way for inserting between different block graph nodes,
> like BDS nodes, block exports and block devices.
> 
> v3: - add transaction support
>      - add test, that shows transactional filter insertion in different
>        cases
>      - drop RFC mark. I think it's now close to be a good solution. And
>        anyway, no comments on "RFC v2" version:)  Still, I want to keep
>        x- prefix for now, just because there were too many different
>        ideas on this topic.

Oh, forget to mention, that it's based on recent "[PATCH 0/2] blockdev-add transaction":
Based-on: <20220224171328.1628047-1-vsementsov@virtuozzo.com>