UBIFS: How to reserve space to be used right before power cut

Helmut Raiger helmut.raiger at hale.at
Mon Jun 17 05:02:54 EDT 2013


On 06/13/2013 04:20 PM, Matthieu CASTET wrote:
> Not gluebi
>
> you have a userspace inferface to ubi : /usr/include/mtd/ubi-user.h
>
>
> You could create a small ubi volume (dynamic or static) of 1 LEB next to
> ubifs (on the same ubi device).
> When you start you make sure the LEB have enough space and that the LEB
> is mapped.
>
> on a power fail signal you write the LEB with your data. Because the
> LEB is already mapped, the write should be imediate.
>
>
> If the ubi volume is on the same ubi device than ubifs, the wear
> leveling will be shared with ubifs.
>

I digged the UBI sources and still have the feeling this won't work:

1) There seems to be no way to (long term) protect a PEB from being
moved by the wear leveling sub-system (even scrubbing on bit-flips,
which may be induced by read-disturbances (reads on nearby pages)).

2) Temporary protection of a PEB is not really time specific, but depends
on global PEB erase action (i.e. anything UBIFS does on the same device),
which is something I can't control.

My impression is, that UBI simply does not support this sort of
application well. Unmoveable blocks will have a low erase count
(below average), which is exactly what the WL should avoid.

However I've never timed such a move operation:
a) move content to a new unused PEB
b) schedule original PEB for erasure
It might fit into my timing requirements, but will probably be heavily
influenced by system load and priorities.

Helmut

--
Scanned by MailScanner.




More information about the linux-mtd mailing list