[Yaffs] [Yaffs-archive] YAFFS size limits

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Charles Manning
Date:  
To: yaffs
Subject: [Yaffs] [Yaffs-archive] YAFFS size limits
Someone recently asked me the maximum sizes of files etc in YAFFS.
The current code limits vaious sizes. Some of these can be relatively easily
relaxed.

Below MB = megabytes (ie 2^20 bytes), GB = 2^30 bytes.

*Max file size. This is limited by the number of chunks in a file. chunkId,
in yaffs_Tags, is 20 bits. This limits the maximum file size to 512MB. This
could be relaxed by using larger chunks (a slight pain at present) .

*Maximum number of files: This is limited to 2^18 (ie. 256k files) by the
objectId bitfield in yaffs_Tags.

The above two limitations can be traded off against each other by fiddling
the bitfields.

*Max file system partition size. The current limitation is that the soft
deletion code assumes the "chunk group" is no larger than a block. This
limits the number of blocks to 2^16. With standard 16kB blocks this limits
the file system size to 1GB. This limitation can be relatively easily worked
around by using "virtual blocks" which are multiples of "physical blocks"
(eg. make two blocks of 32x512bytes into a single "virtual block" of
64x512bytes). This would give a miximum file system size of 2GB.

YAFFS uses signed and unsigned 32-bit integers in places. These are likely to
limit file and file system sizes to 2GB. Some tweaking and effort would be
needed to remove these restrictions, (eg replacing file offsets etc with
loff_t).

YAFFS2 is still in concept phase, but the preliminary design sketches remove
some of these limitations.

I don't know if anyone uses 1GB file systems yet, but there are shipping
products using 512MB file systems.


-- CHarles


---------------------------------------------------------------------------------------
This mailing list is hosted by Toby Churchill open software (www.toby-churchill.org).
If mailing list membership is no longer wanted you can remove yourself from the list by
sending an email to with the text "unsubscribe"
(without the quotes) as the subject.