# 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.])
+])
])
#
])
])
+#
+# 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([
])
])
+# 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_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