mtd2block should not expand sparse loopback files

Josh Boyer jwboyer at gmail.com
Mon May 29 09:29:03 EDT 2006


On 5/27/06, Johannes Niess <linux at johannes-niess.de> wrote:
> Hi list,


> The jffs2 is readable and writable as expected. BUT upon first mount a couple
> of pdflush (pseudo kernel) processes become active and completely expand the
> sparse loopback file. Only after that disk activity has settled, "ls" and
> "du" give identical numbers of 1GB. Before mounting "ls" gives the maximum
> size and "du" just counts occupied sectors, e. g. "ls" gives 1 GB and "du"
> only 1 MB.

JFFS2 is going through and adding cleanmarkers to the blocks that
don't have them.

> I guess that the "fill with 1's" flash strategy is taking its toll together
> with the "Clean" markers. Can I switch that off? Using
> "mkfs.jffs2 --no-cleanmarkers"  does not help, as does  --eraseblock=0.

No you can't switch it off.  The filesystem will add them itself.

> block2mtd should not touch unused blocks at all in this setup. They should
> only be written to on first use for storing real data.

This has nothing to do with block2mtd.  It's a result of using JFFS2.

> Please make transparent compression AND loop file expansion on demand
> possible. Thank you very much for your work!

Um.. why don't you make it possible and provide a patch?  Otherwise
you might want to seriously look into e2compr.

josh




More information about the linux-mtd mailing list