Re: UBIFS: file data corruption during the power cut-off test

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
> approach
> does not work in all cases perfectly.
> 
> This case is actually documented, please see:
> http://www.linux-mtd.infradead.org/doc/ubifs.html#L_sync_semantics
> 
Thank you for the pointer. I'll look.

Regards,
Sergei
> Thanks,
> //richard
> 
> ______________________________________________________
> Linux MTD discussion mailing list
> http://lists.infradead.org/mailman/listinfo/linux-mtd/


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/




[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux