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

2021-10-26 Thread Pavel Hrdina
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

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

2021-10-25 Thread Jiri Denemark
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.