• E
    conf: tweak volume target struct details · dae1568c
    Eric Blake 提交于
    Some preparatory work before consolidating storage volume
    structs with the rest of virstoragefile.  Making these
    changes allows a volume target to be much closer to (a
    subset of) the virStorageSource struct.
    
    Making perms be a pointer allows it to be optional if we
    have a storage pool that doesn't expose permissions in a
    way we can access.  It also allows future patches to
    optionally expose permissions details learned about a disk
    image via domain <disk> listings, rather than just
    limiting it to storage volume listings.
    
    Disk partition types was only used by internal code to
    control what type of partition to create when carving up
    an MS-DOS partition table storage pool (and is not used
    for GPT partition tables or other storage pools).  It was
    not exposed in volume XML, and as it is more closely
    related to extent information of the overall block device
    than it is to the <target> information describing the host
    file.  Besides, if we ever decide to expose it in XML down
    the road, we can move it back as needed.
    
    * src/conf/storage_conf.h (_virStorageVolTarget): Change perms to
    pointer, enhance comments.  Move partition type...
    (_virStorageVolSource): ...here.
    * src/conf/storage_conf.c (virStorageVolDefFree)
    (virStorageVolDefParseXML, virStorageVolTargetDefFormat): Update
    clients.
    * src/storage/storage_backend_fs.c (createFileDir): Likewise.
    * src/storage/storage_backend.c (virStorageBackendCreateBlockFrom)
    (virStorageBackendCreateRaw, virStorageBackendCreateExecCommand)
    (virStorageBackendUpdateVolTargetInfoFD): Likewise.
    * src/storage/storage_backend_logical.c
    (virStorageBackendLogicalCreateVol): Likewise.
    * src/storage/storage_backend_disk.c
    (virStorageBackendDiskMakeDataVol)
    (virStorageBackendDiskPartTypeToCreate): Likewise.
    Signed-off-by: NEric Blake <eblake@redhat.com>
    dae1568c
storage_conf.h 18.3 KB