• J
    storage: Disallow vol_wipe for sparse logical volumes · 8a9f7cbe
    John Ferlan 提交于
    https://bugzilla.redhat.com/show_bug.cgi?id=1091866
    
    Add a new boolean 'sparse'.  This will be used by the logical backend
    storage driver to determine whether the target volume is sparse or not
    (also known by a snapshot or thin logical volume). Although setting sparse
    to true at creation could be seen as duplicitous to setting during
    virStorageBackendLogicalMakeVol() in case there are ever other code paths
    between Create and FindLVs that need to know about the volume be sparse.
    
    Use the 'sparse' in a new virStorageBackendLogicalVolWipe() to decide whether
    to attempt to wipe the logical volume or not. For now, I have found no
    means to wipe the volume without writing to it. Writing to the sparse
    volume causes it to be filled. A sparse logical volume is not completely
    writeable as there exists metadata which if overwritten will cause the
    sparse lv to go INACTIVE which means pool-refresh will not find it.
    Access to whatever lvm uses to manage data blocks is not provided by
    any API I could find.
    8a9f7cbe
storage_backend_logical.c 27.3 KB