ubifs : corruption after power cut test
Artem Bityutskiy
dedekind1 at gmail.com
Wed Aug 4 12:14:57 EDT 2010
On Mon, 2010-08-02 at 11:32 +0200, Matthieu CASTET wrote:
> Matthieu CASTET a écrit :
> > Hi,
> >
> > Matthieu CASTET a écrit :
> >> Artem Bityutskiy a écrit :
> >> Ok thanks, I will run it
> >>
> >> When checking the code, I saw that switch_gc_head can set c->gc_lnum to -1.
> >>
> >> In ubifs_put_super, we set c->mst_node->gc_lnum to c->gc_lnum and write
> >> master node.
> >> Can't ubifs_put_super run while switch_gc_head set gc_lnum to -1 ?
> >>
> > I manage to reproduce it with the backtrace [1].
> >
> Waiting for a proper fix, I force recovery if gc_lnum to
The workaround looks ok, but I still do not understand how we end up
with writing -1. The only place c->gc_lnum is set to -1 is in GC, but it
is then initialized properly, and only error can cause GC to return with
c->gc_lnum == -1, in which case we switch to R/O mode immediately.
Is your UBIFS identical to what I have in my 2.6.27 back-port tree?
Also, I will have really little time till the beginning of September, so
probably this will wait...
--
Best Regards,
Artem Bityutskiy (Артём Битюцкий)
More information about the linux-mtd
mailing list