[Pvfs2-cvs] commit by pcarns in pvfs2-1/maint/config: kernel.m4
CVS commit program
cvs at parl.clemson.edu
Wed Jan 27 15:46:28 EST 2010
Update of /projects/cvsroot/pvfs2-1/maint/config
In directory parlweb1:/tmp/cvs-serv21660/maint/config
Modified Files:
kernel.m4
Log Message:
fixes for 2.6.32:
- configure test for backing_dev_info.name field
- configure test for bdi_init() (first appeared several versions ago)
- trust kernel to handle dirty inode list automatically on unmount
Index: kernel.m4
===================================================================
RCS file: /projects/cvsroot/pvfs2-1/maint/config/kernel.m4,v
diff -p -u -r1.74 -r1.75
--- kernel.m4 7 Jan 2010 20:38:17 -0000 1.74
+++ kernel.m4 27 Jan 2010 20:46:28 -0000 1.75
@@ -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