Example #1
0
def calcSizeVHDLV(sizeVirt):
    # all LVHD VDIs have the metadata area preallocated for the maximum 
    # possible virtual size (for fast online VDI.resize)
    metaOverhead = vhdutil.calcOverheadEmpty(MSIZE)
    bitmapOverhead = vhdutil.calcOverheadBitmap(sizeVirt)
    return calcSizeLV(sizeVirt + metaOverhead + bitmapOverhead)
Example #2
0
def calcSizeVHDLV(sizeVirt):
    # all LVHD VDIs have the metadata area preallocated for the maximum
    # possible virtual size (for fast online VDI.resize)
    metaOverhead = vhdutil.calcOverheadEmpty(MSIZE)
    bitmapOverhead = vhdutil.calcOverheadBitmap(sizeVirt)
    return calcSizeLV(sizeVirt + metaOverhead + bitmapOverhead)
Example #3
0
def actualSRFreeSpace(size):
    num = (size - lvutil.LVM_SIZE_INCREMENT - 4096 - vhdutil.calcOverheadEmpty(MSIZE)) * vhdutil.VHD_BLOCK_SIZE
    den = 4096 + vhdutil.VHD_BLOCK_SIZE

    return num/den
Example #4
0
def actualSRFreeSpace(size):
    num = (size - lvutil.LVM_SIZE_INCREMENT - 4096 - vhdutil.calcOverheadEmpty(MSIZE)) * vhdutil.VHD_BLOCK_SIZE
    den = 4096 + vhdutil.VHD_BLOCK_SIZE

    return num/den
Example #5
0
 def getOverheadVHDEmpty(virtSize):
     """Calculate the VHD space overhead (metadata size) for an empty VDI of
     size virtual_size"""
     return vhdutil.calcOverheadEmpty(virtSize)
 def getOverheadVHDEmpty(virtSize):
     return vhdutil.calcOverheadEmpty(virtSize)