FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Red Hat Install

 
 
LinkBack Thread Tools
 
Old 03-15-2009, 07:56 PM
David Lehman
 
Default Fix secondary search for freespace in extended partition.

This is just some leftovers from the last time I fixed the tracking
of the free region and it's containing disk.
---
storage/partitioning.py | 22 +++++++++++-----------
1 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/storage/partitioning.py b/storage/partitioning.py
index cf151d1..5b9e02b 100644
--- a/storage/partitioning.py
+++ b/storage/partitioning.py
@@ -653,21 +653,21 @@ def allocatePartitions(disks, partitions):
part_type == parted.PARTITION_NORMAL:
# see if we can do better with a logical partition
log.debug("not enough free space for primary -- trying logical")
- part_type = getNextPartitionType(disk, no_primary=True)
- if part_type:
- free = getBestFreeSpaceRegion(disk,
+ new_part_type = getNextPartitionType(disk, no_primary=True)
+ if new_part_type:
+ best = getBestFreeSpaceRegion(disk,
part_type,
_part.req_size,
best_free=free,
boot=_part.req_bootable)
- elif best:
- if free != best:
- # now we know we are choosing a new free space,
- # so update the disk and part type
- log.debug("updating use_disk to %s (%s), type: %s"
- % (_disk, _disk.name, new_part_type))
- part_type = new_part_type
- use_disk = _disk
+
+ if best and free != best:
+ # now we know we are choosing a new free space,
+ # so update the disk and part type
+ log.debug("updating use_disk to %s (%s), type: %s"
+ % (_disk, _disk.name, new_part_type))
+ part_type = new_part_type
+ use_disk = _disk
log.debug("new free: %s (%d-%d / %dMB)" % (best,
best.start,
best.end,
--
1.6.0.6

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 03-16-2009, 02:53 PM
David Lehman
 
Default Fix secondary search for freespace in extended partition.

>
> I think this should be new_part_type here too. more in general
> allocatePartitions seems to mix and match part_type and new_part_type,
> where it should use only one variable for these everywhere.

Right. We need two separate variables -- one to hold the type that
corresponds to the current chosen free region, and one to hold the type
that we are manipulating throughout the loop. New patch attached.

Dave

>
> > _part.req_size,
> > best_free=free,
> > boot=_part.req_bootable)
> > - elif best:
> > - if free != best:
> > - # now we know we are choosing a new free space,
> > - # so update the disk and part type
> > - log.debug("updating use_disk to %s (%s), type: %s"
> > - % (_disk, _disk.name, new_part_type))
> > - part_type = new_part_type
> > - use_disk = _disk
> > +
> > + if best and free != best:
> > + # now we know we are choosing a new free space,
> > + # so update the disk and part type
> > + log.debug("updating use_disk to %s (%s), type: %s"
> > + % (_disk, _disk.name, new_part_type))
> > + part_type = new_part_type
> > + use_disk = _disk
> > log.debug("new free: %s (%d-%d / %dMB)" % (best,
> > best.start,
> > best.end,
>
> Regards,
>
> Hans
>
> _______________________________________________
> Anaconda-devel-list mailing list
> Anaconda-devel-list@redhat.com
> https://www.redhat.com/mailman/listinfo/anaconda-devel-list
_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 

Thread Tools




All times are GMT. The time now is 02:37 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org