public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* CRC error of jffs2_get_inode_nodes() for JFFS2 on NAND
@ 2005-11-08  8:36 陳羿逞 \(Chuck\)
  2005-11-13 13:09 ` Artem B. Bityutskiy
  0 siblings, 1 reply; 4+ messages in thread
From: 陳羿逞 \(Chuck\) @ 2005-11-08  8:36 UTC (permalink / raw)
  To: linux-mtd

[-- Attachment #1: Type: text/plain, Size: 878 bytes --]

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                                                                                                                        

[-- Attachment #2: Type: text/html, Size: 2008 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: CRC error of jffs2_get_inode_nodes() for JFFS2 on NAND
  2005-11-08  8:36 CRC error of jffs2_get_inode_nodes() for JFFS2 on NAND 陳羿逞 \(Chuck\)
@ 2005-11-13 13:09 ` Artem B. Bityutskiy
  2005-11-14  6:26   ` 陳羿逞 \(Chuck\)
  0 siblings, 1 reply; 4+ messages in thread
From: Artem B. Bityutskiy @ 2005-11-13 13:09 UTC (permalink / raw)
  To: 陳羿逞 \(Chuck\); +Cc: linux-mtd

On Tue, 2005-11-08 at 16:36 +0800, 陳羿逞 \(Chuck\) wrote:
> 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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: CRC error of jffs2_get_inode_nodes() for JFFS2 on NAND
  2005-11-13 13:09 ` Artem B. Bityutskiy
@ 2005-11-14  6:26   ` 陳羿逞 \(Chuck\)
  2005-11-14  9:43     ` Artem B. Bityutskiy
  0 siblings, 1 reply; 4+ messages in thread
From: 陳羿逞 \(Chuck\) @ 2005-11-14  6:26 UTC (permalink / raw)
  To: dedekind; +Cc: linux-mtd

----- Original Message ----- 
From: "Artem B. Bityutskiy" <dedekind@infradead.org>
To: "陳羿逞 \(Chuck\)" <ycchen@realtek.com.tw>
Cc: <linux-mtd@lists.infradead.org>
Sent: Sunday, November 13, 2005 9:09 PM
Subject: Re: CRC error of jffs2_get_inode_nodes() for JFFS2 on NAND


> On Tue, 2005-11-08 at 16:36 +0800, 陳羿逞 \(Chuck\) wrote:
> > 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.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: CRC error of jffs2_get_inode_nodes() for JFFS2 on NAND
  2005-11-14  6:26   ` 陳羿逞 \(Chuck\)
@ 2005-11-14  9:43     ` Artem B. Bityutskiy
  0 siblings, 0 replies; 4+ messages in thread
From: Artem B. Bityutskiy @ 2005-11-14  9:43 UTC (permalink / raw)
  To: "陳羿逞 \\(Chuck\\)"; +Cc: linux-mtd

>  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.

-- 
Best Regards,
Artem B. Bityutskiy,
St.-Petersburg, Russia.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2005-11-14  9:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-08  8:36 CRC error of jffs2_get_inode_nodes() for JFFS2 on NAND 陳羿逞 \(Chuck\)
2005-11-13 13:09 ` Artem B. Bityutskiy
2005-11-14  6:26   ` 陳羿逞 \(Chuck\)
2005-11-14  9:43     ` Artem B. Bityutskiy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox