Garbage collect pristine nodes

David Woodhouse dwmw2 at infradead.org
Fri Nov 12 10:21:44 EST 2004


On Fri, 2004-11-12 at 18:06 +0300, Artem Bityuckiy wrote:
> We allocate sizeof(struct jffs2_raw_inode) + JFFS2_MIN_DATA_LEN which is 
>    only 68 + 128 bytes. But the maximum size of direntry is more than 
> 245 bytes. So, if few bytes were allocated (alloclen < rawlen) and this 
> is just direntry with long name, we Garbage Collect it using long path 
> (which is unneeded).

How often does this _actually_ happen? Remember, alloclen tells us how
much space is _available_ -- it could be larger than the amount we asked
for. So we'll only take the long route if the name in the dirent is
large _and_ it wouldn't actually fit in the end of the eraseblock.

-- 
dwmw2






More information about the linux-mtd mailing list