ubifs robustness with early power cut warning

Richard Weinberger richard.weinberger at gmail.com
Sat Sep 30 09:19:09 PDT 2017


On Sat, Sep 30, 2017 at 1:20 AM, Doug Crawford <dcraw101 at gmail.com> wrote:
> We have an embedded system with an early power loss warning.  The
> power supply drives a powerdown signal connected to a GPIO pin on the
> CPU.  When AC power is switched off the power supply drives this
> signal low for 500 milliseconds before the CPU gets held in reset.  If
> AC power is switched back on before 500 milliseconds the powerdown
> signal goes high again and the system is expected to continue running
> normally.
>
> I am wondering if there is a way to easily modify ubifs/ubi such that
> when the powerdown gpio is low VFS or UBIFS or UBI freezes or pauses
> further writes to the NAND.  If powerdown recovers to high again then
> the filesystem would unfreeze and allow further writes?  Has anyone
> implemented something like this before?  I know UBIFS/UBI is designed
> to be very resilient to power cuts, but I am thinking this technique
> might make the system even more resilient.  If I were to make this
> change which file would be the right one to hook into:
> fs/ubifs/super.c?

UBI/UBIFS is the wrong layer, this needs to happen in MTD.

-- 
Thanks,
//richard



More information about the linux-mtd mailing list