From manningc2@actrix.gen.nz Tue Mar 04 22:23:59 2008
Received: from smtp.firstline.co.nz ([203.167.210.162] helo=firstline.co.nz)
	by stoneboat.aleph1.co.uk with smtp (Exim 4.63)
	(envelope-from <manningc2@actrix.gen.nz>) id 1JWfY0-0003C8-8d
	for yaffs@lists.aleph1.co.uk; Tue, 04 Mar 2008 22:23:58 +0000
Received: (qmail 27478 invoked by uid 453); 4 Mar 2008 22:23:33 -0000
X-Virus-Checked: Checked by ClamAV on firstline.co.nz
Received: from Unknown (HELO [192.168.0.29]) (10.14.0.253)
	by firstline.co.nz (qpsmtpd/0.40) with ESMTP;
	Wed, 05 Mar 2008 11:23:33 +1300
From: Charles Manning <manningc2@actrix.gen.nz>
To: yaffs@lists.aleph1.co.uk,
 neversetsun@ustc.edu
Date: Wed, 5 Mar 2008 11:23:16 +1300
User-Agent: KMail/1.9.6
References: <47CD76CA.2050008@ustc.edu>
In-Reply-To: <47CD76CA.2050008@ustc.edu>
MIME-Version: 1.0
Content-Type: text/plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Message-Id: <200803051123.16629.manningc2@actrix.gen.nz>
X-SA-Exim-Connect-IP: 203.167.210.162
X-SA-Exim-Mail-From: manningc2@actrix.gen.nz
X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on
	stoneboat.aleph1.co.uk
X-Spam-Level: 
X-Spam-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,SPF_NEUTRAL
	autolearn=no version=3.2.3
X-SA-Exim-Version: 4.2.1 (built Tue, 09 Jan 2007 17:23:22 +0000)
X-SA-Exim-Scanned: Yes (on stoneboat.aleph1.co.uk)
Subject: Re: [Yaffs] Source code mismatching development notes of Yaffs2?
X-BeenThere: yaffs@lists.aleph1.co.uk
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: Discussion of YAFFS NAND flash filesystem <yaffs.lists.aleph1.co.uk>
List-Unsubscribe: <http://lists.aleph1.co.uk/cgi-bin/mailman/listinfo/yaffs>, 
	<mailto:yaffs-request@lists.aleph1.co.uk?subject=unsubscribe>
List-Archive: <http://lists.aleph1.co.uk/lurker/list/yaffs.html>
List-Post: <mailto:yaffs@lists.aleph1.co.uk>
List-Help: <mailto:yaffs-request@lists.aleph1.co.uk?subject=help>
List-Subscribe: <http://lists.aleph1.co.uk/cgi-bin/mailman/listinfo/yaffs>,
	<mailto:yaffs-request@lists.aleph1.co.uk?subject=subscribe>
X-List-Received-Date: Tue, 04 Mar 2008 22:23:59 -0000

On Wednesday 05 March 2008 05:20:26 shizheng wrote:
> I'm viewing the latest source from cvs and I've got
> a few questions about Yaffs2, especially when I compared
> the code to the development notes(http://www.yaffs.net/node/38):
>

> 1. tag information stored in NAND oob
> In the development notes, it says Yaffs2 has these tag information
> including blockState, chunkId, objectId, nBytes, blockSequence, tagsEcc
> and ecc.
> But in yaffs_packedtags2.h, it defines
> typedef struct {
> unsigned sequenceNumber;
> unsigned objectId;
> unsigned chunkId;
> unsigned byteCount;
> } yaffs_PackedTags2TagsPart;
>
> typedef struct {
> yaffs_PackedTags2TagsPart t;
> yaffs_ECCOther ecc;
> } yaffs_PackedTags2;
>
> and blockState and ecc on data are missing. I have no idea
> about the MTD layer of linux, so I don't know whether the
> two tags are handled by MTD.

The difference is because the one structure is the yaffs_ExtendedTags 
structure which is an abstracted form of the tags. This is the structure that 
is passed around within yaffs.

The packed tags are the tags as packed down for writing into NAND. If you look 
at the yaffs_packedtags2.c file you will see the conversion beween these two 
forms.

The block state is managed by a slightly different mechanism, by directly 
querying the nand driver.

This stuff can be a bit confusing at times and I hope to refactor this to be 
far clearer.



>
>
> 2. The file $(SRC_ROOT)/patches/yaffs_mtdif2.c isn't useful, is it?
> I have checkouted the source code, and done make/insmod directly on linux
> without merging Yaffs into kernel tree.

I think I must be missing your point here. THis file converts the more 
abstract NAND interface into calls to mtd to provide the services.

> The module works well without any patch when simple file operation is
> tested on NANDSim(2kB page, 64B oob, 512MB chipsize).

Glad to hear it.

>
> best wishes, shizheng
>
>
>
> _______________________________________________
> yaffs mailing list
> yaffs@lists.aleph1.co.uk
> http://lists.aleph1.co.uk/cgi-bin/mailman/listinfo/yaffs



