[libvirt PATCH] storage_file: Compute QCOW2 cluster size as ULL

Pavel Hrdina phrdina at redhat.com
Tue Oct 26 07:16:44 UTC 2021


On Mon, Oct 25, 2021 at 05:32:43PM +0200, Jiri Denemark wrote:
> While the QCOW2 cluster size is represented in only 4 bits in the QCOW2
> header and thus 1 << cluster_size cannot overflow int,
> qcow2GetClusterSize is supposed to return unsigned long long so we can
> just compute the result as ULL rather than computing it as int and
> promoting to unsigned long long.
> 
> Signed-off-by: Jiri Denemark <jdenemar at redhat.com>
> ---
>  src/storage_file/storage_file_probe.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Pavel Hrdina <phrdina at redhat.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20211026/f9b21f68/attachment-0001.sig>


More information about the libvir-list mailing list