xfs
[Top] [All Lists]

Re: 2.4.21-20.EL undefined references in modules

To: stas@xxxxxxxxxxx
Subject: Re: 2.4.21-20.EL undefined references in modules
From: Eric Sandeen <sandeen@xxxxxxx>
Date: Thu, 07 Oct 2004 12:40:03 -0500
Cc: linux-xfs@xxxxxxxxxxx
In-reply-to: <1097141989.2726.168.camel@whirl.lab7.lan>
References: <1097141989.2726.168.camel@whirl.lab7.lan>
Sender: linux-xfs-bounce@xxxxxxxxxxx
User-agent: Mozilla Thunderbird 0.7.3 (X11/20040803)
Stas -

Please take a look at the various kernel patches in
ftp://oss.sgi.com/projects/xfs/testing/release-1.3.3-pre2/kernels/RHEL/SRPMS/kernel-2.4.21-15.EL.sgi3.src.rpm

-that might offer a clue.

You're right that the #ifdef is handling a backport; in our kernels we put this alongside KERNEL_HAS_O_DIRECT in linux/include/linux/fs.h:

--- linux/include/linux/fs.h.orig 2003-12-30 14:47:13.000000000 -0600
+++ linux/include/linux/fs.h 2003-12-30 14:47:45.000000000 -0600
@@ -418,6 +418,7 @@
int (*flushpage) (struct page *, unsigned long);
int (*releasepage) (struct page *, int);
#define KERNEL_HAS_O_DIRECT /* this is for modules out of the kernel */
+#define KERNEL_HAS_NEW_O_DIRECT /* O_DIRECT rework from 2.4.22 */
int (*direct_IO)(int, struct file *, struct kiobuf *, unsigned long, int);
int (*direct_sector_IO)(int, struct file *, struct kiobuf *, unsigned long, int, int, int);
void (*removepage)(struct page *); /* called when page gets removed from the inode */



Stas Nikiforov wrote:
Hi,
I've tried to compile xfs modules for
RHEL 2.4.21-20.ELsmp kernel and got some errors.

Compilation was successful, but I'm unable to insert
modules due to unresolved dependencies.

These are:

I think that the problem is in wrong definition
of kernel version in file linux/xfs_lrw.c
lines 325-335. This code below suppose that
the kernel version is less then 2.4.22, but
some features were backported by RedHat to 2.4.21-20.


Is it possible to define somewhere
KERNEL_HAS_NEW_O_DIRECT and safely recompile xfs modules
for updated RHEL kernel?

Best regards
Stas.

#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,22) || defined
(KERNEL_HAS_NEW_O_DIRECT)
        if (unlikely(ioflags & IO_ISDIRECT)) {
                ret = do_generic_direct_read(file, buf, size, offset);
                UPDATE_ATIME(file->f_dentry->d_inode);
        } else {
                ret = generic_file_read(file, buf, size, offset);
        }
#else
        ret = generic_file_read(file, buf, size, offset);
#endif



<Prev in Thread] Current Thread [Next in Thread>