public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Grant Erickson <gerickson@nuovations.com>
To: "\"linux-mtd@lists.infradead.org\"" <linux-mtd@lists.infradead.org>
Subject: JFFS2 File System Size Mismatches: Online Replication vs. Mkfs.jffs2
Date: Mon, 15 Sep 2008 10:09:06 -0700	[thread overview]
Message-ID: <C4F3E4C2.11ACD%gerickson@nuovations.com> (raw)

I have an interesting JFFS2 anomaly with regards to file system sizes that I
am hoping someone on the list has some insight on. For my system, I produce
a root file system image using mkfs.jffs2 as follows:

    mkfs.jffs2 --big-endian --no-cleanmarkers --pad 512 --pagesize 512  \
    --eraseblock 16384                                                  \
    -d /tmp/tmp.AEvYZ20385 -D root.devtable -o root.jffs2

And I end up with an image that is 14.0 MiB in size. Compression is
effective in reducing the image size down from 20.0 MiB, the image size when
'-m none' is passed to mkfs.jffs2.

Installed on the target system, 'df -h' reports:

    Filesystem                Size      Used Available Use% Mounted on
    /dev/mtdblock11          20.0M     14.0M      6.0M  70% /

However, if I then replicate, using rsync, this file system onto an
identical, yet empty partition, I end up with a file system that 'df'
reports as substantially smaller despite the fact that the file system BOM
is identical, diff says everything is the same, and a random sampling of MD5
sums shows files to be identical:

    Filesystem                Size      Used Available Use% Mounted on
    /dev/mtdblock11          20.0M     14.0M      6.0M  70% /
    /dev/mtdblock9           20.0M      9.3M     10.7M  46% /mnt/root0

The kernel is configured as:

    CONFIG_JFFS2_FS=y
    CONFIG_JFFS2_FS_DEBUG=0
    CONFIG_JFFS2_FS_WRITEBUFFER=y
    # CONFIG_JFFS2_FS_WBUF_VERIFY is not set
    # CONFIG_JFFS2_SUMMARY is not set
    # CONFIG_JFFS2_FS_XATTR is not set
    # CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
    CONFIG_JFFS2_ZLIB=y
    # CONFIG_JFFS2_LZO is not set
    CONFIG_JFFS2_RTIME=y
    # CONFIG_JFFS2_RUBIN is not set

My conclusion seems to be that mkfs.jffs2 and the kernel are compressing
things differently; however, 14.0 MiB seems to be the best I can coax out of
mkfs.jffs2 with any of LZO, ZLIB or RTIME.

Any insights or places to start digging? Have I discovered JFFS2 dark
matter? ;-)

Regards,

Grant

                 reply	other threads:[~2008-09-15 17:09 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=C4F3E4C2.11ACD%gerickson@nuovations.com \
    --to=gerickson@nuovations.com \
    --cc=linux-mtd@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox