Re: [Yaffs] double file entries in YAFFS2

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Blair Barnett
Date:  
To: Charles Manning
CC: yaffs
Subject: Re: [Yaffs] double file entries in YAFFS2
On Wed, 2006-09-13 at 00:26, Charles Manning wrote:
> On Friday 08 September 2006 06:29, Blair Barnett wrote:
> > >From the YAFFS mailing list:
> >
> >         Author: Charles Manning
> >         Date: 2003-12-29 09:062003-12-29 17:06 -800UTC
> >         To: Nick Bane, yaffs list
> >         Subject: [Yaffs-archive] Re: Odd behaviour
> >         Nick

> >
> >
> >         * I think I have the double file after remount issue fixed. This
> >         was caused by not deleting a yaffs_Object entry properly. Will
> >         cvs soon.

> >
> > =======================================
> >
> > Does the above explain the following odd behavior we're getting when we
> > mount a YAFFS2 file system after a reboot:
>
> I don't think so. IIRC that was a genuine difference where double entries
> ended up in the list.
>
> > ls -li
> >     372 -rw-r--r--    1 root     root        73366 Sep  7 15:03
> > CNI_fms.0
> >     372 -rw-r--r--    1 root     root        73366 Sep  7 15:03
> > CNI_fms.0
> >     766 -rw-r--r--    1 root     root       267065 Sep  7 15:05
> > CNI_gui.0
> >     766 -rw-r--r--    1 root     root       267065 Sep  7 15:05
> > CNI_gui.0
> >     350 -rw-r--r--    1 root     root        84484 Sep  7 15:05
> > CNI_init.0
> >     350 -rw-r--r--    1 root     root        84484 Sep  7 15:05
> > CNI_init.0
> >    1957 -rw-r--r--    1 root     root        18066 Sep  7 15:05
> > CNI_msg.0
> >    1957 -rw-r--r--    1 root     root        18066 Sep  7 15:05
> > CNI_msg.0
> >    4422 -rw-r--r--    1 root     root       216705 Sep  7 15:05
> > CNI_nav.0
> >    4422 -rw-r--r--    1 root     root       216705 Sep  7 15:05
> > CNI_nav.0

> >
>
> Hmmm...
>
> The inodes are the same and the data is the same. This means that one of three
> things is happening:
> 1) Somehow during the scan, two identical object headers are read and the
> there are genuine double entries within yaffs_guts directory lists.
> -or-
> 2) The directory reading process (in yaffs_fs.c) is feeding back the same
> entry twice.
> -or-
> 3) Your shell is reporting it twice.
>
> There are some subtle interaction issues between the shell and the directory
> reading mechanism that can result in double reporting.
>
> Questions:
>
> 1) Can you plz do # ls -ial that gives a bit more info.
> 2) What does the /proc/yaffs look like?
> 3) Turn on some tracing, in particular YAFFS_TRACE_OS to trace out
> yaffs_readdir.
> 4) What shell are you using?

busybox ash
> 5) What happens if you do something like mv? Do both entries move, just one,
> or does the problem get fixed?
>
> -- CHarles
>

Hi Charles,

Thanks for the reply and questions. Unfortunately, this is a *very*
intermittent problem. So the system that was exhibiting this problem has
been reinstalled and has not shown any problems since.

However, I'll alert the rest of the testing gang about your questions
and see if we can get to some sort of resolution.

Thanks for the analysis, I'll do some more checking here and see if I
can get the situation to present itself more regularly.

-blair