[Pvfs2-cvs] commit by pcarns in pvfs2-1/maint/config: kernel.m4

CVS commit program cvs at parl.clemson.edu
Wed Jan 27 15:49:06 EST 2010


Update of /projects/cvsroot/pvfs2-1/maint/config
In directory parlweb1:/tmp/cvs-serv22095/maint/config

Modified Files:
      Tag: pvfs-2-8-branch
	kernel.m4 
Log Message:
merge 2.6.32 kernel updates from trunk to pvfs-2-8-branch


Index: kernel.m4
===================================================================
RCS file: /projects/cvsroot/pvfs2-1/maint/config/kernel.m4,v
diff -p -u -r1.65.2.9 -r1.65.2.10
--- kernel.m4	7 Jan 2010 20:39:07 -0000	1.65.2.9
+++ kernel.m4	27 Jan 2010 20:49:06 -0000	1.65.2.10
@@ -1249,6 +1249,40 @@ AC_DEFUN([AX_KERNEL_FEATURES],
         )
         CFLAGS=$tmp_cflags
 
+        dnl 2.6.32 added a mandatory name field to the bdi structure
+        AC_MSG_CHECKING(if kernel backing_dev_info struct has a name field)
+	AC_TRY_COMPILE([
+		#define __KERNEL__
+		#include <linux/fs.h>
+		#include <linux/backing-dev.h>
+	], [
+                struct backing_dev_info foo = 
+                {
+                    .name = "foo"
+                };
+	],
+	AC_MSG_RESULT(yes)
+	AC_DEFINE(HAVE_BACKING_DEV_INFO_NAME, 1, [Define if kernel backing_dev_info struct has a name field]),
+	AC_MSG_RESULT(no)
+	)
+
+        dnl some 2.6 kernels have functions to explicitly initialize bdi structs
+        tmp_cflags=$CFLAGS
+        CFLAGS="$CFLAGS -Werror"
+        AC_MSG_CHECKING(for bdi_init)
+        AC_TRY_COMPILE([
+                #define __KERNEL__
+		#include <linux/fs.h>
+		#include <linux/backing-dev.h>
+        ], [
+                int ret = bdi_init(NULL);
+        ],
+        AC_MSG_RESULT(yes)
+        AC_DEFINE(HAVE_BDI_INIT, 1, [Define if bdi_init function is present]),
+        AC_MSG_RESULT(no)
+        )
+        CFLAGS=$tmp_cflags
+
 
 	CFLAGS=$oldcflags
 



More information about the Pvfs2-cvs mailing list