UBIFS: How to reserve space to be used right before power cut
Matthieu CASTET
matthieu.castet at parrot.com
Thu Jun 13 10:20:28 EDT 2013
Le Thu, 13 Jun 2013 14:29:24 +0100,
Raiger Helmut <helmut.raiger at hale.at> a écrit :
>
>
> > ----- Original Message -----
> > From: "Matthieu CASTET" <matthieu.castet at parrot.com>
> > To: "Helmut Raiger" <helmut.raiger at hale.at>
> > Cc: linux-mtd at lists.infradead.org
> > Sent: Thursday, June 13, 2013 1:50:31 PM
> > Subject: Re: UBIFS: How to reserve space to be used right before
> > power cut
> >
> > Hi,
> >
> > Why do you do this in ubifs ?
> >
> > If you do it in ubi/mtd this will be a lot's of easier.
> >
> > Matthieu
>
> I wasn't aware of an userspace interface for ubi/mtd, but just found
> out about gluebi. Is this the path you suggest?
>
> Could you please elaborate a bit more on this, I'm still unsure if
> this will meet our timing constraints (background operation of ubi?)
>
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.
More information about the linux-mtd
mailing list