Re: jffs2 / eCos

Bob Koninckx
2003-04-02T08:15:42Z

On Tue, 2003-04-01 at 00:47, David Woodhouse wrote:
> 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.

Sorry about that. Won't happen again ...

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

I am learning fast

>
> 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.

I removed the above mentioned check and now it _appears_ to work
correctly. Is this all that needs to be done ? Are there similar issues
when writing to the filesys ?

Bob

>
> --
> dwmw2
--
----------------------------------------------------------------------
ir. Bob Koninckx
Katholieke Universiteit Leuven
Division Production Engineering, tel. +32 16 322535
Machine Design and Automation fax. +32 16 322987
Celestijnenlaan 300B bob.koninckx@mech.kuleuven.ac.be