patch for 2.6.36-rc4?
Is there a patch that applies to the upstream source of 2.6.36 that enables ureadahead to work?
Question information
- Language:
- English Edit question
- Status:
- Solved
- Assignee:
- No assignee Edit question
- Solved by:
- andrew thomas
- Solved:
- Last query:
- Last reply:
Revision history for this message
|
#1 |
I'd log a bug (if one doesn't already exist)
Revision history for this message
|
#2 |
ureadahead requires a kernel patch included in the Ubuntu kernel. It is not a bug that the upstream kernel does not work with ureadahead. I just wanted to get the patch that is applied to the Ubuntu kernel and apply it to the upstream source.
Revision history for this message
|
#3 |
About two weeks ago I send an email asking the developer to update the patch included in the source tarball. He has yet to reply. The issue is that some functions in fs/open.c were moved into another file. I don't have much experience with C (in fact very little) but I could try editing the patch file.
Revision history for this message
|
#4 |
I was able to the new natty branch here:
git://kernel.
which, I believe, has the ureadahead patches ( although I did have to apply the apparmor patches since they were dropped.)
Revision history for this message
|
#5 |
Still waiting for a patch file.
Revision history for this message
|
#6 |
I edited the ureadahead patch to work with kernel 2.6.35 and 2.6.36. This edit is not official as its done by me and not the developer. All i did was compare the file fs/open.c from the patched ubuntu 2.6.35 kernel with the unpatched one of the same version and again with a file from patched 2.6.34 kernel. I found that they changed the line which the patch file uses in order to enter its information in the right place. therefore i just replaced the old line with the new one and thats it ! 2 lines edit. u can download it here:
http://
i hope this helps some1
Revision history for this message
|
#7 |
Ronnie: Thanks that works just fine. Now I need to make a howto for Gentoo
Revision history for this message
|
#8 |
Ronnie: That patch may work on 2.6.35 but it is not right for 2.6.36. Changes need to be made for fs/exec.c & fs/open.c
Revision history for this message
|
#9 |
I tested it on 2.6.36-rc6 and it was working but I will investigate the issue today. Maybe because i used the 2.6.36-rc6 patch over the 2.6.35 kernel and then applied it.
Revision history for this message
|
#10 |
Confirm, last patch from andrew thomas works for 2.6.36.
I have downloaded vanilla kernel 2.6.36, applied patches from ~kernel-
Patch from tar.gz -- fails.
Revision history for this message
|
#11 |
@ al_indigo : glad to be of help.
Revision history for this message
|
#12 |
@al_indigo: What is the address for the 2.6.36 patches? I find Launchpad a major PITA to navigate and find stuff.
Revision history for this message
|
#13 |
@ jordan: http://
Revision history for this message
|
#14 |
I think that was not totally right. Here is a revised one. http://
Revision history for this message
|
#15 |
JORDAN-DESKTOP linux-2.6.36 # patch -p1 < ~/trace_
patching file fs/exec.c
Hunk #1 succeeded at 55 (offset -1 lines).
missing header for unified diff at line 35 of patch
can't find file to patch at input line 35
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
-------
|
-------
File to patch: fs/open.c
patching file fs/open.c
Hunk #1 FAILED at 702.
1 out of 1 hunk FAILED -- saving rejects to file fs/open.c.rej
patching file fs/open.c
Hunk #1 succeeded at 33 (offset -2 lines).
Hunk #2 succeeded at 893 (offset -3 lines).
patching file include/
JORDAN-DESKTOP linux-2.6.36 #
Okay fine. <_<
Revision history for this message
|
#16 |
It's strange -- I tried once more the last version of the patch on the other machine and everything worked
//BTW I think it would be better to try a patch with option --dry-run and to apply a patch only it doesn't fail with this option
Revision history for this message
|
#17 |
That is strange. I just tried the second version out again : http://
It worked just fine on the latest git version from git://git.
[andrew@andrew-arch linux-git-build]$ patch -p1 < ../traceB.patch
patching file fs/exec.c
Hunk #1 succeeded at 55 (offset -1 lines).
patching file fs/open.c
Hunk #1 succeeded at 33 (offset -2 lines).
Hunk #2 succeeded at 893 (offset -3 lines).
patching file include/
Revision history for this message
|
#18 |
JORDAN-DESKTOP linux-2.
patching file fs/exec.c
Hunk #1 succeeded at 55 (offset -1 lines).
missing header for unified diff at line 35 of patch
can't find file to patch at input line 35
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
-------
|
-------
File to patch: fs/open.c
patching file fs/open.c
Hunk #1 FAILED at 702.
1 out of 1 hunk FAILED -- saving rejects to file fs/open.c.rej
patching file fs/open.c
Hunk #1 succeeded at 33 (offset -2 lines).
Hunk #2 succeeded at 893 (offset -3 lines).
patching file include/
JORDAN-DESKTOP linux-2.
I'll try bypassing portage and clone the git tree directly.
Revision history for this message
|
#19 |
This is using the git repo:
JORDAN-DESKTOP linux-2.6 # patch -p1 < ~/trace_
patching file fs/exec.c
Hunk #1 succeeded at 55 (offset -1 lines).
missing header for unified diff at line 35 of patch
can't find file to patch at input line 35
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
-------
|
-------
File to patch: fs/open.c
patching file fs/open.c
Hunk #1 FAILED at 702.
1 out of 1 hunk FAILED -- saving rejects to file fs/open.c.rej
patching file fs/open.c
Hunk #1 succeeded at 33 (offset -2 lines).
Hunk #2 succeeded at 893 (offset -3 lines).
patching file include/
JORDAN-DESKTOP linux-2.6 #
Revision history for this message
|
#20 |
You are using http://
Could you post the contents of fs/open.c.rej?
Revision history for this message
|
#21 |
@jordan: Maybe you'll show:
1) exact version of the kernel
2) how do you get the kernel
3) how do you patch the kernel (ubuntu patches)
4) fs/open.c
5) open.c.rej
?
Revision history for this message
|
#22 |
@andrew thomas: Yes that is the patch file I'm using.
@al_indigo:
1) straight from the git repo (the git source andrew posted earlier))
2) #cd /usr/src
#git clone git://git.
#cd linux-2.6
3) I download the plain text file that andrew thomas posted and save it in ~/trace_
#patch -p1 < ~/trace_
4) http://
5) http://
Revision history for this message
|
#23 |
Okay, I see what's the difference between our actions. I didn't use vanilla kernel eventually
Between 2) and 3) I did the following:
1) I have gone to http://
2) Then I've downloaded patches 0001, 0002, 0003
3) Tried to apply them to sources with patch -p1 <patchname --dry-run
4) Applyed them with patch -p1 <patchname
5) Downloaded patch from andew_thomas (one more time: thanks:) ) -- any of them, both work perfect
6) Tried to apply that patches
7) Applied them
8) make -j8 && make-kpkg :)
I hope this would help.
Revision history for this message
|
#24 |
When you copied the patch from the page there must have been some kind error. The segment that was saved in fs/open.c.rej is actually part of fs/exec.c Your fs/open.c is correct. Look in fs/exec.c and see if
@@ -700,6 +702,8 @@ struct file *open_exec(const char *name)
fsnotify_
+ trace_open_
+
err = deny_write_
if (err)
goto exit;
is in there or not. I would try and save the patch again.
Revision history for this message
|
#25 |
@andrew thomas: could you pastebin the patch file? Launchpad's pastebin service interferes with wget
@al_indigo: I'll try that on Wednesday when I get back from Toronto
Revision history for this message
|
#27 |
JORDAN-DESKTOP linux-2.6 # patch -p1 < 0004-trace-
patching file fs/exec.c
patch: **** malformed patch at line 28:
JORDAN-DESKTOP linux-2.6 #
The three patch files al_indigo linked to indirectly were applied just fine
Revision history for this message
|
#28 |
@ Jordan I just tried to apply that patch on Slackware and it gave me the same error that it gave you. I guess that the patch command is just a bit smarter on Arch than on Gentoo and Slack. I will generate a 'clean' patch in the next couple of days.
Revision history for this message
|
#29 |
@ jordan : here is a patch that should apply cleanly.
Revision history for this message
|
#30 |
JORDAN-DESKTOP linux-2.6 # patch --dry-run -p1 < ~/0004-trace-events
patching file fs/exec.c
Hunk #1 FAILED at 55.
Hunk #2 FAILED at 702.
2 out of 2 hunks FAILED -- saving rejects to file fs/exec.c.rej
patching file fs/open.c
Hunk #1 FAILED at 33.
Hunk #2 FAILED at 893.
2 out of 2 hunks FAILED -- saving rejects to file fs/open.c.rej
patching file include/
patch unexpectedly ends in middle of line
patch: **** malformed patch at line 123:
JORDAN-DESKTOP linux-2.6 #
Oh dear.
Revision history for this message
|
#31 |
OK, I created this patch on gentoo and it works for me. I hope that it will work for you.
Revision history for this message
|
#32 |
That one didn't copy correctly to pastebin.
I am still getting
(Stripping trailing CRs from patch.)
patching file fs/exec.c
(Stripping trailing CRs from patch.)
patching file fs/open.c
(Stripping trailing CRs from patch.)
patching file include/
but it does apply
Revision history for this message
|
#33 |
The problem I was having was that I was using the download button to get the patch. When I use the raw button and copy the contents of http://
Revision history for this message
|
#34 |
This will work with wget.
wget http://