* Minimum/optimal sector_size for jffs2
@ 2005-09-23 9:51 Peter Menzebach
2005-09-23 10:05 ` Artem B. Bityutskiy
0 siblings, 1 reply; 7+ messages in thread
From: Peter Menzebach @ 2005-09-23 9:51 UTC (permalink / raw)
To: Linux MTD; +Cc: Artem B. Bityuckiy
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?
Is there somewhat like an optimal sector_size?
I have here a device (dataflash), which has a very small
erase/write page size (1056 bytes).
Best regards
Peter
--
Peter Menzebach
Menzebach und Wolff IT-Consulting GbR
Phone +49 751 355 387 1
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Minimum/optimal sector_size for jffs2
2005-09-23 9:51 Minimum/optimal sector_size for jffs2 Peter Menzebach
@ 2005-09-23 10:05 ` Artem B. Bityutskiy
2005-09-23 11:30 ` Peter Menzebach
0 siblings, 1 reply; 7+ messages in thread
From: Artem B. Bityutskiy @ 2005-09-23 10:05 UTC (permalink / raw)
To: Peter Menzebach; +Cc: Linux MTD
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.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Minimum/optimal sector_size for jffs2
2005-09-23 10:05 ` Artem B. Bityutskiy
@ 2005-09-23 11:30 ` Peter Menzebach
2005-09-25 15:15 ` Jörn Engel
2005-09-27 14:59 ` Artem B. Bityutskiy
0 siblings, 2 replies; 7+ messages in thread
From: Peter Menzebach @ 2005-09-23 11:30 UTC (permalink / raw)
To: Artem B. Bityutskiy; +Cc: Linux MTD
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
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Minimum/optimal sector_size for jffs2
2005-09-23 11:30 ` Peter Menzebach
@ 2005-09-25 15:15 ` Jörn Engel
2005-09-26 8:56 ` Artem B. Bityutskiy
2005-09-27 14:59 ` Artem B. Bityutskiy
1 sibling, 1 reply; 7+ messages in thread
From: Jörn Engel @ 2005-09-25 15:15 UTC (permalink / raw)
To: Peter Menzebach; +Cc: Artem B. Bityutskiy, Linux MTD
On Fri, 23 September 2005 13:30:33 +0200, Peter Menzebach wrote:
>
> 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.
Hmm. "sector_size" is a confusing name. It reminds people of a disk
sector, which is semantically similar to the writesize (or pagesize,
if NAND people prefer). But JFFS2 uses sector_size as erasesize.
Oh well, just another one.
Jörn
--
Don't patch bad code, rewrite it.
-- Kernigham and Pike, according to Rusty
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Minimum/optimal sector_size for jffs2
2005-09-25 15:15 ` Jörn Engel
@ 2005-09-26 8:56 ` Artem B. Bityutskiy
0 siblings, 0 replies; 7+ messages in thread
From: Artem B. Bityutskiy @ 2005-09-26 8:56 UTC (permalink / raw)
To: Jörn Engel; +Cc: Linux MTD, Peter Menzebach
Jörn Engel wrote:
> Hmm. "sector_size" is a confusing name. It reminds people of a disk
> sector, which is semantically similar to the writesize (or pagesize,
> if NAND people prefer). But JFFS2 uses sector_size as erasesize.
>
I would not mind if one rename that field to erasesize.
--
Best Regards,
Artem B. Bityuckiy,
St.-Petersburg, Russia.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Minimum/optimal sector_size for jffs2
2005-09-23 11:30 ` Peter Menzebach
2005-09-25 15:15 ` Jörn Engel
@ 2005-09-27 14:59 ` Artem B. Bityutskiy
2005-09-27 17:54 ` Peter Menzebach
1 sibling, 1 reply; 7+ messages in thread
From: Artem B. Bityutskiy @ 2005-09-27 14:59 UTC (permalink / raw)
To: Peter Menzebach; +Cc: Linux MTD
Hi,
I wonder, did you finally heal your JFFS2/Dataflash ? If yes, send your
patch, I assume we should commit it before JFFS2 has gone to mainstream
--
Best Regards,
Artem B. Bityuckiy,
St.-Petersburg, Russia.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Minimum/optimal sector_size for jffs2
2005-09-27 14:59 ` Artem B. Bityutskiy
@ 2005-09-27 17:54 ` Peter Menzebach
0 siblings, 0 replies; 7+ messages in thread
From: Peter Menzebach @ 2005-09-27 17:54 UTC (permalink / raw)
To: Artem B. Bityutskiy; +Cc: Linux MTD
Artem B. Bityutskiy wrote:
> Hi,
>
> I wonder, did you finally heal your JFFS2/Dataflash ? If yes, send your
> patch, I assume we should commit it before JFFS2 has gone to mainstream
>
Yes,
dataflash is successfully healed. Thanks for your help.
I am on the road this week. I will send it friday this week...
Best regards
Peter
--
Peter Menzebach
Menzebach und Wolff IT-Consulting GbR
Phone +49 751 355 387 1
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2005-09-27 17:56 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-23 9:51 Minimum/optimal sector_size for jffs2 Peter Menzebach
2005-09-23 10:05 ` Artem B. Bityutskiy
2005-09-23 11:30 ` Peter Menzebach
2005-09-25 15:15 ` Jörn Engel
2005-09-26 8:56 ` Artem B. Bityutskiy
2005-09-27 14:59 ` Artem B. Bityutskiy
2005-09-27 17:54 ` Peter Menzebach
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox