partitions and erase regions
Kári Davíðsson
kd at flaga.is
Wed Apr 25 05:36:46 EDT 2001
> -----Original Message-----
> From: David Woodhouse [mailto:dwmw2 at infradead.org]
> Sent: 24. apríl 2001 17:41
> To: Kári Davíðsson
> Cc: mtd at infradead.org; nico at cam.org
> Subject: Re: partitions and erase regions
>
>
>
> kd at flaga.is said:
> > It sounds reasonable to me. Although I have a problem with
> the "major"
> > erazesize in general. The erase regions are in the flash
> for a reason,
> > i.e. the chip is not of one "major" erase size but of many erase
> > sizes, although most of it (untill now, who knows what AMD,
> Intel and
> > others might do in the future 8-)) is of one erase size.
>
> I have a strong suspicion that we'll never see chips without
> a 'major'
Yes you are probably right.
> erasesize. Making all clients (such as JFFS2) deal with
> variable erase
> sizes is possible, but IMHO suboptimal. If we can avoid that
> complexity, it
> would be nice.
Of course, but I was kind of arguing that maybe it might even be
simpler (code wise) to have one access mechanism to the sector
boundaries
rather than two. And we can not get away with the simple offset %
mtd->erasesize
because of the 'minor' erase sizes.
I have not checked the client codes or where the mtd->erasesize is used,
but I
have an image in my head that is something like,
erase_regions * er;
//Used instead of offset % mtd->erasesize == 0
//returns 0 if on sector boundary
//nonzero otherwise
int mtd_er_isonboundary(er, offset);
//returns the size from offset to next sector boundary
int mtd_er_sizeleft(er, offfset);
There might be couple of other methods necessary, depeneding on how the
mtd->erasesize member is used.
How does JFFS[2] deal with the whole flash chip today?
If it just deals with 'major' erase size then it shurely must
simply ingore the first/last part (with 'minor' erase sizes) of the
chip.
>
> Perhaps, however, we should provide a way for clients which
> _do_ know about
> variable erase regions to write to partitions which don't
> have a 'major'
> erasesize.
Yes, that was my thinking of the "virtual erase region" code.
>
> --
> dwmw2
K.D.
To unsubscribe, send "unsubscribe mtd" to majordomo at infradead.org
More information about the linux-mtd
mailing list