diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2003-08-21 00:52:41 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2003-08-21 00:52:41 +0000 |
commit | f261a1bfc75de53582a15c48f5f7df8d59ce0d95 (patch) | |
tree | 5efe10fdaadd7df5ed639ac1d0f7265e2889e595 /perl-install/fsedit.pm | |
parent | 2651790494933ba8446f0410ab2db5b196f32d1c (diff) | |
download | drakx-f261a1bfc75de53582a15c48f5f7df8d59ce0d95.tar drakx-f261a1bfc75de53582a15c48f5f7df8d59ce0d95.tar.gz drakx-f261a1bfc75de53582a15c48f5f7df8d59ce0d95.tar.bz2 drakx-f261a1bfc75de53582a15c48f5f7df8d59ce0d95.tar.xz drakx-f261a1bfc75de53582a15c48f5f7df8d59ce0d95.zip |
allocatePartitions() resulted in a small unallocated area at the end of the
drive when:
- suggest_part() reserves some room for the other partitions which are going to
be added next. For maxsize limited partition, it reserves maxsize (if maxsize
is reached)
- suggest_part() which adds the last partition limited by maxsize can be
called on a partition a little bigger than maxsize due to cylinder boundary
adjustments on previous partition creations. In that case, it doesn't use the
full area.
It occured for example with the current $fsedit::suggestions{server}.
The fix chosen is to ensure the last suggest_part() is called with a size
defined as maxsize <= size < maxsize + cylinder_size.
Diffstat (limited to 'perl-install/fsedit.pm')
-rw-r--r-- | perl-install/fsedit.pm | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/perl-install/fsedit.pm b/perl-install/fsedit.pm index 318892f87..897b387bb 100644 --- a/perl-install/fsedit.pm +++ b/perl-install/fsedit.pm @@ -424,6 +424,7 @@ sub computeSize { 1; } else { 0 } } @$suggestions; + my $cylinder_size_maxsize_adjusted; my $tot_ratios = 0; while (1) { my $old_free_space = $free_space; @@ -437,6 +438,9 @@ sub computeSize { $_->{size} + $_->{ratio} / $tot_ratios * $old_free_space >= $_->{maxsize}) { return min($max, $best->{maxsize}) if $best->{mntpoint} eq $_->{mntpoint}; $free_space -= $_->{maxsize} - $_->{size}; + if (!$cylinder_size_maxsize_adjusted++) { + eval { $free_space += part2hd($part, $all_hds)->cylinder_size - 1 }; + } 0; } else { $_->{ratio}; |