Hi all,
Excuse me.
ˇ·However, calculations limit any one partition to 2^31 chunks in total. ie a
ˇ·total partition of 2^41.
Chunk ID is 32 bit long. That should be 2^32 in paper. But I don't know
why Charles means 2^31 here. Are there 2 id can't be used in defalut or Is it his carelessness?
So that should be 2^32 ^ 2^11= 2^43B, when Chunk size is 2kb. Thanks!
2008/10/21 Charles Manning
<manningc2@actrix.gen.nz>
> Hi
> I want to know clearly the maximam file system size for YAFFS2 can
> handle.
> In file ysffs_guts.h, there're ysffs_Tags structure:
> typedef struct {
> unsigned chunkId:20;
> unsigned serialNumber:2;
> unsigned byteCount:10;
> unsigned objectId:18;
> unsigned ecc:12;
> unsigned unusedStuff:2;
>
> } yaffs_Tags;
> I can calculate the maximum file system size YAFFS2 can handle by
> following algorithm:
> (2^20)*(2^18)*(2kb)= 2^49B //Chunk size is 2kb
> Am I right?
> Appreciate for your reply! Thanks.
While you have chosen the wrong structure here (yaffs_Tags is only relevent to
the yaffs1 mode of operation), the basic idea is almost correct.
yaffs2 uses the yaffs_PackedTags2 structure. This allows up to 32 bits for the
chunk Id. That limits any particular file to 2^42 (assuming 2048-byte
chunks).
However, calculations limit any one partition to 2^31 chunks in total. ie a
total partition of 2^41.
However, all the structures use RAM and thus real-world RAM limitations are
more likely to cause problems first.
-- Charles