linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* jffs2 sumtool bug ?
@ 2007-05-23  8:10 Matthieu CASTET
  2007-05-23 10:55 ` David Woodhouse
  0 siblings, 1 reply; 2+ messages in thread
From: Matthieu CASTET @ 2007-05-23  8:10 UTC (permalink / raw)
  To: linux-mtd

Hi,

In sumtool, in pad_block_if_less_than, we pad and write to a new 
eraseblock if "(data_ofs + req > erase_block_size - datasize)".
But datasize = req + the size of the summary node.

So we pad and write to a new eraseblock if there is not the space for 
the summary node and (the node we are wanting to write) * 2.

Why the condition isn't "(data_ofs > erase_block_size - datasize)" ?


thanks,

Matthieu


PS : about summary, could the sumtool change the order of the nodes to 
avoid to waste too much space. For example if the eraseblock is 16KB and 
we have 4 nodes of 4KB. Sumtool will put in the first eraseblock 3 
nodes, 4KB will be wasted for the sumary node. In this wasted 4KB, we 
could have put smaller nodes.

PS2 : How the kernel implementation does ? Does it try to minimize 
summary overhead, by managing to minimize the summary node size ?

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: jffs2 sumtool bug ?
  2007-05-23  8:10 jffs2 sumtool bug ? Matthieu CASTET
@ 2007-05-23 10:55 ` David Woodhouse
  0 siblings, 0 replies; 2+ messages in thread
From: David Woodhouse @ 2007-05-23 10:55 UTC (permalink / raw)
  To: Matthieu CASTET; +Cc: linux-mtd

On Wed, 2007-05-23 at 10:10 +0200, Matthieu CASTET wrote:
> PS : about summary, could the sumtool change the order of the nodes to 
> avoid to waste too much space. For example if the eraseblock is 16KB and 
> we have 4 nodes of 4KB. Sumtool will put in the first eraseblock 3 
> nodes, 4KB will be wasted for the sumary node. In this wasted 4KB, we 
> could have put smaller nodes.

Theoretically, yes. But there's easier things to do first. We could
halve the size of the summary node itself, for example.

-- 
dwmw2

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-05-23 10:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-23  8:10 jffs2 sumtool bug ? Matthieu CASTET
2007-05-23 10:55 ` David Woodhouse

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).