CRC error of jffs2_get_inode_nodes() for JFFS2 on NAND
Hello all,
Our system use JFFS2 on NAND flash, and code base is linux 2.6.10-rc3.
A few days ago, we dived into the JFFS2 for the CRC error after a system reboot.
We found that it is caused by an incomplete writing and it always happens in the end of file.
If we write some data into flash which size is not the multiple of page_size (512-byte),
there is a remainder (under a page-size) in 'wbuf' of function jffs2_flash_writev().
Then, at this time, we reset the system, JFFS2 will not yet write the remainder into flash and it will cause the inode incomplete. Is it normal ? What time will JFFS2 flush wbuf out to sync the data if there is a remainder in wbuf ?
I appreciate if anyone can give us some suggestion.
best regards,
Chuck Chen
Quoted 3 lines · 陳羿逞 \(Chuck\)
What time will JFFS2 flush wbuf out to sync the data if there is a remainder in wbuf ?
http://lists.infradead.org/pipermail/linux-mtd/2005-November/014285.html
http://lists.infradead.org/pipermail/linux-mtd/2005-November/014286.html
----- Original Message -----
From: "Artem B. Bityutskiy" <[email protected]>
To: "陳羿逞 \(Chuck\)" <[email protected]>
Cc: <[email protected]>
Sent: Sunday, November 13, 2005 9:09 PM
Subject: Re: CRC error of jffs2_get_inode_nodes() for JFFS2 on NAND
Quoted 7 lines · 陳羿逞 \(Chuck\)
Quoted 3 lines
What time will JFFS2 flush wbuf out to sync the data if there is a remainder in wbuf ?
http://lists.infradead.org/pipermail/linux-mtd/2005-November/014285.html
http://lists.infradead.org/pipermail/linux-mtd/2005-November/014286.html
Thanks for your information.
Dose it to say that is there a possibility to make data missing if we
interrupt the GC operation just like shutdowm the system before a wbuf flush ?
In my system, the JFFS2 CRC error of inode always happens after a reboot.
Quoted 5 lines
Thanks for your information.
Dose it to say that is there a possibility to make data missing if we
interrupt the GC operation just like shutdowm the system before a wbuf flush ?
In my system, the JFFS2 CRC error of inode always happens after a reboot.
Yes, in case of unclean reboots you loose the write-buffer's contents. It contains the most recently data only. To force sync-ing you may do fsync() in your applications.
Signature · 3 lines
Best Regards, Artem B. Bityutskiy, St.-Petersburg, Russia.