[Pvfs2-developers] pvfs2 2.6.3 fixes

Marc Aurele La France tsi at ualberta.ca
Fri Apr 27 11:53:39 EDT 2007


On Fri, 27 Apr 2007, slang wrote:

> Hi Marc,

> Thanks for the fixes!  I've made some comments inline.

> On Apr 27, 2007, at 9:01 AM, Marc Aurele La France wrote:

>> I recently finished an exercise of building PVFS2 from source for a few
>> different kernels.  The following are changes I ended up with.  A copy
>> of this note is included as a compressed attachment should it be
>> mangled in transit.

>> 2) As currently coded, the check for whether or not the kernel declares a
>>   struct kmem_cache, can never fail.  This replaces that check with
>>   one that works for older kernels that don't declare a struct
>>   kmem_cache.

>> diff -aNpru pvfs-2.6.3/maint/config/kernel.m4 devel/maint/config/kernel.m4
>> --- pvfs-2.6.3/maint/config/kernel.m4	2007-04-09 08:54:37.000000000 -0600
>> +++ devel/maint/config/kernel.m4	2007-04-26 08:30:29.000000000 -0600
>> @@ -114,15 +114,12 @@ AC_DEFUN([AX_KERNEL_FEATURES],
>>
>> 	dnl 2.6.20 deprecated kmem_cache_t
>> 	AC_MSG_CHECKING(for struct kmem_cache in kernel)
>> -	AC_TRY_COMPILE([
>> -		#define __KERNEL__
>> -		#include <linux/slab.h>
>> -		static struct kmem_cache;
>> -	], [],
>> +	if test "`grep 'struct kmem_cache ' $lk_src/include/linux/slab.h`"; 
>> then
>> 		AC_MSG_RESULT(yes)
>> -		AC_DEFINE(HAVE_STRUCT_KMEM_CACHE, 1, Define if struct 
>> kmem_cache is defined in kernel),
>> +		AC_DEFINE(HAVE_STRUCT_KMEM_CACHE, 1, Define if struct 
>> kmem_cache is defined in kernel)
>> +	else
>> 		AC_MSG_RESULT(no)
>> -	)
>> +	fi

> I'd prefer to fix the check for kmem_cache in TRY_COMPILE, rather than grep. 
> We should be able to add some bits to the second parameter to TRY_COMPILE. 
> Probably something like:

> AC_TRY_COMPILE([
> 		#define __KERNEL__
> 		#include <linux/slab.h>
> 		static struct kmem_cache;
> 	],
> 	[
> 		struct kmem_cache *c;
> 		c = kmem_cache_create(NULL, 0, 0, 0, NULL, NULL);
> 	],
> 	...

This will also always succeed (with warnings).  "static struct kmem_cache" 
will declare "struct kmem_cache" even if <linux/slab.h> doesn't.

>> ==

>> 3) statecomp should unlink its output file before attempting to
>>   overwrite it.  This allows for building PVFS2 in a shadow tree and
>>   leave the base tree it points to untouched.

> Seems fine.  I do out of tree builds all the time though, so I'm curious how 
> this broke for you.  Are you creating symlinks of the pvfs tree or 
> something?

Yes, that's what shadow trees are.  See `lndir`.  I use them to facilitate 
the generation of patches.  To do that, I must prevent any modification of 
the base tree.

Marc.

+----------------------------------+----------------------------------+
|  Marc Aurele La France           |  work:   1-780-492-9310          |
|  Academic Information and        |  fax:    1-780-492-1729          |
|    Communications Technologies   |  email:  tsi at ualberta.ca         |
|  352 General Services Building   +----------------------------------+
|  University of Alberta           |                                  |
|  Edmonton, Alberta               |    Standard disclaimers apply    |
|  T6G 2H1                         |                                  |
|  CANADA                          |                                  |
+----------------------------------+----------------------------------+
XFree86 developer and VP.  ATI driver and X server internals.


More information about the Pvfs2-developers mailing list