jffs2 / eCos

David Woodhouse
2003-03-31T22:47:44Z

Please don't reply to cross-posts which have travelled via the eCos
list. The gratuitous and redundant noise which that list adds to the
Subject line is not welcome here.

Also, please don't top-post (except for editorial comments such as this
one and the one above :)

On Mon, 2003-03-31 at 21:29, Bob Koninckx wrote:
> Ok, I think I've come closer :)
>
> Apparently, it has to do with the check
>
>
> } else if (frag->ofs < offset && (offset & (PAGE_CACHE_SIZE-1)) != 0) {
> D1(printk(KERN_NOTICE "Eep. Overlap in ino #%u fraglist. frag->ofs =
> 0x%08x, offset = 0x%08x\n",
> f->inocache->ino, frag->ofs, offset));
> D1(jffs2_print_frag_list(f));
> memset(buf, 0, end - offset);
> return -EIO;
> } else if (!frag->node) {
>
>
> in read.c / function jffs2_read_inode_range
>
> The ecos libc buffers only 256 bytes of data, PAGE_CACHE SIZE is defined
> to be 4kB. The first access consequently succeeds, the second one fail

Hmmm. I could have sworn I'd already fixed that -- doesn't seem like it
though.

> I suppose all that needs to be done (for eCos) is make the
> PAGE_CACHE_SIZE definition agree with the eCos libc BUFSIZ definition. I
> am not sure though.

No because that would mean we never write a node with more than BUFSIZ
(256 bytes) of data payload, which would mean we take up a lot more
space on the medium for any given file -- more node headers and worse
compression.

We should just fix jffs2_read_inode_range() to handle reads which don't
start at the beginning of a node. It's not hard.

--
dwmw2