Whamcloud - gitweb
Branch b1_6
[fs/lustre-release.git] / lustre / autoconf / lustre-core.m4
index 0da0ccc..cce0a4b 100644 (file)
@@ -340,8 +340,12 @@ if test x$enable_ldiskfs = xyes ; then
 
        AC_DEFINE(CONFIG_LDISKFS_FS_MODULE, 1, [build ldiskfs as a module])
        AC_DEFINE(CONFIG_LDISKFS_FS_XATTR, 1, [enable extended attributes for ldiskfs])
-       AC_DEFINE(CONFIG_LDISKFS_FS_POSIX_ACL, 1, [enable posix acls])
-       AC_DEFINE(CONFIG_LDISKFS_FS_SECURITY, 1, [enable fs security])
+       AC_DEFINE(CONFIG_LDISKFS_FS_POSIX_ACL, 1, [enable posix acls for ldiskfs])
+       AC_DEFINE(CONFIG_LDISKFS_FS_SECURITY, 1, [enable fs security for ldiskfs])
+
+       AC_DEFINE(CONFIG_LDISKFS2_FS_XATTR, 1, [enable extended attributes for ldiskfs2])
+       AC_DEFINE(CONFIG_LDISKFS2_FS_POSIX_ACL, 1, [enable posix acls for ldiskfs2])
+       AC_DEFINE(CONFIG_LDISKFS2_FS_SECURITY, 1, [enable fs security for ldiskfs2])
 fi
 
 AC_MSG_CHECKING([which backing filesystem to use])
@@ -395,6 +399,23 @@ fi
 ])
 
 #
+# LC_CONFIG_HEALTH_CHECK_WRITE
+#
+# Turn on the actual write to the disk
+#
+AC_DEFUN([LC_CONFIG_HEALTH_CHECK_WRITE],
+[AC_MSG_CHECKING([whether to enable a write with the health check])
+AC_ARG_ENABLE([health-write],
+        AC_HELP_STRING([--enable-health-write],
+                        [enable disk writes when doing health check]),
+        [],[enable_health_write='no'])
+AC_MSG_RESULT([$enable_health_write])
+if test x$enable_health_write == xyes ; then
+  AC_DEFINE(USE_HEALTH_CHECK_WRITE, 1, Write when Checking Health)
+fi
+])
+
+#
 # LC_CONFIG_LIBLUSTRE_RECOVERY
 #
 AC_DEFUN([LC_CONFIG_LIBLUSTRE_RECOVERY],
@@ -448,6 +469,23 @@ LB_LINUX_TRY_COMPILE([
 ])
 ])
 
+#
+# LC_READLINK_SSIZE_T
+#
+AC_DEFUN([LC_READLINK_SSIZE_T],
+[AC_MSG_CHECKING([if readlink returns ssize_t])
+AC_TRY_COMPILE([
+       #include <unistd.h>
+],[
+       ssize_t readlink(const char *, char *, size_t);
+],[
+       AC_MSG_RESULT([yes])
+       AC_DEFINE(HAVE_POSIX_1003_READLINK, 1, [readlink returns ssize_t])
+],[
+       AC_MSG_RESULT([no])
+])
+])
+
 AC_DEFUN([LC_FUNC_PAGE_MAPPED],
 [AC_MSG_CHECKING([if kernel offers page_mapped])
 LB_LINUX_TRY_COMPILE([
@@ -483,7 +521,7 @@ LB_LINUX_TRY_COMPILE([
         #include <asm/page.h>
         #include <linux/mm.h>
 ],[
-       filemap_populate(NULL, 0, 0, __pgprot(0), 0, 0);
+       filemap_populate(NULL, 0, 0, __pgprot(0), 0, 0);
 ],[
         AC_MSG_RESULT([yes])
         AC_DEFINE(HAVE_FILEMAP_POPULATE, 1, [Kernel exports filemap_populate])
@@ -576,6 +614,20 @@ $1
 ],[
 AC_MSG_RESULT([no])
 ])
+
+#
+# LC_EXPORT___IGET
+# starting from 2.6.19 linux kernel exports __iget()
+#
+AC_DEFUN([LC_EXPORT___IGET],
+[AC_MSG_CHECKING([if kernel exports __iget])
+       if grep -q "EXPORT_SYMBOL(__iget)" $LINUX/fs/inode.c 2>/dev/null ; then
+               AC_DEFINE(HAVE_EXPORT___IGET, 1, [kernel exports __iget])
+               AC_MSG_RESULT([yes])
+       else
+               AC_MSG_RESULT([no])
+       fi
+])
 ])
 
 AC_DEFUN([LC_LUSTRE_VERSION_H],
@@ -820,7 +872,7 @@ LB_LINUX_TRY_COMPILE([
 
 #
 # LC_VFS_KERN_MOUNT
-# starting from 2.6.18 kernel don`t export do_kern_mount
+# starting from 2.6.18 kernel doesn't export do_kern_mount
 # and want to use vfs_kern_mount instead.
 #
 AC_DEFUN([LC_VFS_KERN_MOUNT],
@@ -889,7 +941,7 @@ EXTRA_KCFLAGS="$tmp_flags"
 ])
 
 # 2.6.19 API changes
-# inode don`t have i_blksize field
+# inode doesn't have i_blksize field
 AC_DEFUN([LC_INODE_BLKSIZE],
 [AC_MSG_CHECKING([inode has i_blksize field])
 LB_LINUX_TRY_COMPILE([
@@ -971,7 +1023,7 @@ LB_LINUX_TRY_COMPILE([
 ])
 
 # LC_NR_PAGECACHE
-# 2.6.18 don`t export nr_pagecahe
+# 2.6.18 doesn't export nr_pagecahe
 AC_DEFUN([LC_NR_PAGECACHE],
 [AC_MSG_CHECKING([kernel export nr_pagecache])
 LB_LINUX_TRY_COMPILE([
@@ -987,6 +1039,26 @@ LB_LINUX_TRY_COMPILE([
 ])
 ])
 
+# LC_WB_RANGE_START
+# 2.6.20 rename struct writeback fields
+AC_DEFUN([LC_WB_RANGE_START],
+[AC_MSG_CHECKING([kernel has range_start in struct writeback_control])
+LB_LINUX_TRY_COMPILE([
+        #include <linux/fs.h>
+        #include <linux/sched.h>
+        #include <linux/writeback.h>
+],[
+        struct writeback_control wb;
+
+        wb.range_start = 0;
+],[
+        AC_MSG_RESULT(yes)
+        AC_DEFINE(HAVE_WB_RANGE_START, 1,
+                  [writeback control has range_start field])
+],[
+        AC_MSG_RESULT(NO)
+])
+])
 
 #
 # LC_PROG_LINUX
@@ -1001,6 +1073,7 @@ fi
 LC_CONFIG_PINGER
 LC_CONFIG_LIBLUSTRE_RECOVERY
 LC_CONFIG_QUOTA
+LC_CONFIG_HEALTH_CHECK_WRITE
 
 LC_TASK_PPTR
 
@@ -1024,6 +1097,7 @@ LC_BIT_SPINLOCK_H
 LC_XATTR_ACL
 LC_STRUCT_INTENT_FILE
 LC_POSIX_ACL_XATTR_H
+LC_EXPORT___IGET
 LC_FUNC_SET_FS_PWD
 LC_FUNC_MS_FLOCK_LOCK
 LC_FUNC_HAVE_CAN_SLEEP_ARG
@@ -1043,6 +1117,7 @@ LC_STATFS_DENTRY_PARAM
 LC_VFS_KERN_MOUNT
 LC_INVALIDATEPAGE_RETURN_INT
 LC_UMOUNTBEGIN_HAS_VFSMOUNT
+LC_WB_RANGE_START
 
 # 2.6.19
 LC_INODE_BLKSIZE
@@ -1154,9 +1229,8 @@ LB_LINUX_TRY_COMPILE([
 AC_DEFUN([LC_COOKIE_FOLLOW_LINK],
 [AC_MSG_CHECKING([if inode_operations->follow_link returns a cookie])
 LB_LINUX_TRY_COMPILE([
-       #include <linux/namei.h>
         #include <linux/fs.h>
-
+        #include <linux/namei.h>
 ],[
         struct dentry dentry;
         struct nameidata nd;
@@ -1195,6 +1269,9 @@ AC_CHECK_HEADERS([linux/types.h sys/types.h linux/unistd.h unistd.h])
 AC_CHECK_HEADERS([netinet/in.h arpa/inet.h catamount/data.h])
 AC_CHECK_FUNCS([inet_ntoa])
 
+# libsysio/src/readlink.c
+LC_READLINK_SSIZE_T
+
 # utils/llverfs.c
 AC_CHECK_HEADERS([ext2fs/ext2fs.h])
 
@@ -1257,6 +1334,8 @@ lustre/kernel_patches/targets/suse-2.4.21-2.target
 lustre/kernel_patches/targets/sles-2.4.target
 lustre/ldiskfs/Makefile
 lustre/ldiskfs/autoMakefile
+lustre/ldiskfs2/Makefile
+lustre/ldiskfs2/autoMakefile
 lustre/ldlm/Makefile
 lustre/liblustre/Makefile
 lustre/liblustre/tests/Makefile