[PATCH]Erase block header(revision 1)

Ferenc Havasi havasi at inf.u-szeged.hu
Fri Sep 23 05:29:23 EDT 2005


Hi Zhao,

First of all: your implementation of EBH summary support a good job,
congratulation!

I noticed only two things:

+        case JFFS2_NODETYPE_ERASEBLOCK_HEADER:
+            s->sum_size +=
JFFS2_SUMMARY_EBH_SIZE(je16_to_cpu(item->eh.dsize)*4);

Here I think you should use sizeof(uint32_t) instead of simple 4, as you
used it otherwhere. I's a very small thing, I know.

The other is related to it: if I were you I would store eh.dsize in
bytes, not in uint32. In every other places of JFFS2 the size is stored
byte based (if I am right), and there is no need to always multible by
sizeof(uint32_t) if the real size is needed.

I have only one big problem with this patch. I'm strongly against to
introduce INCOMPAT nodes JFFS2_NODETYPE_DIRENT_EBH and
JFFS2_NODETYPE_INODE_EBH just to make unusable new JFFS2 images for old
JFFS2 code on NAND devices, too. Do I understand well: is this the only
reason?

Ferenc





More information about the linux-mtd mailing list