• K
    qcow2: Fix qcow2_get_cluster_offset() for zero clusters · a99dfb45
    Kevin Wolf 提交于
    When searching for contiguous zero clusters, we only need to check the
    cluster type. Before this patch, an increasing offset (L2E_OFFSET_MASK)
    was expected, so that the function never returned more than a single
    zero cluster in practice. This patch fixes it to actually return as many
    contiguous zero clusters as it can.
    
    Cc: qemu-stable@nongnu.org
    Signed-off-by: NKevin Wolf <kwolf@redhat.com>
    Message-id: 1446657384-5907-1-git-send-email-kwolf@redhat.com
    Signed-off-by: NMax Reitz <mreitz@redhat.com>
    a99dfb45
qcow2-cluster.c 58.8 KB