• M
    qcow2: Make qcow2_alloc_bytes() more explicit · 2ac01520
    Max Reitz 提交于
    In case of -EAGAIN returned by update_refcount(), we should discard the
    cluster offset we were trying to allocate and request a new one, because
    in theory that old offset might now be taken by a refcount block.
    
    In practice, this was not the case due to update_refcount() generally
    returning strictly monotonic increasing cluster offsets. However, this
    behavior is not set in stone, and it is also not obvious when looking at
    qcow2_alloc_bytes() alone, so we should not rely on it.
    Reported-by: NKevin Wolf <kwolf@redhat.com>
    Signed-off-by: NMax Reitz <mreitz@redhat.com>
    Signed-off-by: NKevin Wolf <kwolf@redhat.com>
    2ac01520
qcow2-refcount.c 82.7 KB