debugging strategies for jffs2

David Woodhouse dwmw2 at infradead.org
Fri Feb 1 18:11:45 EST 2002


adam.wozniak at comdev.cc said:
> > The interesting bit to me is that the csize is 0x0000c000
> > and the dsize is 0x00000000.  Is this perhaps causing problems?
> 
> At fs/jffs2/gc.c,v 1.52, line 460:
>         fill:
>                 ri.magic = JFFS2_MAGIC_BITMASK;
>                 ri.nodetype = JFFS2_NODETYPE_INODE;
>                 ri.totlen = sizeof(ri);
>                 ri.hdr_crc = crc32(0, &ri, sizeof(struct jffs2_unknown_node)-4);
>                   ri.ino = inode->i_ino;
>                 ri.version = ++f->highest_version;
>                 ri.offset = start;
>                 ri.csize = end - start;
>                 ri.dsize = 0;
>                 ri.compr = JFFS2_COMPR_ZERO;

> This seems backwards to me.  Shouldn't ri.dsize = end-start and
> ri.csize = 0 ??? 

Eep, yes that would probably do it. Well spotted. That obviously wasn't one 
of my more coherent days :)

I've fixed it in v1.61 and v1.52.2.1 (on jffs2-2_4-branch) now - don't chuck
your filesystem away though, I'll implement a workaround and ask you to test
it.

--
dwmw2






More information about the linux-mtd mailing list