Skip to content
  • Sebastian Mitterle's avatar
    653fdf48
    disk storage: fix allocation size for pool format dos · 653fdf48
    Sebastian Mitterle authored and Michal Privoznik's avatar Michal Privoznik committed
    
    
    The changed condition was always false because the function was always
    called with boundary values 0.
    
    Use the free extent's start value to get its start offset from the
    cylinder boundary and determine if the needed size for allocation
    needs to be expanded too in case the offset doesn't fit within extra
    bytes for alignment.
    
    This fixes an issue where vol-create-from will call qemu-img convert
    to create a destination volume of same capacity as the source volume
    and qemu-img will error 'Cannot grow device files' due to the partition
    being too small for the source although both destination partition and
    source volume have the same capacity.
    
    Signed-off-by: default avatarSebastian Mitterle <smitterl@redhat.com>
    Reviewed-by: default avatarMichal Privoznik <mprivozn@redhat.com>
    653fdf48
    disk storage: fix allocation size for pool format dos
    Sebastian Mitterle authored and Michal Privoznik's avatar Michal Privoznik committed
    
    
    The changed condition was always false because the function was always
    called with boundary values 0.
    
    Use the free extent's start value to get its start offset from the
    cylinder boundary and determine if the needed size for allocation
    needs to be expanded too in case the offset doesn't fit within extra
    bytes for alignment.
    
    This fixes an issue where vol-create-from will call qemu-img convert
    to create a destination volume of same capacity as the source volume
    and qemu-img will error 'Cannot grow device files' due to the partition
    being too small for the source although both destination partition and
    source volume have the same capacity.
    
    Signed-off-by: default avatarSebastian Mitterle <smitterl@redhat.com>
    Reviewed-by: default avatarMichal Privoznik <mprivozn@redhat.com>
Loading