[PATCH/RFC] Linux MTD striping middle layer
Alexander Belyakov
alexander.belyakov at intel.com
Wed Mar 22 04:39:43 EST 2006
Artem,
>> Subdevices are mtd devices which participate in creation of striped mtd
>> device (superdevice). vol1, vol2 here are the names of subdevices
>> assigned on partitioning stage (for example) by the following part of
>> kernel configuration string:
>> CONFIG_CMDLINE="..........
>> mtdparts=flash1:512k(blob)ro,2m(kernel)ro,16m(root),16m(vol1);flash2:16m(vol2),8m(vol3)
>> ........."
>>
> IMO, it is better to use MTD device numbers. 0 = mtd0, 1 = mtd1, etc. I
> can always glance at /proc/mtd and realize which numbers to use. Names
> may contain white spaces, or whatever inappropriate characters one may
> conceive, right?
>
At the stage of writing CONFIG_CMDLINE (mtdpart and mtdstripe parts)
user generally do not know what mtd device number will be assigned to
each partition. Using names IMO is a better solution if mtdstripe is a
built-in module since user gives and uses partition names by himself.
Using /proc/mtd and stripe mtd device by number (your suggestion) can be
quite good for loadable from command line mtdstripe.ko module. But using
two different configuration methods for built-in and loadable module can
be quite confusing for user.
>>> 4. I erase eraseblock 0 of mtd7
>>>
>> In simple case eraseblock 0 on both subdevices 1 and 2 will be erased
>>
> I see. Why did you say "In simple case" ?
Suggested algorithm supports striping for devices with different
erasesize. In that (quite uncommon) case erasesize of superdevice is not
just erasesize of subdevice multiplied by number of subdevices.
Thanks,
Alexander Belyakov
More information about the linux-mtd
mailing list