[parted-devel] [PATCH] cylinder boundries in msdos

Jim Meyering jim at meyering.net
Mon Apr 13 06:48:00 UTC 2009


H. Peter Anvin wrote:
> Jim Meyering wrote:
>>
>> Hi Joel,
>>
>> I'm all for modernizing parted so that it can use
>> more sensible alignment, but any new behavior must be
>> enabled solely via options.  The default behavior must not change.
>
> Why?

So that parted continues to work.  The alignment code is very fragile.
I have seen too many instances where choosing a slightly different
starting or ending sector number makes the difference between success
and failure.  Other times, parted's constraint management code will
amplify a tiny change in inputs to a disproportionately large or
nonsensical-looking change in the size or location of a partition.

Changing so fundamental a default would be bound to have
unintended consequences.

> The default should typically be what most users should be using.

The flip response is that "most users" should not use parted directly.
However, those who do may do something like this:

  how to use parted to create partitions aligned to 128KiB boundaries:
  http://www.mail-archive.com/parted-devel@lists.alioth.debian.org/msg02273.html

I'm concerned that if we change the defaults, it will break for some of
those existing users.

Then there's the issue of the API (library and command line).
If you change the default, you still need a way to provide the old behavior.
And all of that means exposing to the API something that is currently
not exposed at all.  This would not be a small change.

Given the small amount of test coverage, the overall fragility,
and the limited amount of time I can spend on parted,
making fundamental changes would be unwise.



More information about the parted-devel mailing list