Re: [Yaffs] overwrite problem in yaffs2?

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Charles Manning
Date:  
To: yaffs
CC: Sohn Chung-MCG31424
Subject: Re: [Yaffs] overwrite problem in yaffs2?
On Tuesday 12 September 2006 14:48, Sohn Chung-MCG31424 wrote:
> >-----Original Message-----
> >From: Charles Manning [mailto:manningc2@actrix.gen.nz]
> >Sent: Monday, September 11, 2006 6:56 PM
> >To:
> >Cc: Sohn Chung-MCG31424
> >Subject: Re: [Yaffs] overwrite problem in yaffs2?
> >
> >On Tuesday 12 September 2006 00:47, Sohn Chung-MCG31424 wrote:
> >> Hello,
> >>
> >> I am using the latest yaffs2 release + Sergey's patch on Large page
> >> NAND.
> >>
> >> I got some data corruption on the yaffs2 filesystem when an
> >
> >application
> >
> >> program overwrite data into the file. So I configured the
> >
> >yaffs2 code to
> >
> >> check every page before
> >> it wrote on NAND flash. I also added code to stop the system
> >
> >if yaffs2
> >
> >> tried to write
> >> on Nand flash that wasn't erased in
> >
> >yaffs_WriteNewChunkWithTagsToNAND.
> >
> >> I wrote a quick overwrite test program to test this problem.
> >> While running the test, this message was showed up.
> >>
> >> Chunk 87680 not erased
> >> **>> yaffs chunk 87680 was not erased
> >
> >I this could be a yaffs problem, I think it much more likely
> >that this is a
> >lower-level driver problem.
>
> I didn't have any problem when I ran the same test on a 128MB small page
> NAND.
> I am using the same lower-level driver and the yaffs2 source on both
> Small Page NAND and Large Page NAND.


Your driver will need to treat these devices differently.
>
> One other thing is that if I ran the write (copy) test instead of the
> overwrite test, I didn't see this problem
> on a Large Page NAND.
>
> Do you still think it is a lower-level driver problem?


Yes, quite likely.

Another alternative is that the NAND has not been erased before use.

The error message you are seeing happens when yaffs tries to write a new page
and that page already contains some data. This has nothing to do with file
overwriting.

-- Charles