X-Git-Url: http://aleph1.co.uk/gitweb/?a=blobdiff_plain;ds=inline;f=Documentation%2Fyaffs2.html;h=8dd694f38bc99573b98b63cc822722b1c67d2277;hb=3b2905b66368db2b05df750b5abf4b41c6efcfbd;hp=e83dcc667d8474087320b10245b8e2e97bc082f0;hpb=ce96b5b9742c81cad6d902eaf793b792c1b8943b;p=yaffs%2F.git diff --git a/Documentation/yaffs2.html b/Documentation/yaffs2.html index e83dcc6..8dd694f 100644 --- a/Documentation/yaffs2.html +++ b/Documentation/yaffs2.html @@ -7,7 +7,7 @@ - +

YAFFS2

@@ -54,19 +54,59 @@ can't use the "discarded" flags in YAFFS2.

  • Since there is no deletion, a resize (shrinking) of a file will still have valid data chunks past the end of file on the NAND. However, we write a new ObjectHeader at the time of the resize, - therefore this shows the shrunken file size.

    + therefore this shows the shrunken file size. The ObjectHeader also + carries information to say that this is a shrink, for some special + handling in the garbage collector.

    +



    +

    This changes erasure slightly:

    This makes erasure & garbage collection more expensive (by adding reads), but remember that ion YAFFS2 we don't need to do page deletions which are much more expensive operations. Thus, all-up YAFFS2 wins.

    +

    Resize Handling

    +

    In YAFFS, soft deletion is ued for everything but resizing +(shrinking) a file which has some particularly ugly cases that can +complicate garbage collection.

    +

    As mentioned before, we write a new ObjectHeader to indicate the +shrinking. However, it is important that this ObjectHeader does not +get destroyed (erased) before the data chunks that were discarded +during the shrink are destroyed (erased). If this precaution is not +taken then it is possible that the deleted chunks might be brought +back to life.

    +

    The modification to the garbage collector is as follows:

    + + +



    +

    +



    +

    Tag structure

    Each chunk in YAFFS2 has the following information:

    @@ -224,7 +264,7 @@ sequence Id order) rather than in their order on the media. This implies that at start up, the blocks must be read and their block sequence determined.

    Performance

    -

    These numbers are indicative of relative performance. These only +

    These numbers are indicative of relative performance. These only apply to the NAND data transfer and do not include other overheads.

    As an example, read/write cycle times of 100nS are used (though NAND can typically do 50nS), "seek time" of 10uS and @@ -747,7 +787,41 @@ transfer time relative to an 8-bit bus.



    -

    $Id: yaffs2.html,v 1.1 2002-11-26 01:15:37 charles Exp $

    +

    MTD Interface

    +

    As mentioned before, YAFFS2 requires a chunk-size of at least 1kB +to get a large enough spare area to support the increased size of the +tags. This is not really a disadvantage, but should rather be viewed +as an opportunity to exploit the NAND hardware more effectively. In +particular:

    + +

    To this end, yaffs_guts is being re-crafted to support arbitrary +chunk size (power of 2, >= 1024), with arbitrary block size.

    +

    Currently, YAFFS also makes some other assumptions which will need +to be changed:

    + +

    Some of these differences can be absorbed in the yaffs_mtd layer. +Some will need to be handles inside the mtd itself.

    +

    $Id: yaffs2.html,v 1.3 2003-09-16 06:48:38 charles Exp $