[PATCH 3/5] Take the spec's requiredSpace into account when creating LVs.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This allows us to disregard certain requests when there's not enough
space in the VG for the request to make any sense.
---
 storage/partitioning.py |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/storage/partitioning.py b/storage/partitioning.py
index 1e2ee40..f785b0e 100644
--- a/storage/partitioning.py
+++ b/storage/partitioning.py
@@ -129,6 +129,8 @@ def _scheduleLVs(anaconda, devs):
     vg = anaconda.id.storage.newVG(pvs=pvs)
     anaconda.id.storage.createDevice(vg)
 
+    initialVGSize = vg.size
+
     #
     # Convert storage.autoPartitionRequests into Device instances and
     # schedule them for creation.
@@ -138,6 +140,9 @@ def _scheduleLVs(anaconda, devs):
         if not request.asVol:
             continue
 
+        if request.requiredSpace and request.requiredSpace > initialVGSize:
+            continue
+
         if request.fstype is None:
             request.fstype = anaconda.id.storage.defaultFSType
 
-- 
1.6.5.1

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux