mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
Cache the immutable cluster_size value at construction time in QcowAsync, QcowSync, and Qcow2Backing. This avoids repeated RwLock read acquisitions on the hot write and deallocation paths. Replace QcowMetadata::cluster_offset() calls with inline bitmask operations using the cached cluster_size. Remove the now unused cluster_offset() method from QcowMetadata. Signed-off-by: Anatol Belski <anbelski@linux.microsoft.com>