• E
    conf: earlier allocation during backing chain crawl · 43f85b99
    Eric Blake 提交于
    Right now, we are allocating virStorageFileMetadata near the bottom
    of the callchain, only after we have identified that we are visiting
    a file (and not a network resource).  I'm hoping to eventually
    support parsing the backing chain from XML, where the backing chain
    crawl then validates what was parsed rather than allocating a fresh
    structure.  Likewise, I'm working towards a setup where we have a
    backing element even for networks.  Both of these use cases are
    easier to code if the allocation is hoisted earlier.
    
    * src/util/virstoragefile.c (virStorageFileGetMetadataInternal)
    (virStorageFileGetMetadataFromFDInternal): Change signature.
    (virStorageFileGetMetadataFromBuf)
    (virStorageFileGetMetadataRecurse, virStorageFileGetMetadata):
    Update callers.
    Signed-off-by: NEric Blake <eblake@redhat.com>
    43f85b99
virstoragefile.c 48.2 KB