block: Wire up 'flat' mode also for 'query-block'
Some time ago (commit facda5443f5a8) I've added 'flat' mode (which omits 'backing-image' key in reply) to 'query-named-block-nodes' to minimize the size of the returned JSON for deeper backing chains. While 'query-block' behaved slightly better it turns out that in libvirt we do call 'query-block' to figure out some information about the block device (e.g. throttling info) but we don't look at the backing chain itself. Wire up 'flat' for 'query-block' so that libvirt can ask for an abbreviated output. The implementation is much simpler as the internals are shared with 'query-named-block-nodes'. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Acked-by: Markus Armbruster <armbru@redhat.com> Message-ID: <f4476e9f7e8fda74c02be3f806acaa9aa2df4d9a.1770210044.git.pkrempa@redhat.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>