Skip to content
Snippets Groups Projects
  • Eric Blake's avatar
    dbc636e7
    vhdx: Rework truncation logic · dbc636e7
    Eric Blake authored
    
    The vhdx driver uses truncation for image growth, with a special case
    for blocks that already read as zero but which are only being
    partially written.  But with a bit of rearranging, it's just as easy
    to defer the decision on whether truncation resulted in zeroes to the
    actual allocation attempt, reducing the number of places that still
    use bdrv_has_zero_init_truncate.
    
    Signed-off-by: default avatarEric Blake <eblake@redhat.com>
    Message-Id: <20200428202905.770727-9-eblake@redhat.com>
    Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
    dbc636e7
    History
    vhdx: Rework truncation logic
    Eric Blake authored
    
    The vhdx driver uses truncation for image growth, with a special case
    for blocks that already read as zero but which are only being
    partially written.  But with a bit of rearranging, it's just as easy
    to defer the decision on whether truncation resulted in zeroes to the
    actual allocation attempt, reducing the number of places that still
    use bdrv_has_zero_init_truncate.
    
    Signed-off-by: default avatarEric Blake <eblake@redhat.com>
    Message-Id: <20200428202905.770727-9-eblake@redhat.com>
    Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>