Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How to patch ext4.git source with LATEST broken-out patches
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
SlackwareInAZ
Tux's lil' helper
Tux's lil' helper


Joined: 29 Aug 2005
Posts: 92

PostPosted: Sun Jun 01, 2008 11:20 pm    Post subject: How to patch ext4.git source with LATEST broken-out patches Reply with quote

Hey guys,

I want to try out the ext4 git kernel branch (2.6.26-r2).

Wanted to patch the kernel source with the broken-out patches containing the ext4 online defrag patches to see how the e2dfrg will work. My knowledge of patching syntax is limited to applying single patches, but I know there is a way to applying multiple patches from a directory to the same target (in this case the git kernel source)

Did this:

git clone git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4.git (to obtain updated ext4fs for 2.6.26-r2)
wget http://www.kernel.org/pub/linux/kernel/people/tytso/ext4-patches/LATEST/broken-out.tar.bz2
tar -xjpvf broken-out.tar.bz2
mv broken-out patches (places patch directory containing the multiple patches in root directory of source. i.e. 2.6.26-r2)

Question: how do I patch the source with these patches?

Thanks,
Gary :?
Back to top
View user's profile Send private message
Thargor
Apprentice
Apprentice


Joined: 23 Dec 2005
Posts: 239
Location: Bamberg/Germany

PostPosted: Mon Jun 02, 2008 1:50 pm    Post subject: Reply with quote

I personally wouldn't recommend using ext4.git, because it tends to break from time to time and patches are easier to use.
You should probably use the ext4-patch-queue, which you can get here: http://repo.or.cz/w/ext4-patch-queue.git

It should the same and it's maintained by the ext4 devs.

Just run
Code:
git clone git://repo.or.cz/ext4-patch-queue.git
(You'll need dev-util/git for this.)

Then for patching your kernel run:
Code:
for patch in `egrep -v '^#' ext4-patch-queue/series` ; do cat ext4-patch-queue/${patch} | patch -p1 -d /path/to/your/kernel ; done

This will apply all patches, but online defrag is the second last anyway, so that's probably okay for you
This should also work for the broken-out.tar.bz2

You could probably also use dev-util/quilt to archieve the same thing, but I don't know how to use it, so that's how I do it.
_________________
Ideas are bulletproof
Back to top
View user's profile Send private message
SlackwareInAZ
Tux's lil' helper
Tux's lil' helper


Joined: 29 Aug 2005
Posts: 92

PostPosted: Wed Jun 04, 2008 6:02 am    Post subject: Reply with quote

Thargor,

Thanks for your reply. Still having difficulties.

did a git clone for the ext4-patch-queue as you suggested at /sda6/ext4-patch-queue

Had my 2.6.25-r4 gentoo-sources at /usr/src/linux-2.6.25-gentoo-r4

cd /sda6/ext4-patch-queue
then I ran your command using /path/to/my/kernel of /usr/src/linux-2.6.25-gentoo-r4

got various cat messages listing each patch saying no such file or directory?

Is there a specific kernel I need to use? If I manually inspect each patch, the patch is to linux-2.6.26-rX. I even tried using my kernel path as /usr/src/linux (the symlink) without success.

Help!! :(
Back to top
View user's profile Send private message
SlackwareInAZ
Tux's lil' helper
Tux's lil' helper


Joined: 29 Aug 2005
Posts: 92

PostPosted: Wed Jun 04, 2008 6:24 am    Post subject: Reply with quote

Thargor,

Took a closer look at the short log for the ext4-patches-queue. They are using 2.6.26-rc4, so I patched 2.6.25 with patch-2.6.26-rc4 and tried your script again with the same results. Cat keeps listing each patch (presumably from the series file) complaining no such file or directory

Gary :?
Back to top
View user's profile Send private message
SlackwareInAZ
Tux's lil' helper
Tux's lil' helper


Joined: 29 Aug 2005
Posts: 92

PostPosted: Wed Jun 04, 2008 6:28 am    Post subject: Reply with quote

Thargor,

Figured it out. Modified your command to include the absolute path to /sda6/ext4-patch-queue, including the one after the cat command. :oops:

Then it patched fine.

Thanks again,
Gary
Back to top
View user's profile Send private message
SlackwareInAZ
Tux's lil' helper
Tux's lil' helper


Joined: 29 Aug 2005
Posts: 92

PostPosted: Wed Jun 04, 2008 6:59 am    Post subject: Reply with quote

Thargor,

As I stated earlier, was able to properly patch 2.6.26-rc4 which is the rebase kernel for ext4-patches-queue now.

Now it won't compile.

Craps out at:

CC fs/eventfd.o
CC fs/binfmt_script.o
CC fs/binfmt_elf.o
CC fs/mbcache.o
CC fs/dnotify.o
CC fs/devpts/inode.o
LD fs/devpts/devpts.o
LD fs/devpts/built-in.o
CC fs/ext4/balloc.o

fs/ext4/balloc.c: In function 'ext4_has_free_blocks':
fs/ext4/balloc.c:1627: error: 'FBC_BATCH' undeclared (first use in this function)
fs/ext4/balloc.c:1627: error: (Each undeclared identifier is reported only once
fs/ext4/balloc.c:1627: error: for each function it appears in.)
fs/ext4/balloc.c:1629: error: implicit declaration of function 'percpu_counter_sum_and_set'
make[2]: *** [fs/ext4/balloc.o] Error 1
make[1]: *** [fs/ext4] Error 2
make: *** [fs] Error 2

Any suggestions?

Gary :(
Back to top
View user's profile Send private message
SlackwareInAZ
Tux's lil' helper
Tux's lil' helper


Joined: 29 Aug 2005
Posts: 92

PostPosted: Wed Jun 04, 2008 7:32 am    Post subject: Reply with quote

Thargor,

Tried the broken-out patches which seem to be several weeks old (17-May-2008) as opposed to the ext4-patches-queue list. They patched fine against 2.6.26-rc4 kernel, and it compiled fine.

Rebooted with the new kernel and am actually using the e4defrag utility for the os which is on /sda5. Pretty cool!

Any suggestions on how to rectify the compile error using the 2.6.26-rc4 kernel patched with the patches from ext4-patches-queue would be most appreciated.

Thanks,
Gary
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum