summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2009-04-15 17:00:03 +0200
committerHans de Goede <hdegoede@redhat.com>2009-04-15 17:32:51 +0200
commitbb6da8335eaafc6d5a341b68ceef22c03d1f9166 (patch)
treed77ee9eb26b25091ccdceaf179c0de0ea98ee1e8
parentd9e6dbc8e416fefcabfac4bdb508c3197f937bf2 (diff)
use partition req_base_size instead of size in partitionCompare()
Currently we are using part.size in partitionCompare(), this will return the grown size of a partition if it is already grown at this point, potentially changing the order in which we allocate partitions while we are growing. By using req_base_size we will always allocate the partitions in the same order while growing multiple partitions.
-rw-r--r--storage/partitioning.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/storage/partitioning.py b/storage/partitioning.py
index 9d298bb7e..7a597475a 100644
--- a/storage/partitioning.py
+++ b/storage/partitioning.py
@@ -373,7 +373,7 @@ def partitionCompare(part1, part2):
ret -= cmp(part1.req_primary, part2.req_primary) * 200
# larger requests go to the front of the list
- ret -= cmp(part1.size, part2.size) * 100
+ ret -= cmp(part1.req_base_size, part2.req_base_size) * 100
# fixed size requests to the front
ret += cmp(part1.req_grow, part2.req_grow) * 50