Add currentSize method to the PartitionDevice class (#565822)
PartitionDevice was inheriting the currentSize property from StorageDevice,
but that uses partedDevice.getSize() which returns 1024 when called on
extended partitions (as that is what the kernel reports).
This causes _setTargetSize() to try and change the extended partition geometry
even when called with the current extended partition geometry size, as
currentSize was mis-reporting the extended partition size. Since
we do end sector alignment now a days when changing the partition geometry,
we could end up making the extended partition to small to hold the
last logical partition resulting in a:
PartitionException: Unable to satisfy all constraints on the partition.
Error. This patch fixes this by adding a currentSize method to the
PartitionDevice class, which properly reports the currentSize for extended
storage/devices.py | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)