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

袁建鹏 yuanjp89 at 163.com
Sun Apr 24 02:32:51 PDT 2022


These questions puzzles me a lot, and not mentioned in ubifs documents.

Q1. Power cut while writting to a new file,  does the file is in the following finite state, not possible in other state, right ?

	1. the file not exists.
	
	2. the file is empty.
	
	3. the file size is partial, but no tail hole.
	
	4. the file size is partial, but with tail hole.
	
	5. the file size is entire, but with tail hole.
	
	6. the file is right.

Q2. Power cut while truncating old file then write

	1. the file is not changed.
	
	other states are same as Q1 2/3/4/5/6

Q3. power cut only lost tailing writes ?

	write 3 times: a b c, it's not possible that b is lost but a c written.
	
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.


More information about the linux-mtd mailing list