UBIFS: is the corrupted file in a finite state when power cut ?

Zhihao Cheng chengzhihao1 at huawei.com
Fri May 6 20:04:25 PDT 2022


>> Q4. power cut only lost whole min I/O unit size ?
>>
>>     with 2048 bytes min io unit size. write 100 bytes in one write() 
>> call.
>>     it's not possible that seen 20 bytes with 80 bytes lost.
It is possible that seen 20 bytes with 80 bytes lost.

UBIFS writes data content in PAGE unit(We assume that page_size equals 
to 4096), for example (See ubifs_writepage() and generic_perform_write()):


         20B  80B
          ↓   ↓
|  PAGE1   |    PAGE2 |
            ↑
          powercut!



More information about the linux-mtd mailing list