manipulator: restrict resizes to requested resizes
Example why this matters: if a disk partition is not trying to be resized, and it's actual size is not an even multiple of what align_up supports, then it could get a unrequested non-zero size change. And if there is no supporting gap for that change, then we can get a size Exception despite not having asked for a resize.
This commit is contained in:
parent
91440e6c4c
commit
942ea0f6e2
|
@ -170,7 +170,7 @@ class FilesystemManipulator:
|
|||
disk, spec, partition, gap)
|
||||
|
||||
if partition is not None:
|
||||
if 'size' in spec:
|
||||
if 'size' in spec and spec['size'] != partition.size:
|
||||
trailing, gap_size = \
|
||||
gaps.movable_trailing_partitions_and_gap_size(partition)
|
||||
new_size = align_up(spec['size'])
|
||||
|
|
Loading…
Reference in New Issue