[Pvfs2-cvs] commit by vilayann in pvfs2-1/maint/config: kernel.m4
CVS commit program
cvs at parl.clemson.edu
Tue Aug 8 18:35:31 EDT 2006
Update of /projects/cvsroot/pvfs2-1/maint/config
In directory parlweb1:/tmp/cvs-serv5282/maint/config
Modified Files:
kernel.m4
Log Message:
Fixes for the upcoming 2.6.18 kernel. pointed by RobL.
->get_sb() now takes a vfsmount structure and returns an integer instead of the sb encoded
as an error. We can now reference sb by peeking into the vfsmount structure.
->statfs() now takes struct dentry instead of a struct sb*. We can of course deref dentry->d_sb
to get to the sb.
configure changes to support the argument changes.
sigh.. at this rate it might be better to use fuse or merge pvfs2 in kernel :)
Index: kernel.m4
===================================================================
RCS file: /projects/cvsroot/pvfs2-1/maint/config/kernel.m4,v
diff -p -u -r1.11 -r1.12
--- kernel.m4 1 Aug 2006 23:40:49 -0000 1.11
+++ kernel.m4 8 Aug 2006 22:35:31 -0000 1.12
@@ -134,6 +134,43 @@ AC_DEFUN([AX_KERNEL_FEATURES],
)
fi
+ tmp_cflags=$CFLAGS
+ dnl if this test passes, there is a struct dentry* argument
+ CFLAGS="$CFLAGS -Werror"
+ AC_MSG_CHECKING(if statfs callbacks' arguments in kernel has struct dentry argument)
+ dnl if this test passes, the kernel has it
+ dnl if this test fails, the kernel does not have it
+ AC_TRY_COMPILE([
+ #define __KERNEL__
+ #include <linux/fs.h>
+ extern int pvfs_statfs(struct dentry *, struct kstatfs *);
+ static struct super_operations s_op = {
+ .statfs = pvfs_statfs,
+ };
+ ], [],
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_DENTRY_STATFS_SOP, 1, Define if statfs callback has struct dentry argument),
+ AC_MSG_RESULT(no)
+ )
+
+ AC_MSG_CHECKING(if get_sb callbacks' in kernel has struct vfsmount argument)
+ dnl if this test passes, the kernel has it
+ dnl if this test fails, the kernel does not have it
+ AC_TRY_COMPILE([
+ #define __KERNEL__
+ #include <linux/fs.h>
+ #include <linux/mount.h>
+ extern int pvfs_get_sb(struct file_system_type *fst, int flags, const char *devname, void *data, struct vfsmount *);
+ static struct file_system_type fst = {
+ .get_sb = pvfs_get_sb,
+ };
+ ], [],
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_VFSMOUNT_GETSB, 1, Define if get_sb callback has struct vfsmount argument),
+ AC_MSG_RESULT(no)
+ )
+ CFLAGS=$tmp_cflags
+
AC_MSG_CHECKING(for xattr support in kernel)
dnl if this test passes, the kernel has it
dnl if this test fails, the kernel does not have it
@@ -213,6 +250,10 @@ AC_DEFUN([AX_KERNEL_FEATURES],
#endif
] )
+ AC_CHECK_HEADERS([linux/mount.h], [], [],
+ [#define __KERNEL__
+ #include <linux/mount.h>
+ ] )
AC_CHECK_HEADERS([linux/ioctl32.h], [], [],
[#define __KERNEL__
#include <linux/ioctl32.h>
More information about the Pvfs2-cvs
mailing list