[PATCH] base-files: call "sync" after initial setup

Richard Weinberger richard at nod.at
Wed Mar 2 07:21:04 PST 2022


----- Ursprüngliche Mail -----
> Von: "Koen Vandeputte" <koen.vandeputte at citymesh.com>
>>> Signed-off-by: Rafał Miłecki <rafal at milecki.pl>
>>
>> Acked-by: Hauke Mehrtens <hauke at hauke-m.de>
>>
>> This is not the best solution as you said but a simple one.
>>
>> How do we handle the situation in the first boot when the overlay file
>> system is not ready yet and we are in a ramdisk in the beginning?
>>
>> Hauke
> 
> As a small addendum on this topic:
> 
> There is another way:
> 
> I also have issues with data loss on power cuts using ubifs since a few
> years now,
> exactly as described above.
> 
> As in my usecase writes are only happening at the absolute minimum (the
> user changing a config setting), I 'solved' it by simply adding
> rootflags=sync to the kernel cmdline.
> 
> This seems to force immediate flushed to nand (at the cost of maybe a
> little bit faster wear) and reduced the issue with a huge factor.
> 
> In the past before this flag, it happened nearly every powercut that
> some file got corrupted.
> after using this .. I can only recall a single case in roughly 3 years.

I guess you faced a situation like described here?
http://www.linux-mtd.infradead.org/doc/ubifs.html#L_sync_semantics

Thanks,
//richard



More information about the openwrt-devel mailing list