From: "Jörn Engel" <joern@wohnheim.fh-wedel.de>
To: zhao forrest <zhao_fusheng@hotmail.com>
Cc: dedekind@yandex.ru, linux-mtd@lists.infradead.org
Subject: Re: [PATCH]Erase block header(revision 1)
Date: Mon, 26 Sep 2005 10:19:22 +0200 [thread overview]
Message-ID: <20050926081922.GA17756@wohnheim.fh-wedel.de> (raw)
In-Reply-To: <BAY17-F17EC8A97636E63E12669C5E88B0@phx.gbl>
On Mon, 26 September 2005 16:02:50 +0800, zhao forrest wrote:
>
> >> +struct jffs2_eraseblock_header
> >> +{
> >> + jint16_t magic;
> >> + jint16_t nodetype; /* == JFFS2_NODETYPE_ERASEBLOCK_HEADER */
> >> + jint32_t totlen;
> >> + jint32_t hdr_crc;
> >> + uint8_t fs_version; /* the version of this JFFS2 fs image */
> >
> >Version is completely useless.
>
> I agree that version field is not used in my patch after compat_fset,
> incompat_fset and rocompat_fset are introduced in my patch.
> But I'm not sure if we should keep this field.
> Artem,
> What's your opinion about this?
Just give it a useful name like "reserved" or "unused". We still need
the alignment.
> >> + uint8_t compat_fset;
> >> + uint8_t incompat_fset;
> >> + uint8_t rocompat_fset;
What does "fset" mean? Why not just "flags_compat" etc.?
> >> + jint32_t erase_count; /* the erase count of this erase block */
> >> + jint16_t dsize; /* the size of additional data behind node_crc */
> >
> >Breaks alignment and pretty useless. Information can be deduced from
> >totlen. Remove.
> >
> Sometimes we can't deduce the exact additional data size from totlen.
> In particular this is true for NOR ECC. For example, sizeof(struct
> jffs2_eraseblock_header) is 34 bytes; totlen is 40 bytes, dsize is
> 0 byte.
Even then it doesn't matter. We just copy all fields and ignore the
ones we don't know about. What we know about is defined in the three
flags fields.
Jörn
--
Simplicity is prerequisite for reliability.
-- Edsger W. Dijkstra
next prev parent reply other threads:[~2005-09-26 8:20 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <BAY17-F141EA92F45DB70328CE1C5E8960@phx.gbl>
2005-09-23 9:29 ` [PATCH]Erase block header(revision 1) Ferenc Havasi
2005-09-23 9:33 ` Artem B. Bityutskiy
2005-09-23 10:24 ` zhao forrest
2005-09-25 11:04 ` Jörn Engel
2005-09-26 8:02 ` zhao forrest
2005-09-26 8:19 ` Jörn Engel [this message]
2005-09-26 9:08 ` Artem B. Bityutskiy
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=20050926081922.GA17756@wohnheim.fh-wedel.de \
--to=joern@wohnheim.fh-wedel.de \
--cc=dedekind@yandex.ru \
--cc=linux-mtd@lists.infradead.org \
--cc=zhao_fusheng@hotmail.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