[partition] Reduce the fudge-factor for swap size
- Reported by Bill Auger (I think), a 15GiB disk wouldn't hold a 8.9GiB root plus 4GiB swap -- due to 10% overprovisioning of swap, plus the 2.1GiB fudge factor.
This commit is contained in:
parent
f10bab8a3a
commit
238a1e812f
@ -181,8 +181,11 @@ doAutopartition( PartitionCoreModule* core, Device* dev, const QString& luksPass
|
||||
{
|
||||
qint64 availableSpaceB = ( dev->totalLogical() - firstFreeSector ) * dev->logicalSize();
|
||||
suggestedSwapSizeB = swapSuggestion( availableSpaceB );
|
||||
// Space required by this installation is what the distro claims is needed
|
||||
// (via global configuration) plus the swap size plus a fudge factor of
|
||||
// 0.6GiB (this was 2.1GiB up to Calamares 3.2.2).
|
||||
qint64 requiredSpaceB =
|
||||
GiBtoBytes( gs->value( "requiredStorageGB" ).toDouble() + 0.1 + 2.0 ) +
|
||||
GiBtoBytes( gs->value( "requiredStorageGB" ).toDouble() + 0.6 ) +
|
||||
suggestedSwapSizeB;
|
||||
|
||||
// If there is enough room for ESP + root + swap, create swap, otherwise don't.
|
||||
|
Loading…
Reference in New Issue
Block a user