Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   64 Studio User (http://www.linux-archive.org/64-studio-user/)
-   -   Take the spec's requiredSpace into account when creating LVs. (http://www.linux-archive.org/64-studio-user/271296-take-specs-requiredspace-into-account-when-creating-lvs.html)

Chris Lumens 10-29-2009 02:58 PM

Take the spec's requiredSpace into account when creating LVs.
 
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@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


All times are GMT. The time now is 09:06 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.