0175dc6 qemu: block: Refactor node name detection code

Authored and Committed by Peter Krempa 6 years ago
    qemu: block: Refactor node name detection code
    
    Remove the complex and unreliable code which inferred the node name
    hierarchy only from data returned by 'query-named-block-nodes'. It turns
    out that query-blockstats contain the full hierarchy of nodes as
    perceived by qemu so the inference code is not necessary.
    
    In query blockstats, the 'parent' object corresponds to the storage
    behind a storage volume and 'backing' corresponds to the lower level of
    backing chain. Since all have node names this data can be really easily
    used to detect node names.
    
    In addition to the code refactoring the one remaining test case needed
    to be fixed along.
    
    Reviewed-by: Eric Blake <eblake@redhat.com>
    
        
file modified
+115 -175
file modified
+3 -7
file modified
+14 -8