UBIFS: file data corruption during the power cut-off test
sposelenov at emcraft.com
Sun Jun 9 02:59:09 PDT 2019
On Sun, 2019-06-09 at 10:53 +0200, Richard Weinberger wrote:
> ----- Ursprüngliche Mail -----
> > Now, the question: why are these 512 bytes of zeros in test4?
> > Extrapolating to a real use case, consider a system writing a log
> > file
> > to the UBI partition. Power cutoff, recovery, and we have a garbage
> > at
> > the end of the log file. Is this expected?
> Well, zero bytes are not garbage. ;)
I've seen some data in the last 512 bytes as well.
> But yes, this is is expected. In your case, I guess, the inode size
> does not match exactly what is present on flash.
> So the file size is 512 bytes too large, if you read too far, 0x0
> bytes are returned.
> During journal replay UBIFS tries to fixup file lengths but is
> does not work in all cases perfectly.
> This case is actually documented, please see:
Thank you for the pointer. I'll look.
> Linux MTD discussion mailing list
More information about the linux-mtd