]> git.proxmox.com Git - mirror_qemu.git/blobdiff - block/qcow2-cluster.c
Merge remote-tracking branch 'remotes/elmarco/tags/tidy-pull-request' into staging
[mirror_qemu.git] / block / qcow2-cluster.c
index 8538533102bb029849857d183807f653e15d9799..0d4824993cc1fdeb46c1f7b79f189d05c3aeccc3 100644 (file)
@@ -61,7 +61,7 @@ int qcow2_grow_l1_table(BlockDriverState *bs, uint64_t min_size,
             new_l1_size = 1;
         }
         while (min_size > new_l1_size) {
-            new_l1_size = (new_l1_size * 3 + 1) / 2;
+            new_l1_size = DIV_ROUND_UP(new_l1_size * 3, 2);
         }
     }