Re: [Yaffs] Yaffs2 vs. Yaffs1

Startseite
Anhänge:
Nachricht
+ (text/plain)
Nachricht löschen
Nachricht beantworten
Autor: Charles Manning
Datum:  
To: Andre Renaud, yaffs
Betreff: Re: [Yaffs] Yaffs2 vs. Yaffs1
On Friday 01 July 2005 08:56, Andre Renaud wrote:
> Can someone give me a quick overview of how Yaffs2 differs from Yaffs1
> if you're using it on a 512 byte chunk/16 oob device? I've had a look at
> the source, and from what I could see it appears as if yaffs2 only works
> on 1024/32 devices, and the code for the 512/16 'appeared' to be the
> same as yaffs1 (that is probably where I'm wrong). For instance if I try
> to mount a 512/16 device using
> mount -t yaffs2 /dev/mtdblock/1 /mnt
> It complains that the geometry is incorrect (since yaffs2 doesn't do
> that), but if I specify -t yaffs, what benefit am I getting over the
> previous release?


Hi Andre

There are really two parts to this answer:

YAFFS1 vs YAFFS2 NAND layout:

In YAFFS1, the NAND layout has been set up for 512-byte pages.

The YAFFS2 layout requires more spare (oob) area in flash to store the
yaffs_PackedTags2 structure. Some people have suggested that by sqeezing
bitbields, the same could be achieved on 512-byte pages, but the structure as
it is requires 16 bytes (+ ECC bytes etc) - ie at least what is provided by a
1k page.

YAFFS1 vs YAFFS2 code base:

The YAFFS1 code base has some hard coded 512-byte constants etc. These have
been stripped out of YAFFS2. YAFFS2 does some things differently, eg. YAFFS1
uses the stack for buffers, but YAFFS2 does not because in many situations
(eg. Linux), the buffers get too big to put on the stack and they need
compile-time knowledge of the size.

The YAFFS2 code base supports both the YAFFS2 layout as well as the YAFFS1
layout through a backward compatability layer.

If you are just using 512-byte devices, then you will not notice much
difference between YAFFS1 and 2. YAFFS2 has some slight differences to
garbage collection and file deletion. With time, there will probably be more
changes.

At present, there is no real benefit in running YAFFS2 in backward
compatability mode (versus running YAFFS1), but it does mean that one chunk
of code can be used for both.

-- CHarles