NAND flash question
Artem B. Bityuckiy
dedekind at infradead.org
Wed Jun 29 02:29:56 EDT 2005
On Tue, 2005-06-28 at 19:30 +0100, David Woodhouse wrote:
> On Tue, 2005-06-28 at 09:41 -0700, Charles Tilbury wrote:
> > In part, I want to get rid of the messages. They make the marketing
> > guys nervous. <<grin>> I may just supress them using comments. What
> > I really need is to make sure that the user land data gets flushed to
> > NAND before power loss. That seems like a JFFS2 issue, do you agree?
> Not really. Userland data are flushed to the medium on fsync() or sync()
> just as with other file systems. If a write() call has _just finished
> when the power is lost, there's no guarantee that _any_ file system will
> have committed that write to the medium already. (Unless you were using
> O_SYNC, which we don't support for JFFS2).
This all is correct. But IMO the question implied that the messages like
this are too scary:
jffs2_get_inode_nodes(): CRC failed on node at 0x%08x: Read 0x%08x,
And I tend to agree with this. Unclean reboots are normal in embedded
devices and it would be nice not to frighten people by such messages,
especially because in 99% cases this is harmless - just the last written
data is lost. And this is not the first time people are confused with
that. But unfortunately, it is difficult to distinguish between CRC
errors caused by unclean reboots and by real media corruptions, so I
prefer to print this rather then to be silent.
If someone has come up with a patch which smartly distinguishes the CRC
errors reason I'd be very glad.
Artem B. Bityuckiy,
More information about the linux-mtd