#
# LC_FUNC_DEV_SET_RDONLY
#
-# check for the old-style dev_set_rdonly which took an extra "devno" param
-# and can only set a single device to discard writes at one time
+# check whether dev_set_rdonly is exported. This is needed until we
+# have another mechanism to fence IO from the underlying device.
#
AC_DEFUN([LC_FUNC_DEV_SET_RDONLY],
-[AC_MSG_CHECKING([if kernel has new dev_set_rdonly])
-LB_LINUX_TRY_COMPILE([
- #include <linux/fs.h>
- #include <linux/blkdev.h>
+[LB_CHECK_SYMBOL_EXPORT([dev_set_rdonly],
+[block/ll_rw_block.c,block/blk-core.c],[
+ AC_DEFINE(HAVE_DEV_SET_RDONLY, 1, [kernel exports dev_set_rdonly])
],[
- #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_ERROR([no, Linux kernel source needs to be patches by lustre
-kernel patches from Lustre version 1.4.3 or above.])
+ AC_MSG_WARN([kernel missing dev_set_rdonly patch for testing])
])
])
])
#
-# LC_FUNC_GRAB_CACHE_PAGE_NOWAIT_GFP
-#
-# Check for our patched grab_cache_page_nowait_gfp() function
-# after 2.6.29 we can emulate this using add_to_page_cache_lru()
-#
-AC_DEFUN([LC_FUNC_GRAB_CACHE_PAGE_NOWAIT_GFP],
-[LB_CHECK_SYMBOL_EXPORT([grab_cache_page_nowait_gfp],
-[mm/filemap.c],[
- AC_DEFINE(HAVE_GRAB_CACHE_PAGE_NOWAIT_GFP, 1,
- [kernel exports grab_cache_page_nowait_gfp])
- ],
- [LB_CHECK_SYMBOL_EXPORT([add_to_page_cache_lru],
- [mm/filemap.c],[
- AC_DEFINE(HAVE_ADD_TO_PAGE_CACHE_LRU, 1,
- [kernel exports add_to_page_cache_lru])
- ],[
- ])
- ])
-])
-
-#
#
# between 2.6.5 - 2.6.22 filemap_populate is exported in some kernels
#
])
])
-# 2.6.25
-
-# 2.6.25 change define to inline
-AC_DEFUN([LC_MAPPING_CAP_WRITEBACK_DIRTY],
-[AC_MSG_CHECKING([if kernel have mapping_cap_writeback_dirty])
-LB_LINUX_TRY_COMPILE([
- #include <linux/backing-dev.h>
-],[
- #ifndef mapping_cap_writeback_dirty
- mapping_cap_writeback_dirty(NULL);
- #endif
-],[
- AC_MSG_RESULT([yes])
- AC_DEFINE(HAVE_MAPPING_CAP_WRITEBACK_DIRTY, 1,
- [kernel have mapping_cap_writeback_dirty])
-],[
- AC_MSG_RESULT([no])
-])
-])
-
# 2.6.26
# 2.6.26 isn't export set_fs_pwd and change paramter in fs struct
])
])
-# sles10 sp2 need 5 parameter for vfs_symlink
-AC_DEFUN([LC_VFS_SYMLINK_5ARGS],
-[AC_MSG_CHECKING([vfs_symlink need 5 parameter])
-LB_LINUX_TRY_COMPILE([
- #include <linux/fs.h>
-],[
- struct inode *dir = NULL;
- struct dentry *dentry = NULL;
- struct vfsmount *mnt = NULL;
- const char * path = NULL;
- vfs_symlink(dir, dentry, mnt, path, 0);
-],[
- AC_DEFINE(HAVE_VFS_SYMLINK_5ARGS, 1,
- [vfs_symlink need 5 parameteres])
- AC_MSG_RESULT([yes])
-],[
- AC_MSG_RESULT([no])
-])
-])
-
# 2.6.27 sles11 has sb_any_quota_active
AC_DEFUN([LC_SB_ANY_QUOTA_ACTIVE],
[AC_MSG_CHECKING([Kernel has sb_any_quota_active])
# LC_D_OBTAIN_ALIAS
# starting from 2.6.28 kernel replaces d_alloc_anon() with
# d_obtain_alias() for getting anonymous dentries
+# RHEL5(2.6.18) has d_obtain_alias but SLES11SP0(2.6.27) not
#
AC_DEFUN([LC_D_OBTAIN_ALIAS],
[AC_MSG_CHECKING([d_obtain_alias exist in kernel])
])
#
+# LC_EXPORT_GENERIC_ERROR_REMOVE_PAGE
+#
+AC_DEFUN([LC_EXPORT_GENERIC_ERROR_REMOVE_PAGE],
+ [LB_CHECK_SYMBOL_EXPORT(
+ [generic_error_remove_page],
+ [mm/truncate.c],
+ [AC_DEFINE(HAS_GENERIC_ERROR_REMOVE_PAGE, 1,
+ [kernel export generic_error_remove_page])],
+ [])
+ ]
+)
+
+#
# 2.6.36 fs_struct.lock use spinlock instead of rwlock.
#
AC_DEFUN([LC_FS_STRUCT_RWLOCK],
LC_EXPORT___D_REHASH
LC_EXPORT_NODE_TO_CPUMASK
- LC_FUNC_GRAB_CACHE_PAGE_NOWAIT_GFP
LC_FILEMAP_POPULATE
LC_BIT_SPINLOCK_H
# 2.6.12
LC_RW_TREE_LOCK
- LC_EXPORT_SYNCHRONIZE_RCU
# 2.6.15
LC_INODE_I_MUTEX
LC_PROCFS_DELETED
LC_EXPORT_BDI_INIT
- #2.6.25
- LC_MAPPING_CAP_WRITEBACK_DIRTY
-
# 2.6.26
LC_FS_STRUCT_USE_PATH
# 2.6.27.15-2 sles11
LC_BI_HW_SEGMENTS
LC_HAVE_QUOTAIO_H
- LC_VFS_SYMLINK_5ARGS
LC_BDI_NAME
LC_SB_ANY_QUOTA_ACTIVE
LC_SB_HAS_QUOTA_ACTIVE
LC_BLK_QUEUE_MAX_SEGMENTS
LC_SET_CPUS_ALLOWED
LC_CACHE_UPCALL
+ LC_EXPORT_GENERIC_ERROR_REMOVE_PAGE
# 2.6.35
LC_FILE_FSYNC
fi
])
+# RHEL5(2.6.18) has tux_info
AC_DEFUN([LC_TASK_CLENV_TUX_INFO],
[AC_MSG_CHECKING([tux_info])
LB_LINUX_TRY_COMPILE([
lustre/include/Makefile
lustre/include/lustre_ver.h
lustre/include/linux/Makefile
+lustre/include/darwin/Makefile
lustre/include/lustre/Makefile
lustre/kernel_patches/targets/2.6-rhel6.target
lustre/kernel_patches/targets/2.6-rhel5.target