[PATCH] mtd: cfi: Wait for Block Erase operation to finish

Joakim Tjernlund joakim.tjernlund at transmode.se
Tue Mar 13 09:33:24 EDT 2012


Artem Bityutskiy <dedekind1 at gmail.com> wrote on 2012/03/13 14:09:09:
>
> On Tue, 2012-03-13 at 13:55 +0100, Joakim Tjernlund wrote:
> > >
> > > On Tue, 2012-03-13 at 09:27 +0100, Joakim Tjernlund wrote:
> > > > >
> > > > > On Fri, 2012-03-02 at 15:30 +0100, Joakim Tjernlund wrote:
> > > > > > yes, UBI probably has some different use. One seems that it keeps
> > > > > > erasing the
> > > > > > same block over and over again if the erase fails. JFFS2 doesn't do
> > > > > > that since
> > > > > > you can't trust a block that is failing erase(how can you be sure that
> > > > > > write will work?)
> > > > > > So, IMHO, UBIFS should reconsider this policy.
> > > > >
> > > > > The thread is very long and I would like save my time by not going
> > > > > through it. But if you could start a new thread and formulate the
> > > > > problem with UBI, I could think about it a bit. I am open to change
> > > > > policies if it is not too much work.  Otherwise I am open to give hints
> > > > > and suggestions and accept patches which change the policy. :-)
> > > >
> > > > I just noted from one of the logs Paul sent, it LOOKED like UBI tried
> > > > to erase the same sector several times if erase failed, gave me the impression
> > > > that UBI would try erasing a failing sector over and over again.
> > > > I think Paul will have to provide details if this is the case or not.
> > >
> > > Correct, UBI does retry erasing several times, see function
> > > 'do_sync_erase()' in drivers/mtd/ubi/io.c. Why would this be a problem?
> >
> > How can you trust a sector that fails to erase several times and then suddenly works ?
>
> It could be a transient error, some random noise in the line, some
> electrons did not want to move by an accident, something like this :-)
>
> But I guess it does not make much sense for erase and write. For read it
> does make sense to re-try. I am happy to accept a patch.

I am not using UBIFS(yet anyway) so don't wait for me.

 Jocke




More information about the linux-mtd mailing list