[parted-devel] [PATCH 6/6] libparted: fix optimal IO alignment

Jim Meyering jim at meyering.net
Wed Dec 19 16:45:34 UTC 2012


Phillip Susi wrote:

> On 12/16/2012 02:09 AM, Jim Meyering wrote:
>> I'd be suspicious because it's smaller than 1MiB and not a power of
>> 2. Have you seen opt/min values like that?
>
> Sure, take a 4 disk raid5 with 256k stripe factor.

Am I misunderstanding something?
256k is both smaller than 1MiB and *is* a power of 2.
I was asking if you'd seen values *not* like that.

>> I suspect that the existing code is the way it is for a good
>> reason, hence my reluctance to gut it. What if some system reports
>> totally bogus min. or opt. values < 1MiB? As it is now, parted will
>> ignore them.  But with your patch, it would use them and leave the
>> user with poorly-aligned partitions.
>
> Then that's a bug in the kernel.  Parted shouldn't ignore the kennel
> on the off chance that some day somehow for someone it will have a bug.

I guess it comes down to whether there are systems
that return bogus values there, and whether there are
systems that return legit values smaller < 1MiB, like
I was asking about above.

I'd prefer the more conservative patch I posted, since it
allows alignment/opt. values larger than 1MiB (addressing the
original problem) without risking as much.



More information about the parted-devel mailing list