Hmm, now I think, that instead of this, it is better to use pointer as
parent id for
nod-bds parents, to be sure they will not intersect. And add special
field to
qapi block relation info "parent-description" for such parents.
Also I'm afraid that this patch may break iotests..
16.08.2018 20:20, Vladimir Sementsov-Ogievskiy wrote:
Make blk_root_get_parent_desc return different descriptions for
different blk's in worst case.
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsement...@virtuozzo.com>
---
block/block-backend.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block/block-backend.c b/block/block-backend.c
index fa120630be..e5707a0f8c 100644
--- a/block/block-backend.c
+++ b/block/block-backend.c
@@ -141,7 +141,7 @@ static char *blk_root_get_parent_desc(BdrvChild *child)
} else {
/* TODO Callback into the BB owner for something more detailed */
g_free(dev_id);
- return g_strdup("a block device");
+ return g_strdup_printf("a block device %p", blk);
}
}
--
Best regards,
Vladimir