[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 4/6] block: improve bdrv_child_get_parent_desc()
From: |
Vladimir Sementsov-Ogievskiy |
Subject: |
[PATCH 4/6] block: improve bdrv_child_get_parent_desc() |
Date: |
Mon, 3 May 2021 14:34:00 +0300 |
We have different types of parents: block nodes, block backends and
jobs. So, it makes sense to specify type together with name.
iotest 283 output is updated.
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
---
block.c | 2 +-
tests/qemu-iotests/283.out | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/block.c b/block.c
index c4023ab4f4..1de2365843 100644
--- a/block.c
+++ b/block.c
@@ -1160,7 +1160,7 @@ int bdrv_parse_cache_mode(const char *mode, int *flags,
bool *writethrough)
static char *bdrv_child_get_parent_desc(BdrvChild *c)
{
BlockDriverState *parent = c->opaque;
- return g_strdup(bdrv_get_device_or_node_name(parent));
+ return g_strdup_printf("node '%s'", bdrv_get_node_name(parent));
}
static void bdrv_child_cb_drained_begin(BdrvChild *child)
diff --git a/tests/qemu-iotests/283.out b/tests/qemu-iotests/283.out
index 97e62a4c94..c9397bfc44 100644
--- a/tests/qemu-iotests/283.out
+++ b/tests/qemu-iotests/283.out
@@ -5,7 +5,7 @@
{"execute": "blockdev-add", "arguments": {"driver": "blkdebug", "image":
"base", "node-name": "other", "take-child-perms": ["write"]}}
{"return": {}}
{"execute": "blockdev-backup", "arguments": {"device": "source", "sync":
"full", "target": "target"}}
-{"error": {"class": "GenericError", "desc": "Cannot append backup-top filter:
Conflicts with use by source as 'image', which does not allow 'write' on base"}}
+{"error": {"class": "GenericError", "desc": "Cannot append backup-top filter:
Conflicts with use by node 'source' as 'image', which does not allow 'write' on
base"}}
=== backup-top should be gone after job-finalize ===
--
2.29.2
- [PATCH 0/6] block permission updated follow-up, Vladimir Sementsov-Ogievskiy, 2021/05/03
- [PATCH 1/6] block: fix leak of tran in bdrv_root_attach_child, Vladimir Sementsov-Ogievskiy, 2021/05/03
- [PATCH 2/6] block: bdrv_reopen_multiple(): fix leak of tran object, Vladimir Sementsov-Ogievskiy, 2021/05/03
- [PATCH 6/6] block: improve permission conflict error message, Vladimir Sementsov-Ogievskiy, 2021/05/03
- [PATCH 3/6] block-backend: improve blk_root_get_parent_desc(), Vladimir Sementsov-Ogievskiy, 2021/05/03
- [PATCH 4/6] block: improve bdrv_child_get_parent_desc(),
Vladimir Sementsov-Ogievskiy <=
- [PATCH 5/6] block: simplify bdrv_child_user_desc(), Vladimir Sementsov-Ogievskiy, 2021/05/03
- [PATCH 7/6] block: document child argument of bdrv_attach_child_common(), Vladimir Sementsov-Ogievskiy, 2021/05/03