[BUG] JFFS2 power loss recovery issues on NAND

David Woodhouse dwmw2 at infradead.org
Wed Jun 18 08:33:28 EDT 2008


On Wed, 2008-06-18 at 13:19 +0100, Jamie Lokier wrote:
> Iwo Mergler wrote:
> > Forgive my ignorance - does that mean that not everything in JFFS2 is 
> > CRC protected?
> 
> I think every _individual_ record is CRC protected in JFFS2
> 
> _But_ that doesn't always detect file corruption.  If JFFS2 records
> don't match their CRC, they are treated as if not there.
> 
> If there's corrupt data records, that causes holes in files.  There's
> no I/O error reported to the application, just blocks of zero bytes.
> 
> There's no mechanism in JFFS2 to detect that.  It requires checksums
> at a higher level

Well, in the case where a given region of the file is actually _absent_,
rather than the 'hole' being filled by an earlier version of the data
for that range of the file, we _could_ at least bitch about it, or maybe
even return -EIO. It should never happen, because of the way we 'fill'
holes in files.

It doesn't solve the real issue at hand though.

-- 
dwmw2




More information about the linux-mtd mailing list