From: David Woodhouse <dwmw2@infradead.org>
To: dedekind@infradead.org
Cc: linux-mtd@lists.infradead.org
Subject: Re: Duplication of dirent names in JFFS2 summary
Date: Fri, 19 May 2006 13:31:06 +0100 [thread overview]
Message-ID: <1148041866.3875.145.camel@pmac.infradead.org> (raw)
In-Reply-To: <1148040871.3199.17.camel@sauron.oktetlabs.ru>
On Fri, 2006-05-19 at 16:14 +0400, Artem B. Bityutskiy wrote:
> On Fri, 2006-05-19 at 13:11 +0100, David Woodhouse wrote:
> > If we can halve the amount of space taken on the flash by the summary
> > nodes, I think that's a worthwhile aim.
> >
> If halve, OK, but why do you think this encoding will halve it?
I think overall we can about halve the size of the summary nodes. A
variable-length encoding would be part of that.
struct jffs2_sum_inode_flash
{
jint16_t nodetype; /* node type */
jint32_t inode; /* inode number */
jint32_t version; /* inode version */
jint32_t offset; /* offset on jeb */
jint32_t totlen; /* record length */
} __attribute__((packed));
The nodetype can be a single byte.
Inode number is going to start low, and will take only two bytes if it's
less than 16364 -- three bytes up to 2097152. Storing it as an index
into a table of 'inodes affected by this summary' might also be
worthwhile, since we'll often have many nodes which belong to the same
inode.
Version is also going to start low -- and we can also avoid storing it
for the second and subsequent nodes belonging to any given inode. We
_know_ it only counts up by one at a time.
Offset can be entirely redundant if we represent dirty space with a
separate summary entry -- there shouldn't be much dirty space in the
eraseblock when we've only just finished writing it anyway.
Totlen is going to be small.
So yes, for the 'struct jffs2_sum_inode_flash' I think we can halve it.
Much of the same goes for the 'struct jffs2_sum_dirent_flash', and we
can also drop the name from that too. So yes, I suspect we can get close
to half the size of that too.
--
dwmw2
next prev parent reply other threads:[~2006-05-19 12:31 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-19 0:44 Duplication of dirent names in JFFS2 summary David Woodhouse
2006-05-19 1:01 ` David Woodhouse
2006-05-19 11:53 ` David Woodhouse
2006-05-19 11:58 ` Artem B. Bityutskiy
2006-05-19 12:11 ` David Woodhouse
2006-05-19 12:14 ` Artem B. Bityutskiy
2006-05-19 12:31 ` David Woodhouse [this message]
2006-05-19 14:34 ` Artem B. Bityutskiy
2006-05-19 14:59 ` David Woodhouse
2006-05-19 16:41 ` David Woodhouse
2006-05-19 16:43 ` David Woodhouse
2006-05-19 6:05 ` Jörn Engel
2006-05-19 10:08 ` David Woodhouse
2006-05-19 11:32 ` Artem B. Bityutskiy
2006-05-19 11:57 ` Artem B. Bityutskiy
2006-05-19 12:05 ` Artem B. Bityutskiy
2006-05-19 12:23 ` David Woodhouse
2006-05-19 14:17 ` Artem B. Bityutskiy
2006-05-19 14:50 ` David Woodhouse
2006-05-19 15:07 ` Artem B. Bityutskiy
2006-05-19 15:26 ` Artem B. Bityutskiy
2006-05-19 15:33 ` David Woodhouse
2006-05-19 15:38 ` Artem B. Bityutskiy
2006-05-19 15:43 ` David Woodhouse
2006-05-19 15:46 ` Artem B. Bityutskiy
2006-05-20 8:38 ` Artem B. Bityutskiy
2006-05-20 9:08 ` Artem B. Bityutskiy
2006-05-19 15:37 ` David Woodhouse
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=1148041866.3875.145.camel@pmac.infradead.org \
--to=dwmw2@infradead.org \
--cc=dedekind@infradead.org \
--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