qcow2: Return 0/-errno in qcow2_alloc_compressed_cluster_offset()
qcow2_alloc_compressed_cluster_offset() used to return the cluster offset for success and 0 for error. This doesn't only conflict with 0 as a valid host offset, but also loses the error code. Similar to the change made to qcow2_alloc_cluster_offset() for uncompressed clusters in commit 148da7ea, make the function return 0/-errno and return the allocated cluster offset in a by-reference parameter. Signed-off-by: NKevin Wolf <kwolf@redhat.com>
Showing
想要评论请 注册 或 登录