
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.