Re: [Yaffs] how to determin a chunk wrote correctly?

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Charles Manning
Date:  
To: Ezio Zhang
CC: yaffs
Subject: Re: [Yaffs] how to determin a chunk wrote correctly?
On Monday 13 February 2012 13:39:40 Ezio Zhang wrote:
> I think so.
>
> But I’m interested in how yaffs do.Though I’ve read the source code ,but
> I’m still confused and not get the right code about how determine the write
> is correct.


YAFFS handles this with the ECC checking and other integrity checks. If the
tags are not written correctly then yaffs assumes it is a partially written
page and ignores it (ie. treats it as if it has nothing in it).


> As I saw in uffs (another filesystem),they write one redundent
> byte in the last of a page to tell this page has been wrote correct


You cannot do that in all cases. Some flash types, eg. MLC, do not support
multiple writes to the same page so you cannot do this.


> lt.So
> how yaffs copes with this situation,could you please tell me .
>
> Thanks a lot.
>
> ---
>
> Regards,
>
> Ezio
>
> On 2012-02-09 21:42, Charles Manning wrote:
> > On Tuesday 07 February 2012 23:38:27 EzioZhang wrote:
> > > As subject,if I wrote something to one chunk,but powerloss before write
> > > complete. As a result,I could not determin weather this chunk wrote
> > > correctly?
> > >
> > > For example,the first 2048byte is wrote correctly,but the last few byte
>
> of
>
> > > the OOB area does not write,how can I cope with this situation?
> >
> > YAFFS will handle this for you with no effort on your part. That chunk
>
> will be
>
> > ignored.
> >
> > -- CHarles