]> git.ipfire.org Git - thirdparty/qemu.git/commit
block: improve bdrv_child_get_parent_desc()
authorVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Tue, 1 Jun 2021 07:52:15 +0000 (10:52 +0300)
committerKevin Wolf <kwolf@redhat.com>
Wed, 2 Jun 2021 12:23:20 +0000 (14:23 +0200)
commit2c0a3acb9570a9e1ffae3c73ef94bc826dc9dd1d
tree0e6b71b1725ffa73172770876c01886849c32aa4
parentfd240a184b0e8a9889097216d182def6aece30cb
block: improve bdrv_child_get_parent_desc()

We have different types of parents: block nodes, block backends and
jobs. So, it makes sense to specify type together with name.

Next, this handler us used to compose an error message about permission
conflict. And permission conflict occurs in a specific place of block
graph. We shouldn't report name of parent device (as it refers another
place in block graph), but exactly and only the name of the node. So,
use bdrv_get_node_name() directly.

iotest 283 output is updated.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Alberto Garcia <berto@igalia.com>
Message-Id: <20210601075218.79249-4-vsementsov@virtuozzo.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block.c
tests/qemu-iotests/283.out