We need an ability to insert filters above top block node, attached to
block device. It can't be achieved with blockdev-reopen command. So, we
want do it with help of qom-set.
Intended usage:
1. blockdev-add, creating the filter, which child is at top node A,
attached to some guest block device.
2. qom-set, to change bs attached to root blk from original node to
newly create filter.
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
---
hw/core/qdev-properties-system.c | 30 ++++++++++++++++++++++--------
1 file changed, 22 insertions(+), 8 deletions(-)
@@ -196,6 +209,7 @@ static void release_drive(Object *obj, const char *name,
void *opaque)
const PropertyInfo qdev_prop_drive = {
.name = "str",
.description = "Node name or ID of a block device to use as a backend",
+ .realized_set_allowed = true,
.get = get_drive,
.set = set_drive,
.release = release_drive,