[Pvfs2-users] compiling kernel module of pvfs2.7.1pre and RHEL4 kernel 2.6.9-55 - red hat

Phil Carns carns at mcs.anl.gov
Wed Jan 30 10:02:07 EST 2008


Michael Will wrote:
> modprobe pvfs2 fails since class_device_destroy is not defined
> FATAL: Error inserting pvfs2 
> (/lib/modules/2.6.9-55.ELsmp/kernel/fs/pvfs2/pvfs2.ko): Unknown symbol 
> in module, or unknown parameter (see dmesg)
> 
> Note that doing a ./configure --with-kernel=/usr/src/kernels/linux-2.6/ 
> --disable-kernel-aio --disable-aio-threaded-callbacks does not change that,
> the issues is that pvfs2-config.h defines #define 
> HAVE_KERNEL_DEVICE_CLASSES 1 but since redhats 2.6.9-55 kernel does not 
> have that, I have to undefine
> it. After recompiling without it, the only warnings I see seem to be:

Here is a little more information on this problem.

- PVFS's kernel.m4 is checking for "class_create()".

- PVFS's devpvfs2-req.c file is using "class_device_destroy()"

- on the stock kernel.org kernel, both of these functions appeared first 
appeared at the same time in 2.6.13, so our kernel.m4 check would seem 
to be making a reasonable assumption: 
http://lxr.linux.no/linux+v2.6.13/drivers/base/class.c

- in RedHat's 2.6.9 kernel, they have a patch that introduce 
"class_create()", but _not_ "class_device_destroy()" (patch attached)

So the issue here seems to be that RedHat has backported some of this 
stuff piecemeal into their 2.6.9 kernel, so we can't trust that all of 
the new device class stuff is there based just on the existence of 
"class_create()".

Some of the other RedHat 2.6.9 device driver patches (too big to attach) 
do things along these lines:

+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,12)
+       class_device_unregister(class_dev);
+#else
+       class_device_destroy(ipath_class, dev);
+#endif

I'm not sure what the proper thing is for our code to do.  If these 
functions aren't critical maybe we just undefine 
HAVE_KERNEL_DEVICE_CLASSES when class_device_destroy() is missing, but I 
have a feeling those fns are there for a reason :)

-Phil
-------------- next part --------------
A non-text attachment was scrubbed...
Name: linux-2.6.9-i2c.patch.gz
Type: application/x-gzip
Size: 24619 bytes
Desc: not available
Url : http://www.beowulf-underground.org/pipermail/pvfs2-users/attachments/20080130/76c69d4f/linux-2.6.9-i2c.patch-0001.bin


More information about the Pvfs2-users mailing list