# and can only set a single device to discard writes at one time
#
AC_DEFUN([LC_FUNC_DEV_SET_RDONLY],
-[AC_MSG_CHECKING([if kernel has old single-device dev_set_rdonly])
-HAVE_OLD_DSR="`grep -c -s 'dev_set_rdonly.*no_write' $LINUX/drivers/block/ll_rw_blk.c`"
-if test x$HAVE_OLD_DSR != "x1" ; then
- HAVE_OLD_DSR="`grep -c -s 'dev_set_rdonly.*no_write' $LINUX/drivers/block/blkpg.c`"
-fi
-if test x$HAVE_OLD_DSR = "x1" ; then
- AC_DEFINE(HAVE_OLD_DEV_SET_RDONLY, 1,
- [kernel has old single-device dev_set_rdonly])
- AC_MSG_RESULT(yes)
-else
- AC_MSG_RESULT(no)
-fi
+[AC_MSG_CHECKING([if kernel has new dev_set_rdonly])
+LB_LINUX_TRY_COMPILE([
+ #include <linux/fs.h>
+],[
+ #ifndef HAVE_CLEAR_RDONLY_ON_PUT
+ #error needs to be patched by lustre kernel patches from Lustre version 1.4.3 or above.
+ #endif
+],[
+ AC_MSG_RESULT([yes])
+ AC_DEFINE(HAVE_DEV_SET_RDONLY, 1, [kernel has new dev_set_rdonly])
+],[
+ AC_MSG_RESULT([no, Linux kernel source needs to be patches by lustre
+kernel patches from Lustre version 1.4.3 or above.])
+])
])
#
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])
])
#
+# 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],
])
])
+#
+# 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([
#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])
],[
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],
#
# 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],
])
# 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([
])
# 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([
])
])
+# 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
LC_CONFIG_PINGER
LC_CONFIG_LIBLUSTRE_RECOVERY
LC_CONFIG_QUOTA
+LC_CONFIG_HEALTH_CHECK_WRITE
LC_TASK_PPTR
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
LC_VFS_KERN_MOUNT
LC_INVALIDATEPAGE_RETURN_INT
LC_UMOUNTBEGIN_HAS_VFSMOUNT
+LC_WB_RANGE_START
# 2.6.19
LC_INODE_BLKSIZE
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;
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])
lustre/kernel_patches/targets/2.6-rhel4.target
lustre/kernel_patches/targets/2.6-fc5.target
lustre/kernel_patches/targets/2.6-patchless.target
+lustre/kernel_patches/targets/2.6-sles10.target
lustre/kernel_patches/targets/hp_pnnl-2.4.target
lustre/kernel_patches/targets/rh-2.4.target
lustre/kernel_patches/targets/rhel-2.4.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