OSDN Git Service

block/qapi: Let bdrv_query_image_info() recurse
authorHanna Reitz <hreitz@redhat.com>
Mon, 20 Jun 2022 16:26:58 +0000 (18:26 +0200)
committerKevin Wolf <kwolf@redhat.com>
Wed, 1 Feb 2023 15:52:33 +0000 (16:52 +0100)
commit5d8813593f3f673fc96eed199beb35690cc46f58
tree78cf87bad3f02e6b092f53bd97c6aa897f765f9b
parentb1f4cd1589a16fec02f264a09bd3560e4ccce3c2
block/qapi: Let bdrv_query_image_info() recurse

There is no real reason why bdrv_query_image_info() should generally not
recurse.  The ImageInfo struct has a pointer to the backing image, so it
should generally be filled, unless the caller explicitly opts out.

This moves the recursing code from bdrv_block_device_info() into
bdrv_query_image_info().

Signed-off-by: Hanna Reitz <hreitz@redhat.com>
Message-Id: <20220620162704.80987-7-hreitz@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/qapi.c
include/block/qapi.h