Re: [PATCH/RFC] Linux MTD striping middle layer

Alexander Belyakov
2006-03-22T14:40:16Z

Artem B. Bityutskiy wrote:
> Nicolas Pitre wrote:
>>> Why? I don't see any thing bad with having 3*128KiB eraseblock size...
>> I agree with you ....... as long as someone is willing to audit all
>> MTD client code to certify that no assumption about erase block sizes
>> being a power of 2 is present.
>
> Well, there is no much client code. JFFS2 is happy with this size. If
> some client is not happy, this is its problems. This client just has
> to be fixed or not use striping with non-power-of-two devices. Indeed,
> striping is a distinct layer and is not compulsory to use.
>
> I don't see any reason in prohibiting striping 3 devices, or 5
> devices. Just because power of 2 is digits are widely used is not a
> serious argument.
>
In MTD code I saw alignment checks looking like this:

if (instr->addr & (concat->mtd.erasesize - 1))
return -EINVAL;

It will fail if erasesize is not power-of-two number.

Anyway interleaving algorithm itself makes no assumptions about number
of subdevices. So code in the patch can be used to stripe 3, 5, etc
devices. Just remove or replace alignment checks from stripe_erase()
routine. It should work.

Thanks,
Alexander Belyakov