UBI/UBIFS interrupted write page handling
dedekind1 at gmail.com
Mon Sep 20 14:14:38 EDT 2010
On Thu, 2010-09-09 at 20:51 +0300, Artem Bityutskiy wrote:
> > On one of our test, we are in case 3. Ubifs find a valid interrupt page
> > on mount and trust it. Latter the page become corrupted  because it
> > is unstable.
> OK, I see.
> > To identify a interrupted write page we :
> > - could use interrupted flags for static volume
> > - handle with care data move (copy flags) : if sqnum of the copy is the
> > biggest, we should ignore it/copy it.
> > - use upper layer for dynamic volume. For ubifs this could be a journal.
> Actually, for UBIFS things are rather simple. In UBIFS every writes go
> to the journal. Even GC writes to the journal. So when we are mounting
> after an unclean reboot, we can simply refresh the last LEBs of all
> journal heads using the 'ubi_leb_change()' call. This should handle all
> the three cases you describe.
> I do not think it is very difficult to do.
Matthieu, I can try to do to make some patches for you, but when you
come back on-line and start actively testing :-) I do want to help you
and improve UBIFS, but I'm not very motivated to do this unless this is
really needed. I think we have few other pending issues, and the ball is
on your side. :-)
Artem Bityutskiy (Битюцкий Артём)
More information about the linux-mtd