Skip to content
  • Peter Lieven's avatar
    block: introduce bdrv_make_zero · d75cbb5e
    Peter Lieven authored
    
    
    this patch adds a call to completely zero out a block device.
    the operation is sped up by checking the block status and
    only writing zeroes to the device if they currently do not
    return zeroes. optionally the zero writing can be sped up
    by setting the flag BDRV_REQ_MAY_UNMAP to emulate the zero
    write by unmapping if the driver supports it.
    
    Signed-off-by: default avatarPeter Lieven <pl@kamp.de>
    Signed-off-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
    d75cbb5e