UBIFS File-System Being Hardened Against Power Loss Scenarios

While most Linux file-systems are rather robust in recovering when the system experiences a power loss, the UBIFS file-system is more prone to problems when a power-cut happens. With patches submitted for the Linux 6.11 merge window, UBIFS is seeing some hardening so it can better cope with the loss of power.
The Unsorted Block Image File System (UBIFS) for flash memory devices can run into problems and have an inconsistent file-system state if the power is unexpected lost. Fortunately most UBIFS use on smartphones or other devices are battery-backed and can safely power down in advance of the battery being exhausted, but with Linux 6.11 are some hardening improvements for UBIFS to deal with this situation.
A set of nine patches are part of the UBIFS pull request for Linux 6.11 to tackle some of the inconsistent problems that can happen when there is a powercut. These fixes and hardening make the flash file-system more robust, but does come with some small performance costs. Sequential writes in testing by developer Zhihao Cheng led to a drop from 412MB/s to 409MB/s, the FS-Mark benchmark dropping from 7131 files/s to 7090 files/s, and other small performance drops noted as a result of these patches. But a small performance cost is better than potential data loss in the event of unexpectedly losing power.
This better UBIFS handling of power-cut situations was sent in as part of the UBIFS pull request for the Linux 6.11 merge window set to end this weekend.

Latest articles

Related articles