[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: BBC patch

On Fri, 2004-05-07 at 12:09 +0200, Ferenc Havasi wrote:
> Now I'm working on the separated patches, checked out the newest jffs2 
> code and I see the changes. Now all compressor has a kernel and a user 
> space version. They are very small compressors - I think it's OK.
> But: what about the bigger compressors, and the shared code in our 
> compr.c (compressor registartion, compression mode handling, and later 
> model file handling) Should we (almost) duplicate these codes (in 
> fs/jffs2/ and util/) or apply the symlink-solution and ifdefs?

I think the model file handling is going to _have_ to be different in
the kernel and in mkfs.jffs2, isn't it? The latter can just mmap it.

I'm not too unhappy with duplicating the registration code, since I
think that will differ enough that the ifdefs make it too ugly to share.

For the compressors, themselves, I think we can move them into a
separate directory and aim to build them in both environments. I'd
prefer to write them as kernel code and then make that work in userspace
with #defines for kmalloc, printk etc. Rather than littering them with
ifdefs, we can have a header file which is different for kernel and for
userspace, and which makes it just work. We handle building for both 2.6
and 2.4 kernels that way -- it's not so hard.


To unsubscribe from this list: send the line "unsubscribe jffs-dev" in
the body of a message to majordomo@xxxxxxx.com