Live data from Hacker News

The design of littlefs: A fail-safe filesystem designed for microcontrollers

github.com

1–10 of 74 posts

Re: The design of littlefs: A fail-safe filesystem designed for microcontrollers

#6
"Usually, microcontroller code is simple and reactive, with no concept of a shutdown routine."

Really? Nobody uses brownout interrupts to lock down on power loss? I almost always do a few things as the power is fading, flagging the situation at the very least in order to clean up when power is restored.

Re: The design of littlefs: A fail-safe filesystem designed for microcontrollers

#7

"Usually, microcontroller code is simple and reactive, with no concept of a shutdown routine." Really? Nobody uses brownout interrupts to lock down on power loss? I almost always do a few things as the power is fading, flagging the situation at the very least in order to clean up when power is restored.

Also why not chuck a capacitor in the mix to provide a little power buffer to shutdown the filesystem gracefully.

Re: The design of littlefs: A fail-safe filesystem designed for microcontrollers

#8

"Usually, microcontroller code is simple and reactive, with no concept of a shutdown routine." Really? Nobody uses brownout interrupts to lock down on power loss? I almost always do a few things as the power is fading, flagging the situation at the very least in order to clean up when power is restored.

Really. It's best not to trust on shutdown procedures for fail-safe persistence if that really is important. Use log-structured file-system and do cleanup and verification when the power is restored. When microcontrollers have brownouts, it's best to assume that you may have already garbage in the memory bus.

Of course, when improved fail-safety exist just to improve reliability measured in hours and fail-safety is not critical function, all what I said is irrelevant.

Re: The design of littlefs: A fail-safe filesystem designed for microcontrollers

#9

"Usually, microcontroller code is simple and reactive, with no concept of a shutdown routine." Really? Nobody uses brownout interrupts to lock down on power loss? I almost always do a few things as the power is fading, flagging the situation at the very least in order to clean up when power is restored.

Also why not chuck a capacitor in the mix to provide a little power buffer to shutdown the filesystem gracefully.

It adds quite some space and probably costs as much as the MCU.

Re: The design of littlefs: A fail-safe filesystem designed for microcontrollers

#10
post #5

Afaict checksums only cover metadata and it doesn't do any read integrity checking, isn't that bad when talking to raw flash devices since it relies on them accurately reporting errors?

I wonder if that was intended to be done by the user at file level.
Post reply on HN