Re: [Yaffs] loopback , power-off, and data is lost

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Charles Manning
Date:  
To: yaffs
Subject: Re: [Yaffs] loopback , power-off, and data is lost
On Thursday 12 August 2010 19:13:21 Henrik Grindal Bakken wrote:
> Charles Manning <> writes:
> > I had a look at the paste and it would seem that yaffs does not
> > think itself dirty in the second sync.
> >
> > yaffs has a small internal cache and it seems that the writes in the
> > cache are not getting flushed.
> >
> > Here's something to try to see if this changes anything:
> >
> > touch ext2 file
> > sync
> >
> > touch yaffs file
> > sync
> >
> > touching the yaffs file should explicitly dirty yaffs.
>
> That appears to work.


Thanks for checking that out. I can now determine what is broken and fix it.

I'll add that to my todo list...

>
> Do you have an explanation for why it seems to keep files with
> content, but not the empty ones?


I could make some guesses, but I would not swear on them.

I think it might be do with the way sync works. IIRC, sync makes two passes.
The first flushes dirty files and the second metadata. Perhaps that's the
reason.