Minimum/optimal sector_size for jffs2
Peter Menzebach
pm-mtd at mw-itcon.de
Fri Sep 23 07:30:33 EDT 2005
Artem B. Bityutskiy wrote:
> 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.
>
Sorry,
I was not precise in terms. When I talked about erasesize, I mean
mtd_info.erasesize.
As far as I see in the code, for jffs2 the erase vloack size (used by
jeb) is jffs2_sb_info.sector_size.
So, in these terms, the jffs2 sector_size has a minimum:
jffs2 sector_size >= PAGE_SIZE + sizeof(struct jffs2_raw_inode)
That's the information, I wanted to confirm.
>> 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.
See explanation above, sorry for the confusion ;) .
Best regards
Peter
--
Peter Menzebach
Menzebach und Wolff IT-Consulting GbR
Phone +49 751 355 387 1
More information about the linux-mtd
mailing list