[Yaffs] Can yaffs2 move a file around in NAND because of ano…

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Brian Robertson
Date:  
To: yaffs
Subject: [Yaffs] Can yaffs2 move a file around in NAND because of another file write
We have started using yaffs2 with NAND flash and we are writing a linux
main image into NAND and boot from this OK.

We use a series of pointer length pairs which we extract from yaffs2 for
this booting. We call this a scatterList and save this scatterList
elsewhere in NOR flash (not controlled by yaffs2). This booting works
fine and we can power cycle OK as many times as we like.

The issue comes after we boot when we try to write any file:
cat /dev/urandom > <any_file>
What seems to happen after this write of a file is that the scatterList
of the original Linux mainImage has changed. The MD5sum of the original
mainImage is still the same, it is just where it is stored that is
changed.

My questions are:

Can yaffs2 move a file around (i.e. can this happen)?

What conditions will trigger a file to be moved elsewhere in NAND?

Is there anything that we can do to stop a file being moved i.e. to lock
the file down?


We do not try to write to the original mainImage file so in theory this
should stay undisturbed. Also there is plenty of room on the NAND flash
so there should be no need to shuffle the file around e.g. because of a
garbage collector / space reallocator.

Regards

Brian.