Re: [Yaffs] Source code mismatching development notes of Yaf…

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: shizheng
Date:  
To: Charles Manning
CC: yaffs
Subject: Re: [Yaffs] Source code mismatching development notes of Yaffs2?
Hi,
Could you please give any further explanation about bad block handling?
Since it's handled by nand driver, what is confusing?

BTW:
There're two yaffs_mtdif2.c in cvs. One is $(SRC_ROOT)/yaffs_mtdif2.c,
another one is
$(SRC_ROOT)/patches/yaffs_mtdif2.c. Is the second one still useful under
linux 2.6.24?

best wishes, shizheng

Charles Manning wrote:
> 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
>>
>> http://lists.aleph1.co.uk/cgi-bin/mailman/listinfo/yaffs
>>
>
>
>
>