Bug#268830: autopartkit: Fail to use the whole disk
Package: autopartkit
Version: 0.87
Severity: important
There is a slight miscalculation in the code calculating partition
sizes. The consequence is that a fraction of the disk is unused, and
the fraction gets larger for larger disks, and also scales with the
amount of partitions on a disk.
This patch fixes the problem. I'm unable to commit this to SVN now,
as the repository is unavailable.
* Petter Reinholdtsen
- Correct partition size calculations, make sure we fill the disks
when possible.
Index: distribute.c
===================================================================
--- distribute.c (revision 18355)
+++ distribute.c (working copy)
@@ -178,6 +178,7 @@
newsize = reqs[j].max_blk;
/* We know the new size. Activate it */
+ total_wanted -= reqs[j].max_blk - reqs[j].min_blk;
diskinfo[i].freespace -= newsize - reqs[j].blocks;
reqs[j].blocks = newsize;
}
Reply to: