public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* MTD CVS update: 'mtd/fs/jffs inode-v22.c Makefile inode.c'
@ 2000-06-16 11:13 David Woodhouse
  2000-06-16 11:42 ` Alexander Larsson
  0 siblings, 1 reply; 12+ messages in thread
From: David Woodhouse @ 2000-06-16 11:13 UTC (permalink / raw)
  To: cvs-notify

Update of /home/cvs/mtd/fs/jffs
In directory infradead.org:/tmp/cvs-serv10791

Modified Files:
	Makefile 
Added Files:
	inode-v22.c 
Removed Files:
	inode.c 
Log Message:
Add inode-v22.c and fix Makefile to compile the appropriate one according
to which kernel we're part of.



To unsubscribe, send "unsubscribe mtd" to majordomo@infradead.org

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: MTD CVS update: 'mtd/fs/jffs inode-v22.c Makefile inode.c'
  2000-06-16 11:13 MTD CVS update: 'mtd/fs/jffs inode-v22.c Makefile inode.c' David Woodhouse
@ 2000-06-16 11:42 ` Alexander Larsson
  2000-06-16 11:46   ` David Woodhouse
  0 siblings, 1 reply; 12+ messages in thread
From: Alexander Larsson @ 2000-06-16 11:42 UTC (permalink / raw)
  To: David Woodhouse; +Cc: mtd



On Fri, 16 Jun 2000, David Woodhouse wrote:

> Update of /home/cvs/mtd/fs/jffs
> In directory infradead.org:/tmp/cvs-serv10791
> 
> Modified Files:
> 	Makefile 
> Added Files:
> 	inode-v22.c 
> Removed Files:
> 	inode.c 
> Log Message:
> Add inode-v22.c and fix Makefile to compile the appropriate one according
> to which kernel we're part of.

Hmmm. There is quite a lot of 'spurious' differences in the 2.2 version
and the 2.3 version. They could be merged to be much more alike.

/ Alex




To unsubscribe, send "unsubscribe mtd" to majordomo@infradead.org

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: MTD CVS update: 'mtd/fs/jffs inode-v22.c Makefile inode.c'
  2000-06-16 11:42 ` Alexander Larsson
@ 2000-06-16 11:46   ` David Woodhouse
  2000-06-16 11:49     ` Alexander Larsson
  2000-06-16 11:58     ` Alexander Larsson
  0 siblings, 2 replies; 12+ messages in thread
From: David Woodhouse @ 2000-06-16 11:46 UTC (permalink / raw)
  To: Alexander Larsson; +Cc: mtd, Sébastien Côté


alex@cendio.se said:
>  Hmmm. There is quite a lot of 'spurious' differences in the 2.2
> version and the 2.3 version. They could be merged to be much more
> alike.

I know. I've imported Sébastien's version as-is for now, and I'm about to 
look at little details like making it compile :)

After that, some of the spurious differences can be eliminated. We may even 
be able to have an 'inode-common.c' and make the v22 and v23 versions even 
smaller - we'll see.

--
dwmw2




To unsubscribe, send "unsubscribe mtd" to majordomo@infradead.org

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: MTD CVS update: 'mtd/fs/jffs inode-v22.c Makefile inode.c'
  2000-06-16 11:46   ` David Woodhouse
@ 2000-06-16 11:49     ` Alexander Larsson
  2000-06-16 12:31       ` David Woodhouse
  2000-06-16 11:58     ` Alexander Larsson
  1 sibling, 1 reply; 12+ messages in thread
From: Alexander Larsson @ 2000-06-16 11:49 UTC (permalink / raw)
  To: David Woodhouse; +Cc: mtd, Sébastien Côté



On Fri, 16 Jun 2000, David Woodhouse wrote:

> 
> alex@cendio.se said:
> >  Hmmm. There is quite a lot of 'spurious' differences in the 2.2
> > version and the 2.3 version. They could be merged to be much more
> > alike.
> 
> I know. I've imported Sébastien's version as-is for now, and I'm about to 
> look at little details like making it compile :)
> 
> After that, some of the spurious differences can be eliminated. We may even 
> be able to have an 'inode-common.c' and make the v22 and v23 versions even 
> smaller - we'll see.

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.

/ Alex




To unsubscribe, send "unsubscribe mtd" to majordomo@infradead.org

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: MTD CVS update: 'mtd/fs/jffs inode-v22.c Makefile inode.c'
  2000-06-16 11:46   ` David Woodhouse
  2000-06-16 11:49     ` Alexander Larsson
@ 2000-06-16 11:58     ` Alexander Larsson
  2000-06-16 12:05       ` David Woodhouse
  1 sibling, 1 reply; 12+ messages in thread
From: Alexander Larsson @ 2000-06-16 11:58 UTC (permalink / raw)
  To: David Woodhouse; +Cc: mtd, Sébastien Côté

On Fri, 16 Jun 2000, David Woodhouse wrote:

> alex@cendio.se said:
> >  Hmmm. There is quite a lot of 'spurious' differences in the 2.2
> > version and the 2.3 version. They could be merged to be much more
> > alike.
> 
> I know. I've imported Sébastien's version as-is for now, and I'm about to 
> look at little details like making it compile :)
> 
> After that, some of the spurious differences can be eliminated. We may even 
> be able to have an 'inode-common.c' and make the v22 and v23 versions even 
> smaller - we'll see.

 Btw. Do you want any help merging these?

/ Alex




To unsubscribe, send "unsubscribe mtd" to majordomo@infradead.org

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: MTD CVS update: 'mtd/fs/jffs inode-v22.c Makefile inode.c'
  2000-06-16 11:58     ` Alexander Larsson
@ 2000-06-16 12:05       ` David Woodhouse
  2000-06-16 12:17         ` Alexander Larsson
  0 siblings, 1 reply; 12+ messages in thread
From: David Woodhouse @ 2000-06-16 12:05 UTC (permalink / raw)
  To: Alexander Larsson; +Cc: mtd, Sébastien Côté


alex@cendio.se said:
> 
>  Btw. Do you want any help merging these? 

Yes please.

I'm being confused by a more fundamental problem ATM. 

include/linux/mtd/mtd.h includes <linux/module.h> because it needs to use 
try_inc_mod_count(). 

Unfortunately, this means I get:

intrep.o(.modinfo+0x0): multiple definition of `__module_kernel_version'
jffs_fm.o(.modinfo+0x0): first defined here
inode-v22.o(.modinfo+0x0): multiple definition of `__module_kernel_version'
jffs_fm.o(.modinfo+0x0): first defined here
make[1]: *** [jffs.o] Error 1


Defining __NO_VERSION__ before including module.h, and then undefining it 
afterwards, isn't right because that would mean that it doesn't get 
processed correctly if the main file later includes module.h and _does_ 
want __module_kernel_version to be defined by it.

I suspect that for now I'm just going to cheat and define try_inc_mod_count 
myself, but that's hardly ideal.


--
dwmw2




To unsubscribe, send "unsubscribe mtd" to majordomo@infradead.org

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: MTD CVS update: 'mtd/fs/jffs inode-v22.c Makefile inode.c'
  2000-06-16 12:05       ` David Woodhouse
@ 2000-06-16 12:17         ` Alexander Larsson
  0 siblings, 0 replies; 12+ messages in thread
From: Alexander Larsson @ 2000-06-16 12:17 UTC (permalink / raw)
  To: David Woodhouse; +Cc: mtd, Sébastien Côté



On Fri, 16 Jun 2000, David Woodhouse wrote:

> 
> alex@cendio.se said:
> > 
> >  Btw. Do you want any help merging these? 
> 
> Yes please.

 I can't test it right now, but i can do the "obvious" changes.

/ Alex




To unsubscribe, send "unsubscribe mtd" to majordomo@infradead.org

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: MTD CVS update: 'mtd/fs/jffs inode-v22.c Makefile inode.c'
  2000-06-16 11:49     ` Alexander Larsson
@ 2000-06-16 12:31       ` David Woodhouse
  2000-06-16 12:46         ` Alexander Larsson
  2000-06-16 14:13         ` Alexander Larsson
  0 siblings, 2 replies; 12+ messages in thread
From: David Woodhouse @ 2000-06-16 12:31 UTC (permalink / raw)
  To: Alexander Larsson; +Cc: mtd, Sébastien Côté


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 can start right now if the former.

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

--
dwmw2




To unsubscribe, send "unsubscribe mtd" to majordomo@infradead.org

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: MTD CVS update: 'mtd/fs/jffs inode-v22.c Makefile inode.c'
  2000-06-16 12:31       ` David Woodhouse
@ 2000-06-16 12:46         ` Alexander Larsson
  2000-06-16 14:13         ` Alexander Larsson
  1 sibling, 0 replies; 12+ messages in thread
From: Alexander Larsson @ 2000-06-16 12:46 UTC (permalink / raw)
  To: David Woodhouse; +Cc: mtd, Sébastien Côté



On Fri, 16 Jun 2000, David Woodhouse wrote:

> 
> 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 can start right now if the former.
> 
> Then, as my only testbed is an Alpha, we'll find out if it's 64-bit clean :)

 I'm doing it right now. Don't touch until i check in.

/ Alex




To unsubscribe, send "unsubscribe mtd" to majordomo@infradead.org

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: MTD CVS update: 'mtd/fs/jffs inode-v22.c Makefile inode.c'
  2000-06-16 12:31       ` David Woodhouse
  2000-06-16 12:46         ` Alexander Larsson
@ 2000-06-16 14:13         ` Alexander Larsson
  2000-06-16 14:49           ` Sébastien Côté
  2000-06-16 15:48           ` Sébastien Côté
  1 sibling, 2 replies; 12+ messages in thread
From: Alexander Larsson @ 2000-06-16 14:13 UTC (permalink / raw)
  To: David Woodhouse; +Cc: mtd, Sébastien Côté

On Fri, 16 Jun 2000, David Woodhouse wrote:
> 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.

/ Alex




To unsubscribe, send "unsubscribe mtd" to majordomo@infradead.org

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: MTD CVS update: 'mtd/fs/jffs inode-v22.c Makefile inode.c'
  2000-06-16 14:13         ` Alexander Larsson
@ 2000-06-16 14:49           ` Sébastien Côté
  2000-06-16 15:48           ` Sébastien Côté
  1 sibling, 0 replies; 12+ messages in thread
From: Sébastien Côté @ 2000-06-16 14:49 UTC (permalink / raw)
  To: Alexander Larsson; +Cc: David Woodhouse, mtd

Alexander Larsson wrote:

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

Ext2 does it in 2.2 and it seemed right to me.  If the fs changes while
it is being built, this is really not a good thing.
 
> 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.

I'll have to check what changes you're talking about but IIRC the page
handling changed quite a bit between 2.2 and 2.3.

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

Sorry about that.  I completly forgot them when I sent my tree to David
:)

-- 
Sébastien Côté


To unsubscribe, send "unsubscribe mtd" to majordomo@infradead.org

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: MTD CVS update: 'mtd/fs/jffs inode-v22.c Makefile inode.c'
  2000-06-16 14:13         ` Alexander Larsson
  2000-06-16 14:49           ` Sébastien Côté
@ 2000-06-16 15:48           ` Sébastien Côté
  1 sibling, 0 replies; 12+ messages in thread
From: Sébastien Côté @ 2000-06-16 15:48 UTC (permalink / raw)
  To: Alexander Larsson; +Cc: David Woodhouse, mtd

Alexander Larsson wrote:

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

The file-size handling is definitly good.  The semaphore locking isn't
present in the 2.2 version of ext2 (it was introduced in 2.3) so I don't
think it's needed.

-- 
Sébastien Côté


To unsubscribe, send "unsubscribe mtd" to majordomo@infradead.org

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2000-06-16 15:47 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-06-16 11:13 MTD CVS update: 'mtd/fs/jffs inode-v22.c Makefile inode.c' David Woodhouse
2000-06-16 11:42 ` Alexander Larsson
2000-06-16 11:46   ` David Woodhouse
2000-06-16 11:49     ` Alexander Larsson
2000-06-16 12:31       ` David Woodhouse
2000-06-16 12:46         ` Alexander Larsson
2000-06-16 14:13         ` Alexander Larsson
2000-06-16 14:49           ` Sébastien Côté
2000-06-16 15:48           ` Sébastien Côté
2000-06-16 11:58     ` Alexander Larsson
2000-06-16 12:05       ` David Woodhouse
2000-06-16 12:17         ` Alexander Larsson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox