[Yaffs] Truncated files...

Charles Manning manningc2@actrix.gen.nz
Tue, 25 Jan 2005 15:23:22 +1300


This is pretty wierd.

The "short op" cache is a write-into cache. That is, the writes into the=20
cache do not go all the way to flash, but reside in the cache until the f=
ile=20
is flushed or closed.

This sounds like the files are not being closed preoperly, but then I'd n=
ot=20
expect the unmount to happen.

I'll tinker some more....

-- CHarles

On Tuesday 25 January 2005 13:40, Eddie Dawydiuk wrote:
> Charles,
>
> Thank you for the response, I set nShortOpCaches to zero, recompiled, a=
nd
> no longer see the problem with files being truncated....
>
> Thanks again,
> Eddie
>
> > I did some testing to try understand better whether this might be a y=
affs
> > thing or not.
> >
> > I created some files, unmounted yaffs, remounted yaffs and they were =
the
> > same.
> >
> > If yaffs is indeed losing the data in this case, then there are a few
> > things
> > that need to be debugged to find out what might be causing the proble=
m
> > here:
> >
> > 1) Is the short op cache enabled? The easy way to tell this is to loo=
k in
> > /proc/yaffs.  The short op cache only caches stuff which is not page
> > aligned,
> > so there is potential that this could be where lossy things are
> > happening. You could try turning off the short op cache (set
> > nShortOpCaches to zero in
> > yaffs_fs.c).
> >
> > 2) Is ftpd using memory mapped writes?
> >
> > 3) Do you get the same lossy behaviour when you create files by other
> > means
> > (copy, editor, etc)?
> >
> > -- CHarles
> >
> > On Tuesday 25 January 2005 11:54, Michael Erickson wrote:
> >> Eddie,
> >>
> >> 512-bytes is the size of a TFTP data transfer. The first (and should=
 be
> >> only) transfer that is less than 512-bytes indicates the end of the
> >> file.
> >>
> >> How are you verifying that the original upload is correct? Are you u=
sing
> >> an MD5SUM or other fingerprint?
> >>
> >> --mike
> >>
> >> Eddie Dawydiuk wrote:
> >> > Hello yaffers,
> >> >
> >> > I have recently come across a strange problem while using the yaff=
s
> >> > filesystem. If I upload a file via FTP(troll-ftpd-1.26) everything
> >>
> >> looks
> >>
> >> > ok with regard to the file uploading correctly. But as soon as I
> >>
> >> unmount
> >>
> >> > the partition and remount it the file is truncated to the nearest =
512
> >> > byte block. I am using kernel version 2.4.26 and have merged in th=
e
> >>
> >> most
> >>
> >> > recent mtd and yaffs releases. If anyone has any suggestions I wou=
ld
> >> > really appreciate them.
> >> >
> >> > Thanks,
> >> > Eddie
> >> >
> >> >
> >> > _______________________________________________
> >> > yaffs mailing list
> >> > yaffs@stoneboat.aleph1.co.uk
> >> > http://stoneboat.aleph1.co.uk/cgi-bin/mailman/listinfo/yaffs
> >
> > _______________________________________________
> > yaffs mailing list
> > yaffs@stoneboat.aleph1.co.uk
> > http://stoneboat.aleph1.co.uk/cgi-bin/mailman/listinfo/yaffs