[PATCH RFC 0/8] blockdev-replace

Vladimir Sementsov-Ogievskiy vsementsov at virtuozzo.com
Mon Aug 2 18:54:08 UTC 2021


Hi all!

As a continuation of "Qemu block filter insertion/removal API"
discussion, here is my proposal of blockdev-replace.

The realization allows:

- replace children of different parents: BDS, block devices, block
  exports

- automatically replace all parents of specific BDS, excluding creating
  loops (like bdrv_replace_node())

- do several replacements in one transaction

It's an untested draft, so you may go to patch 8, to look at QAPI
addition.

Vladimir Sementsov-Ogievskiy (8):
  block-backend: blk_root(): drop const specifier on return type
  block: add BlockParentClass class
  block: realize BlockParentClass for BlockDriverState
  block/export: realize BlockParentClass functionality
  qdev: improve find_device_state() to distinguish simple not found case
  qdev: realize BlockParentClass
  block: improve bdrv_replace_node_noperm()
  qapi: add blockdev-replace command

 qapi/block-core.json           |  78 ++++++++++++++++
 include/block/block-parent.h   |  32 +++++++
 include/sysemu/block-backend.h |   2 +-
 block.c                        | 158 ++++++++++++++++++++++++++++++++-
 block/block-backend.c          |   2 +-
 block/block-parent.c           |  66 ++++++++++++++
 block/export/export.c          |  44 +++++++++
 softmmu/qdev-monitor.c         |  90 +++++++++++++++----
 block/meson.build              |   1 +
 9 files changed, 453 insertions(+), 20 deletions(-)
 create mode 100644 include/block/block-parent.h
 create mode 100644 block/block-parent.c

-- 
2.29.2





More information about the libvir-list mailing list