[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: CRC error after power off
> I'm not interested in the contents of this particular file. I thought
> there will be no such things like CRC errors under normal
> circumstances, including random power cycles.
No, part of reason we have the CRC is to detect node writes which failed
before we completed writing the associated data.
If the garbage-collect thread is running, or if you're actually writing to
the file system when you lose power, then it could be half-way through
writing a node, and the CRC on that node is going to fail.
This is expected behaviour, and there is no data loss.
If it were writing a node for GC purposes, that node will have been a _copy_
of some existing data, and the original version will still be present and
If it was writing new data, then obviously it's acceptable that what you
were trying to write at the time doesn't get written. If you were trying to
overwrite a part of a file, then the old contents will still be present and
correct as if the interrupted node had never been written.
Note that if you were trying to write a large amount of data, then JFFS2
will have split that into multiple nodes, and may have written some of them
before the power was lost, so you may have _some_ new data and some old data
in the range of the file to which you were writing. This is perfectly
normal, and can happen even without power loss -- writes may _always_ return
early, having written fewer data than you requested them to.
To unsubscribe from this list: send the line "unsubscribe jffs-dev" in
the body of a message to firstname.lastname@example.org