[parted-devel] [PATCH] parted: improve snapping to boundaries of free space

Petr Uzel puzel at suse.cz
Wed Feb 8 14:45:19 UTC 2017


On Tue, Jan 31, 2017 at 02:11:43PM -0500, Phil Susi wrote:
> On 10/23/2015 10:08 AM, Petr Uzel wrote:
> > When creating a new partition, parted tries to snap its boundaries.
> > If the new partition lies within free space, it only makes sense
> > to snap it so that is it bigger, not smaller.
> 
> I had flagged this to look at and forgot about it for a while.  Why do
> you say that it only makes sense to snap it bigger?

It is a heuristic which tries to guess expectation of the user. 
 
> If you create a partition in the middle of a wide open free space, why
> shouldn't it become slightly larger to fit the alignment?

Hm, you lost me. If you create a new partition in the middle of wide
open free space, there will be no snapping involved. The problematic
situation this patch is trying solve comes when the newly created
partition is supposed to be small and close to other existing
partitions. Then because of the old snapping logic the resulting
partition could end up much smaller than what the user has expected.


        Petr

-- 
Petr Uzel
Director Packaging/L3
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/parted-devel/attachments/20170208/4c014cb0/attachment.sig>


More information about the parted-devel mailing list