ubifs: handling dirty data (writing back) + power cuts

Rafał Miłecki zajec5 at gmail.com
Fri Feb 25 06:25:39 PST 2022


On 25.02.2022 15:17, Rafał Miłecki wrote:
> My actual problem is related to ubifs behaviour for power cuts happening
> between 5 and 35 seconds after saving a file:
> date > /mount/ubifs/test.txt && sleep 15 && echo CUT POWER *NOW*
> 
> On the next boot test.txt exists but it's EMPTY (file size 0).

FWIW I get acceptable ubifs behaviour if power cut happens in less than
5 seconds after saving a file. For example:
date > /mount/ubifs/foo.txt && sleep 4 && echo CUT POWER *NOW*

On the next boot foo.txt simply doesn't exist.


Everything works fine for power cuts happening after 30 + 5 seconds:
date > /mount/ubifs/bar.txt && sleep 35 && echo CUT POWER *NOW*

On the next boot bar.txt exists and it contains a date.



More information about the openwrt-devel mailing list