summaryrefslogtreecommitdiffstats
path: root/autopart.py
diff options
context:
space:
mode:
authorMike Fulbright <msf@redhat.com>2001-06-27 05:31:22 +0000
committerMike Fulbright <msf@redhat.com>2001-06-27 05:31:22 +0000
commitd7c5ea0c065ac6cfa377c4b9dfe37dffc664ccaf (patch)
tree2481262e7948a27a287e8e84e44f449e7fa1525d /autopart.py
parent0ea5689df4464f8c520f01eeaf43dfc3f1250b1a (diff)
downloadanaconda-d7c5ea0c065ac6cfa377c4b9dfe37dffc664ccaf.tar.gz
anaconda-d7c5ea0c065ac6cfa377c4b9dfe37dffc664ccaf.tar.xz
anaconda-d7c5ea0c065ac6cfa377c4b9dfe37dffc664ccaf.zip
attempt to speed up convergence
Diffstat (limited to 'autopart.py')
-rw-r--r--autopart.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/autopart.py b/autopart.py
index 6535035f1..a104217d0 100644
--- a/autopart.py
+++ b/autopart.py
@@ -362,6 +362,7 @@ def growParts(diskset, requests, newParts):
growList = growable[drive]
sector_size = diskset.disks[drive].dev.sector_size
+ cylsectors = diskset.disks[drive].dev.sectors*diskset.disks[drive].dev.heads
# sort in order of request size, consider biggest first
n = 0
@@ -448,7 +449,11 @@ def growParts(diskset, requests, newParts):
lastDiff = diff
diff = max - min
- cur = max - (diff / 2)
+
+ if diff < cylsectors:
+ cur = max
+ else:
+ cur = max - (diff / 2)
inner_iter = inner_iter + 1
## print diskset.diskState()