root jffs2

Nicolas Pitre nico at cam.org
Wed Jun 13 17:12:41 EDT 2001


On Wed, 13 Jun 2001, Vipin Malik wrote:

> > Just committed a patch to allow mounting JFFS2 on entirely empty (erased)
> > flash.  It should speed up the mount of partially erased partitions as well
> > since the empty blocks aren't erased unnecessarily anymore.
> >
>
> I hope you have accounted for "flipping bits" (TM Vipin Malik) sectors.
> That's why the start of erase-sector signature was introduced in the first
> place.

If a sector is empty, it is simply put in the queue for signature stamping.

> If a sector does not have the signature it *must be erased* even if you read
> 0xff from
> all locations in the sector. Just writing the signature is not enough.

What do you mean by that?

> And of course, this signature must be invalidated before going in to erase the
> sector so that
> if power fails in the middle of the erase, the sector ends up being erased on
> the next mount.

If that's really necessary to re-erase them even if they are already erased
then it's just a matter of replacing "erase_complete_list" by
"erase_pending_list"  on line 97 of fs/jffs2/scan.c.

> If you don't do this, "flipping bits" will come up behind you and nip you in
> the bud :)

Please could you enlighten me on the matter?


Nicolas





More information about the linux-mtd mailing list