Minimum/optimal sector_size for jffs2

Artem B. Bityutskiy dedekind at yandex.ru
Fri Sep 23 06:05:46 EDT 2005


Peter Menzebach wrote:
> Hi,
> since my grep through the source code was not successful:
> Is there a minimum possible jffs2_sb_info.sector_size and somewhere a 
> definition?
There is probably no minimum value, but not because it doesn't matter, 
just because nobody cared adding a check.

> Is there somewhat like an optimal sector_size?
Not sure about optimal, probably yes. Consider the following aspects:

1. There is an array (c->blocks[]) with one element per eraseblock. The 
smaller is yur eraseblock - the larger is the array.

2. The eraseblock size cannot be less then PAGE_SIZE + sizeof(struct 
jffs2_raw_inode). PAGE_SIZE is mostly 4096 bytes.

3. The space at the end of eraseblock is not used if there are less then 
JFFS2_MIN_DATA_LEN bytes, or if the node beinf written does not fit that 
space. So, the smaller is the eraseblock, the more space is wasted.

> I have here a device (dataflash), which has a very small
> erase/write page size (1056 bytes).
Err, AFAIR, I explained why you cannot use 1056 bytes eraseblocks... It 
is simply too small.

-- 
Best Regards,
Artem B. Bityuckiy,
St.-Petersburg, Russia.




More information about the linux-mtd mailing list