]> xenbits.xensource.com Git - libvirt.git/commit
storage: Adjust calculation of alloc/capacity for disk
authorJohn Ferlan <jferlan@redhat.com>
Thu, 1 Oct 2015 15:37:17 +0000 (11:37 -0400)
committerJohn Ferlan <jferlan@redhat.com>
Mon, 5 Oct 2015 12:14:44 +0000 (08:14 -0400)
commit1895b42114c932495c2242d6847e47c054955998
treee70493d37fc650c34fbc6e2a5a0a694b36e3e55c
parent657f3bea8ded929c16dd96bb3c02d88af4c71a1b
storage: Adjust calculation of alloc/capacity for disk

https://bugzilla.redhat.com/show_bug.cgi?id=1247987

Calculation of the extended and logical partition values for the disk
pool is complex. As the bz points out an extended partition should have
it's allocation initialized to 0 (zero) and keep the capacity as the size
dictated by the extents read.  Then for each logical partition found,
adjust the allocation of the extended partition.

Finally, previous logic tried to avoid recalculating things if a logical
partition was deleted; however, since we now have special logic to handle
the allocation of the extended partition, just make life easier by reading
the partition table again - rather than doing the reverse adjustment.
src/storage/storage_backend_disk.c