garbage collect

Jason Gunthorpe jgg at
Wed Jun 28 12:34:59 EDT 2000

On Wed, 28 Jun 2000, David Woodhouse wrote:

> >  Well, we don't have any partitioning ability in the MTD stuff yet.
> Not difficult to add, at least the simple and ugly way.

We could put a partition going up backwards from the bottom of the first
erase block, that would probably not interfere with any boot loader
action. Any boot loaders that are larger than a single erase block can
integrate the ptable into their image somehow. I'd like to advoid using
any space at the start, often very specific things have to be put there,
and sometimes that window is very small..

Something like:

struct PartitionEntry
   __u32 Signature;
   __u32 StartEraseBlock;
   __u32 LengthInBlocks;
   __u32 Type;          

struct PartitionHeader
   struct PartitionEntry[PartitionCount];
   __u32 PartitionCount;
   __u32 Signature;

Which is rather alot like how FFS2 works.

> For each 'partition' define a new MTD device, for which all the methods 
> simply add an offset and pass control to the method for the 'original' MTD 
> device.

Yes, that is how other block devices work? Can we somehow reuse that
mechanism, whatever it is..


To unsubscribe, send "unsubscribe mtd" to majordomo at

More information about the linux-mtd mailing list