[PATCH]fs/jffs2/wbuf.c: add compatibility support for OOB data block
Jörn Engel
joern at wohnheim.fh-wedel.de
Mon Aug 15 07:56:04 EDT 2005
On Mon, 15 August 2005 13:42:19 +0200, Ferenc Havasi wrote:
>
> >>diff -Narup Mtd-orig/fs/jffs2/build.c mtd/fs/jffs2/build.c
> >>--- Mtd-orig/fs/jffs2/build.c 2005-07-30 17:29:27.000000000 +0200
> >>+++ mtd/fs/jffs2/build.c 2005-08-11 15:17:41.000000000 +0200
> >>@@ -336,6 +336,7 @@ int jffs2_do_mount_fs(struct jffs2_sb_in
> >> c->blocks[i].first_node = NULL;
> >> c->blocks[i].last_node = NULL;
> >> c->blocks[i].bad_count = 0;
> >>+ c->blocks[i].sum_collected = NULL;
> >> }
> >
> >And my question. Why 'sum_collected; is per-eraseblock? JFFS2 always
> >writes to c->nextblock, so 'sum_collected' ought to be per-superblock,
> >isn't it? Why do you inflate the c->blocks[] array ?
>
> We thought a lot about it when we designed summary. Now I don't remember
> why we decided to do it in this way (Zoltan, do you?), we'll reconsider it.
Having it per erase block would come in handy, if someone actually
implemented the "use two erase blocks to write data - one for GC'd
stuff and the other for new data" approach.
But then again, we could have a "struct active_block" or something
similar to describe an erase block that is currently use for writing,
so it doesn't really matter. Yeah, should go into the superblock.
Jörn
--
All art is but imitation of nature.
-- Lucius Annaeus Seneca
More information about the linux-mtd
mailing list