X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Fautoconf%2Flustre-core.m4;h=061d45768fed6f3eddc7fe079c3210738ee85523;hb=c65b502fe9feda61c7ad7137f5022c654c6ba501;hp=e167ac01c3747f906f3441b2bc72d6b380740801;hpb=42324a4b74952979bbbcf454f882b776661f8e3a;p=fs%2Flustre-release.git diff --git a/lustre/autoconf/lustre-core.m4 b/lustre/autoconf/lustre-core.m4 index e167ac0..061d457 100644 --- a/lustre/autoconf/lustre-core.m4 +++ b/lustre/autoconf/lustre-core.m4 @@ -104,24 +104,15 @@ AC_DEFUN([LC_LUSTRE_VERSION_H], # # 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 - #include +[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]) ]) ]) @@ -307,27 +298,6 @@ AC_DEFUN([LC_EXPORT_NODE_TO_CPUMASK], ]) # -# 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 # @@ -1469,26 +1439,6 @@ AC_DEFUN([LC_EXPORT_BDI_INIT], ]) ]) -# 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 -],[ - #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 @@ -1697,26 +1647,6 @@ AC_DEFUN([LC_HAVE_QUOTAIO_H], ]) ]) -# 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 -],[ - 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]) @@ -1974,6 +1904,7 @@ AC_DEFUN([LC_SET_CPUS_ALLOWED], # 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]) @@ -1991,6 +1922,19 @@ LB_LINUX_TRY_COMPILE([ ]) # +# 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], @@ -2172,7 +2116,6 @@ AC_DEFUN([LC_PROG_LINUX], LC_EXPORT___D_REHASH LC_EXPORT_NODE_TO_CPUMASK - LC_FUNC_GRAB_CACHE_PAGE_NOWAIT_GFP LC_FILEMAP_POPULATE LC_BIT_SPINLOCK_H @@ -2197,7 +2140,6 @@ AC_DEFUN([LC_PROG_LINUX], # 2.6.12 LC_RW_TREE_LOCK - LC_EXPORT_SYNCHRONIZE_RCU # 2.6.15 LC_INODE_I_MUTEX @@ -2261,9 +2203,6 @@ AC_DEFUN([LC_PROG_LINUX], LC_PROCFS_DELETED LC_EXPORT_BDI_INIT - #2.6.25 - LC_MAPPING_CAP_WRITEBACK_DIRTY - # 2.6.26 LC_FS_STRUCT_USE_PATH @@ -2281,7 +2220,6 @@ AC_DEFUN([LC_PROG_LINUX], # 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 @@ -2304,6 +2242,7 @@ AC_DEFUN([LC_PROG_LINUX], LC_BLK_QUEUE_MAX_SEGMENTS LC_SET_CPUS_ALLOWED LC_CACHE_UPCALL + LC_EXPORT_GENERIC_ERROR_REMOVE_PAGE # 2.6.35 LC_FILE_FSYNC @@ -2555,6 +2494,7 @@ if test x$enable_split != xno; then fi ]) +# RHEL5(2.6.18) has tux_info AC_DEFUN([LC_TASK_CLENV_TUX_INFO], [AC_MSG_CHECKING([tux_info]) LB_LINUX_TRY_COMPILE([ @@ -2746,6 +2686,7 @@ lustre/doc/Makefile 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