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 Wednesday 11 August 2010 00:59:10 Henrik Grindal Bakken wrote:
> Henrik Grindal Bakken <> writes:
> > Henrik Grindal Bakken <> writes:
> >> Hi Charles, and thanks for a quick reply.
> >>
> >> Here's a paste of dmesg following these commands:
> >> $ echo "+os" > /proc/yaffs
> >> $ touch /config/3
> >> $ sync
> >> <a few seconds of waiting>
> >> $ sync
> >> <poweroff>
> >>
> >>    http://fpaste.org/uumk/

> >>
> >> When it comes back up, the file does not exist. I also tried sync;
> >> sleep 4; sync, with the same result.
> >
> > I have some more info.
> >
> >
> > [hgbsaturn:~] $ touch /config/6
> > [hgbsaturn:~] $ echo 6 > /config/6.content
> > [hgbsaturn:~] $ sync
> > [hgbsaturn:~] $ sync
> > [hgbsaturn:~] $ reboot -f
> >
> > Logging on when it comes back up, /config/6.content exists, but
> > /config/6 does not. This appears to be the consistent behaviour.
> > If the file does not have content, it does not appear after boot.
> >
> > Also, apparently, it doesn't seem to matter how much time passes
> > between syncs and before/after syncs. The box can stay up for hours
> > after the file was touched, and it will still disappear.
>
> Note that this does not happen when the loopback-mounted image itself
> sits on an ext2 partition.


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.

-- Charles