Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Gentoo-sources-r9 with XFS
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
Jasper
n00b
n00b


Joined: 28 Sep 2002
Posts: 5
Location: Netherlands, the

PostPosted: Sat Sep 28, 2002 11:29 pm    Post subject: Gentoo-sources-r9 with XFS Reply with quote

Basically what I did was this:

- Emerge the gentoo-sources(r9)
- Patch it against the 2.4.19 XFS patch: ftp://oss.sgi.com/projects/xfs/download/patches/2.4.19/xfs-2.4.19-all-i386.bz2
- Manually apply the following rejected hunks(With some tinkering):
fs/Makefile.rej (Mind the tabs !)
fs/namei.c.rej
kernel/Makefile.rej (Mind the tabs !)
kernel/ksyms.c.rej
mm/mprotect.c.rej
include/linux/sysctl.h.rej
arch/i386/defconfig.rej
Makefile.rej (Mind the tabs !)
Producing the following files:
http://217.121.81.57/tmp/fs/Makefile
http://217.121.81.57/tmp/fs/namei.c
http://217.121.81.57/tmp/kernel/Makefile
http://217.121.81.57/tmp/kernel/ksyms.c
http://217.121.81.57/tmp/mm/mprotect.c
http://217.121.81.57/tmp/include/linux/sysctl.h
http://217.121.81.57/tmp/arch/i386/defconfig
http://217.121.81.57/tmp/Makefile

- Replace DQUOT_SYNC(dev) with DQUOT_SYNC_DEV(dev) in fs/buffer.c:419

Then just configured the kernel and did a make dep bzImage modules modules_install, added the appropriate lilo entries and booted with the new kernel:
SGI XFS snapshot 2.4.19-2002-09-27_04:22_UTC with ACLs, no debug enabled

And you guys couldn't figure out how to do this ? Tsk ;)

- Jasper
Back to top
View user's profile Send private message
Henning
Apprentice
Apprentice


Joined: 08 Sep 2002
Posts: 196
Location: Braunschweig

PostPosted: Sun Sep 29, 2002 12:12 pm    Post subject: Reply with quote

Hi,

that's what I need.

But please explain how to apply the patch. I'm a newbie on patching.
(It's my secon one)
I tried : bzip2 -c -d xfs... | patch -p0
but there is a message that a file xfs-pristine... is not found.

Thank you
Back to top
View user's profile Send private message
Jasper
n00b
n00b


Joined: 28 Sep 2002
Posts: 5
Location: Netherlands, the

PostPosted: Sun Sep 29, 2002 12:51 pm    Post subject: Reply with quote

Move the patch into your /usr/src/linux-2.4.9-gentoo-r9/ directory and then in that directory do:
bzip2 -dc xfs-2.4.19-all-i386.bz2 | patch -p1
Back to top
View user's profile Send private message
Henning
Apprentice
Apprentice


Joined: 08 Sep 2002
Posts: 196
Location: Braunschweig

PostPosted: Mon Sep 30, 2002 1:56 pm    Post subject: Reply with quote

Hi,

I have applied the patch as described above. But when I try booting with this kernel I get the following message. (Same as without xfs)

Kernel panic: VFS: Unable to mount root fs on 03:03

Any hints?
Back to top
View user's profile Send private message
corporate_gadfly
n00b
n00b


Joined: 21 Sep 2002
Posts: 29

PostPosted: Mon Sep 30, 2002 6:52 pm    Post subject: Re: Gentoo-sources-r9 with XFS Reply with quote

Hi Jasper,

Just for completeness, I think the file fs/namei.c doesn't seem to be patched properly (disclaimer - I haven't compiled the kernel yet). My namei.c.rej had the following lines which I didn't quite see in your file.
Code:
***************
*** 1450,1457 ****
        dentry = lookup_create(&nd, 1);
        error = PTR_ERR(dentry);
        if (!IS_ERR(dentry)) {
-           error = vfs_mkdir(nd.dentry->d_inode, dentry,
-                     mode & ~current->fs->umask);
            dput(dentry);
        }
        up(&nd.dentry->d_inode->i_sem);
--- 1452,1460 ----
        dentry = lookup_create(&nd, 1);
        error = PTR_ERR(dentry);
        if (!IS_ERR(dentry)) {
+           if (!IS_POSIXACL(nd.dentry->d_inode))
+               mode &= ~current->fs->umask;
+           error = vfs_mkdir(nd.dentry->d_inode, dentry, mode);
            dput(dentry);
        }
        up(&nd.dentry->d_inode->i_sem);


FWIW, here is my diff -Naur output for namei.c
Code:

--- namei.c~    2002-09-30 14:19:38.000000000 -0400
+++ namei.c     2002-09-30 14:43:32.000000000 -0400
@@ -1114,8 +1114,9 @@
                        goto exit_dput;
                }

-               error = vfs_create(dir->d_inode, dentry,
-                                  mode & ~current->fs->umask);
+               if (!IS_POSIXACL(dir->d_inode))
+                       mode &= ~current->fs->umask;
+               error = vfs_create(dir->d_inode, dentry, mode);
                up(&dir->d_inode->i_sem);
                dput(nd->dentry);
                nd->dentry = dentry;
@@ -1381,7 +1382,8 @@
        dentry = lookup_create(&nd, 0);
        error = PTR_ERR(dentry);

-       mode &= ~current->fs->umask;
+       if (!IS_POSIXACL(nd.dentry->d_inode))
+               mode &= ~current->fs->umask;
        if (!IS_ERR(dentry)) {
        if (grsec_enable_chroot_mknod && !S_ISFIFO(mode) && proc_is_chrooted(current)) {
                switch (mode & S_IFMT) {
@@ -1498,9 +1500,11 @@
                                error = -EACCES;

                        }
-                       if(!error)
-                               error = vfs_mkdir(nd.dentry->d_inode, dentry,
-                                         mode & ~current->fs->umask);
+                       if(!error) {
+                               if (!IS_POSIXACL(nd.dentry->d_inode))
+                                       mode &= ~current->fs->umask;
+                               error = vfs_mkdir(nd.dentry->d_inode, dentry, mode);
+                       }
                        if(!error) {
                                struct nameidata temp =
                                {


Again to reiterate, I have yet to compile my kernel and I don't even use ACL (not that I know of), so take it for what its worth. I don't know if I made the correct choice or not near the vfs_mkdir function call.
Back to top
View user's profile Send private message
corporate_gadfly
n00b
n00b


Joined: 21 Sep 2002
Posts: 29

PostPosted: Mon Sep 30, 2002 8:17 pm    Post subject: Re: Gentoo-sources-r9 with XFS Reply with quote

corporate_gadfly wrote:

Again to reiterate, I have yet to compile my kernel and I don't even use ACL (not that I know of), so take it for what its worth. I don't know if I made the correct choice or not near the vfs_mkdir function call.


Thanks Jasper,

Just made the modifications and compiled the kernel and rebooted into the new kernel. Keeping my fingers crossed as things seem to be holding up pretty well, so far.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware 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