You are not logged in.

#1 2009-01-20 18:35:30

moz
Member
Registered: 2009-01-20
Posts: 17

[Solved] kernel 2.6.28.1 compilation fails with reiser4 patch

Hi,
has anyone had problems compiling the latest kernel with the reiser4 patch?
The patching process itself completes successfully apart from this part:

patching file include/linux/fs.h                                              
Hunk #1 succeeded at 1372 (offset 3 lines).                                   
Hunk #2 succeeded at 1811 (offset 3 lines).                                   
patching file mm/filemap.c

While the compilation fails here

CC      fs/reiser4/plugin/file/file_conversion.o
fs/reiser4/plugin/file/file_conversion.c: In function 'reiser4_write_begin_careful':
fs/reiser4/plugin/file/file_conversion.c:689: error: implicit declaration of function '__grab_cache_page'
fs/reiser4/plugin/file/file_conversion.c:689: warning: assignment makes pointer from integer without a cast
make[2]: *** [fs/reiser4/plugin/file/file_conversion.o] Error 1
make[1]: *** [fs/reiser4] Error 2
make: *** [fs] Error 2

Or is it just me doing something wrong?

Last edited by moz (2009-01-23 13:08:27)

Offline

#2 2009-01-20 19:37:10

iceman81
Member
From: Cambridge
Registered: 2007-07-25
Posts: 59
Website

Re: [Solved] kernel 2.6.28.1 compilation fails with reiser4 patch

moz wrote:

Hi,
has anyone had problems compiling the latest kernel with the reiser4 patch?
The patching process itself completes successfully apart from this part:

patching file include/linux/fs.h                                              
Hunk #1 succeeded at 1372 (offset 3 lines).                                   
Hunk #2 succeeded at 1811 (offset 3 lines).                                   
patching file mm/filemap.c

While the compilation fails here

CC      fs/reiser4/plugin/file/file_conversion.o
fs/reiser4/plugin/file/file_conversion.c: In function 'reiser4_write_begin_careful':
fs/reiser4/plugin/file/file_conversion.c:689: error: implicit declaration of function '__grab_cache_page'
fs/reiser4/plugin/file/file_conversion.c:689: warning: assignment makes pointer from integer without a cast
make[2]: *** [fs/reiser4/plugin/file/file_conversion.o] Error 1
make[1]: *** [fs/reiser4] Error 2
make: *** [fs] Error 2

Or is it just me doing something wrong?

It is a well known issue

Offline

#3 2009-01-20 20:06:50

moz
Member
Registered: 2009-01-20
Posts: 17

Re: [Solved] kernel 2.6.28.1 compilation fails with reiser4 patch

Strange, i couldn't find anything googling..apart from a thread here in the arch forums http://bbs.archlinux.org/viewtopic.php?pid=483852 talking about a patch, but i couldn't find anything about that either.

Offline

#4 2009-01-20 22:13:56

Kirurgs
Member
Registered: 2008-10-20
Posts: 144

Re: [Solved] kernel 2.6.28.1 compilation fails with reiser4 patch

There is nothing strange really smile
I made this patch myself... But can't really remember where I did get the idea (or code) from... Sorry sad
Ahh, this is for 2.6.28.1 kernel, I haven't tried this on any other kernels...

--- linux-2.6.28/fs/reiser4/plugin/file/file_conversion.c    2009-01-19 10:13:33.000000000 +0200
+++ linux-2.6.28.1/fs/reiser4/plugin/file/file_conversion.c    2009-01-19 10:11:00.000000000 +0200
@@ -686,7 +686,7 @@
     start = pos & (PAGE_CACHE_SIZE - 1);
     end = start + len;
 
-    page = __grab_cache_page(mapping, index);
+    page = grab_cache_page_write_begin(mapping, index, flags);
     *pagep = page;
     if (!page)
         return -ENOMEM;

Edit: corrected patch to more correct one, not to confuse people...

Last edited by Kirurgs (2009-01-22 21:29:38)

Offline

#5 2009-01-21 18:05:48

iceman81
Member
From: Cambridge
Registered: 2007-07-25
Posts: 59
Website

Re: [Solved] kernel 2.6.28.1 compilation fails with reiser4 patch

Kirurgs wrote:

There is nothing strange really smile
I made this patch myself... But can't really remember where I did get the idea (or code) from... Sorry sad

from the kernel changelog for 2.6.28.1 ;-)

Offline

#6 2009-01-21 20:26:07

moz
Member
Registered: 2009-01-20
Posts: 17

Re: [Solved] kernel 2.6.28.1 compilation fails with reiser4 patch

Thanks for the patch : ). It did work. Later i found another similar patch from zen sources git:


-    page = __grab_cache_page(mapping, index);

+   page = grab_cache_page_write_begin(mapping, index, flags);

That bit was pulled from here http://git.zen-sources.org/?p=zen.git;a … c1ffe57104

Seems to be a little bit different from yours but i havent tested it yet. It should work too i guess.

Offline

#7 2009-01-22 11:41:57

iceman81
Member
From: Cambridge
Registered: 2007-07-25
Posts: 59
Website

Re: [Solved] kernel 2.6.28.1 compilation fails with reiser4 patch

moz wrote:

Thanks for the patch : ). It did work. Later i found another similar patch from zen sources git:


-    page = __grab_cache_page(mapping, index);

+   page = grab_cache_page_write_begin(mapping, index, flags);

That's the good one.

Doing:

 
+   page = grab_cache_page_write_begin(mapping, index, flags & AOP_FLAG_NOFS);

is simply useless.

Offline

#8 2009-01-23 12:30:56

Kirurgs
Member
Registered: 2008-10-20
Posts: 144

Re: [Solved] kernel 2.6.28.1 compilation fails with reiser4 patch

I fixed my patch above...

Offline

Board footer

Powered by FluxBB