[Yaffs] Truncated files...

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


I did some testing to try understand better whether this might be a yaffs=
=20
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 thi=
ngs=20
that need to be debugged to find out what might be causing the problem he=
re:

1) Is the short op cache enabled? The easy way to tell this is to look in=
=20
/proc/yaffs.  The short op cache only caches stuff which is not page alig=
ned,=20
so there is potential that this could be where lossy things are happening=
.=20
You could try turning off the short op cache (set nShortOpCaches to zero =
in=20
yaffs_fs.c).

2) Is ftpd using memory mapped writes?

3) Do you get the same lossy behaviour when you create files by other mea=
ns=20
(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 fil=
e.
>
> How are you verifying that the original upload is correct? Are you usin=
g
> an MD5SUM or other fingerprint?
>
> --mike
>
> Eddie Dawydiuk wrote:
> > Hello yaffers,
> >
> > I have recently come across a strange problem while using the yaffs
> > filesystem. If I upload a file via FTP(troll-ftpd-1.26) everything lo=
oks
> > ok with regard to the file uploading correctly. But as soon as I unmo=
unt
> > 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 the m=
ost
> > recent mtd and yaffs releases. If anyone has any suggestions I would
> > really appreciate them.
> >
> > Thanks,
> > Eddie
> >
> >
> > _______________________________________________
> > yaffs mailing list
> > yaffs@stoneboat.aleph1.co.uk
> > http://stoneboat.aleph1.co.uk/cgi-bin/mailman/listinfo/yaffs