diff options
author | Vladimir Sementsov-Ogievskiy | 2022-07-26 22:11:20 +0200 |
---|---|---|
committer | Kevin Wolf | 2022-10-27 20:14:11 +0200 |
commit | 046fd84facfc4d326070bf5306dd9cedb7bd9854 (patch) | |
tree | b0c7b871c31662a2eead0872c03f438d4ffaa9d7 /block | |
parent | vhost-user-blk: fix the resize crash (diff) | |
download | qemu-046fd84facfc4d326070bf5306dd9cedb7bd9854.tar.gz qemu-046fd84facfc4d326070bf5306dd9cedb7bd9854.tar.xz qemu-046fd84facfc4d326070bf5306dd9cedb7bd9854.zip |
block: BlockDriver: add .filtered_child_is_backing field
Unfortunately not all filters use .file child as filtered child. Two
exclusions are mirror_top and commit_top. Happily they both are private
filters. Bad thing is that this inconsistency is observable through qmp
commands query-block / query-named-block-nodes. So, could we just
change mirror_top and commit_top to use file child as all other filter
driver is an open question. Probably, we could do that with some kind
of deprecation period, but how to warn users during it?
For now, let's just add a field so we can distinguish them in generic
code, it will be used in further commits.
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Reviewed-by: Hanna Reitz <hreitz@redhat.com>
Message-Id: <20220726201134.924743-2-vsementsov@yandex-team.ru>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block')
-rw-r--r-- | block/commit.c | 1 | ||||
-rw-r--r-- | block/mirror.c | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/block/commit.c b/block/commit.c index 38571510cb..e210e86bac 100644 --- a/block/commit.c +++ b/block/commit.c @@ -238,6 +238,7 @@ static BlockDriver bdrv_commit_top = { .bdrv_child_perm = bdrv_commit_top_child_perm, .is_filter = true, + .filtered_child_is_backing = true, }; void commit_start(const char *job_id, BlockDriverState *bs, diff --git a/block/mirror.c b/block/mirror.c index 80c0109d39..f9432af3df 100644 --- a/block/mirror.c +++ b/block/mirror.c @@ -1587,6 +1587,7 @@ static BlockDriver bdrv_mirror_top = { .bdrv_child_perm = bdrv_mirror_top_child_perm, .is_filter = true, + .filtered_child_is_backing = true, }; static BlockJob *mirror_start_job( |