public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Zoltan Sogor <weth@inf.u-szeged.hu>
To: priewasser@gmail.com
Cc: linux-mtd@lists.infradead.org
Subject: Re: How to determine MTD/JFFS2 RAM consumption
Date: Wed, 12 Oct 2005 15:46:58 +0200	[thread overview]
Message-ID: <434D13D2.6030600@inf.u-szeged.hu> (raw)
In-Reply-To: <434CE6CB.9040509@gmail.com>

Hi!

Bernhard Priewasser wrote:

> - Why are there 64 jffs2_raw_node_refs after mounting an empty JFFS2?

If you are using NOR memory then there is a cleanmarker node in the
begining of every jeb and the scan process allocates a raw_node_ref for it.

> - Why are there 103 jffs2_raw_node_ref after writing 10 (small) files?

If you write a new file to the flash then it allocates a inode, dentry
and an other inode. Every dentry has an inode number to which it belongs
to, that's why jffs2 allocates the inode first and after then the
dentry. The second inode contains the writed data (if the compreessed
size of the data and the inode header is smaller than 4k ).
64 + 30 = 94
(What is about the other 9? I don't know exactly but if you send us the
testcase then maybe we can tell more)

> - What about jffs2_node_frag and jffs2_full_dnode?

Jffs2 builds up the full inode data by fragments (as on flash) and
builds a red-black tree (using the version number as key).
jffs2_node_frag stores the size of the fragment and the offset of the
fragment. Offset is the distance from the begining of the file.
jffs2_full_dnode is an extension of raw_node_ref.  Write_dnode returns a
full_dnode pointer, it contains the offset and the size of the written
data and a pointer to a raw node. From this information jffs2 can build
up the new fragment and add it to the fragment tree.

Zoltan

      reply	other threads:[~2005-10-12 13:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-12 10:34 How to determine MTD/JFFS2 RAM consumption Bernhard Priewasser
2005-10-12 13:46 ` Zoltan Sogor [this message]

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=434D13D2.6030600@inf.u-szeged.hu \
    --to=weth@inf.u-szeged.hu \
    --cc=linux-mtd@lists.infradead.org \
    --cc=priewasser@gmail.com \
    /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