Re: MTD CVS update: 'mtd/fs/jffs inode-v22.c Makefile inode.c'

Alexander Larsson
2000-06-16T14:13:02Z

> alex@cendio.se said:
> > A lot of it is whitespace changes. Some are optimizations, fixes and
> > changes I've seem to have done after Sébastien branched his version.
>
> I can compare a diff of the two an eliminate the obvious ones where the
> code is actually the same, or even where one version is obviously better.
>
> Some of it I should probably leave to you, at least till I know the code a
> bit better.
>
> Rather than doing conflicting patches, do you want me to do the obvious
> ones now and then let you know, or leave it all to you?

I've now checked in a version that moves the 2.3 and 2.2 version much
closer to each others (M-x ediff-buffers rules my world!). I haven't
actually tried to compile it though.

I did the most obvious conversions, but i had to leave a couple of things
because that need more thinking and testing:

jffs_read_super() - Does it really has to lock the superblock here?

jffs_read_page() - I've done some changes here in the 2.3 version that
might be intresting to 2.2. These are mainly page handling stuff, you need
to check that carefully.

jffs_file_write() - The 2.3 version has some file-size handling (SIGXFSZ)
that could be interesting for 2.2. There is also some semaphore locking
that 2.2 doesn't have which I'm a bit unsure of if it is needed in 2.2.
The *pos handling can maybe also be moved over.

There are also some comments (/* Is this really needed in 2.2?
*/) sprinkled in the code. These are mainly corner-cases which I and al
viro has removed from the 2.3 code because they are handled by the VFS.
Probably most of these are handled by the 2.2 VFS too...

Also there are some french comments in the code that i left there, because
i don't understand them.

> Then, as my only testbed is an Alpha, we'll find out if it's 64-bit clean :)

It is *not* clean with respect to treating userspace vs kernel-pointers
correctly. In jffs_file_write() it passes userspace pointers to the mtd
flash write functions. This works for x86, but it might break for Alpha.