Skip to content
  • Paolo Bonzini's avatar
    block: implement BDRV_O_UNMAP · 9e8f1835
    Paolo Bonzini authored
    
    
    It is better to present homogeneous hardware independent of the storage
    technology that is chosen on the host, hence we make discard a host
    parameter; the user can choose whether to pass it down to the image
    format and protocol, or to ignore it.
    
    Using DISCARD with filesystems can cause very severe fragmentation, so it
    is left default-off for now.  This can change later when we implement the
    "anchor" operation for efficient management of preallocated files.
    
    There is still one choice to make: whether DISCARD has an effect on the
    dirty bitmap or not.  I chose yes, though there is a disadvantage: if
    the guest is buggy and issues discards for data that is in use, there
    will be no way to migrate storage for that guest without downgrading
    the machine type to an older one.
    
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
    9e8f1835