X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;ds=sidebyside;f=lustre%2Fautoconf%2Flustre-core.m4;h=5d8c40224fb4837202f1f2c681ca6f4235754b3e;hb=8fcf474eb1b6508b00ef1121d2ae5018d76d31c2;hp=11e65699488294881d844f42d3e5b8b33f23f8ef;hpb=94d4792f303c7ecaf81ee037579c27cacc1eb717;p=fs%2Flustre-release.git diff --git a/lustre/autoconf/lustre-core.m4 b/lustre/autoconf/lustre-core.m4 index 11e6569..5d8c402 100644 --- a/lustre/autoconf/lustre-core.m4 +++ b/lustre/autoconf/lustre-core.m4 @@ -8,7 +8,7 @@ AC_DEFUN([LC_CONFIG_SRCDIR], [AC_CONFIG_SRCDIR([lustre/obdclass/obdo.c]) libcfs_is_module=yes -ldiskfs_is_ext4=yes +ldiskfs_is_ext4=no ]) # @@ -421,6 +421,7 @@ AC_DEFUN([LC_POSIX_ACL_XATTR_H], [LB_CHECK_FILE([$LINUX/include/linux/posix_acl_xattr.h],[ AC_MSG_CHECKING([if linux/posix_acl_xattr.h can be compiled]) LB_LINUX_TRY_COMPILE([ + #include #include ],[],[ AC_MSG_RESULT([yes]) @@ -431,19 +432,7 @@ AC_DEFUN([LC_POSIX_ACL_XATTR_H], ]) $1 ],[ -AC_MSG_RESULT([no]) -]) -]) - -# -# LC_EXPORT___IGET -# starting from 2.6.19 linux kernel exports __iget() -# -AC_DEFUN([LC_EXPORT___IGET], -[LB_CHECK_SYMBOL_EXPORT([__iget], -[fs/inode.c],[ - AC_DEFINE(HAVE_EXPORT___IGET, 1, [kernel exports __iget]) -],[ + AC_MSG_RESULT([no]) ]) ]) @@ -647,6 +636,29 @@ LB_LINUX_TRY_COMPILE([ ]) ]) +# LC_FLUSH_OWNER_ID +# starting from 2.6.18 the file_operations .flush +# method has a new "fl_owner_t id" parameter +# +AC_DEFUN([LC_FLUSH_OWNER_ID], +[AC_MSG_CHECKING([if file_operations .flush has an fl_owner_t id]) +LB_LINUX_TRY_COMPILE([ + #include +],[ + struct file_operations *fops = NULL; + fl_owner_t id; + int i; + + i = fops->flush(NULL, id); +],[ + AC_DEFINE(HAVE_FLUSH_OWNER_ID, 1, + [file_operations .flush method has an fl_owner_t id]) + AC_MSG_RESULT([yes]) +],[ + AC_MSG_RESULT([no]) +]) +]) + # # LC_STATFS_DENTRY_PARAM # starting from 2.6.18 linux kernel uses dentry instead of @@ -688,6 +700,26 @@ LB_LINUX_TRY_COMPILE([ ]) # +# LC_D_OBTAIN_ALIAS +# starting from 2.6.18 kernel don't export do_kern_mount +# and want to use vfs_kern_mount instead. +# +AC_DEFUN([LC_D_OBTAIN_ALIAS], +[AC_MSG_CHECKING([d_obtain_alias exist in kernel]) +LB_LINUX_TRY_COMPILE([ + #include +],[ + d_obtain_alias(NULL); +],[ + AC_DEFINE(HAVE_D_OBTAIN_ALIAS, 1, + [d_obtain_alias exist in kernel]) + AC_MSG_RESULT([yes]) +],[ + AC_MSG_RESULT([no]) +]) +]) + +# # LC_INVALIDATEPAGE_RETURN_INT # 2.6.17 changes return type for invalidatepage to 'void' from 'int' # @@ -853,26 +885,28 @@ LB_LINUX_TRY_COMPILE([ ]) # LC_CANCEL_DIRTY_PAGE -# 2.6.20 introduse cancel_dirty_page instead of -# clear_page_dirty. +# 2.6.20 introduced cancel_dirty_page instead of clear_page_dirty. AC_DEFUN([LC_CANCEL_DIRTY_PAGE], -[AC_MSG_CHECKING([kernel has cancel_dirty_page]) -LB_LINUX_TRY_COMPILE([ - #include - #include + [AC_MSG_CHECKING([kernel has cancel_dirty_page]) + # the implementation of cancel_dirty_page in OFED 1.4.1's SLES10 SP2 + # backport is broken, so ignore it + if test -f $OFED_BACKPORT_PATH/linux/mm.h && + test "$(sed -ne '/^static inline void cancel_dirty_page(struct page \*page, unsigned int account_size)$/,/^}$/p' $OFED_BACKPORT_PATH/linux/mm.h | md5sum)" = "c518cb32d6394760c5bca14cb7538d3e -"; then + AC_MSG_RESULT(no) + else + LB_LINUX_TRY_COMPILE([ + #include + #include ],[ - /* tmp workaround for broken OFED 1.4.1 at SLES10 */ - #if defined(CONFIG_SLE_VERSION) && CONFIG_SLE_VERSION == 10 && defined(_BACKPORT_LINUX_MM_H_) - #error badly implementation of cancel_dirty_pages - #endif - cancel_dirty_page(NULL, 0); + cancel_dirty_page(NULL, 0); ],[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_CANCEL_DIRTY_PAGE, 1, - [kernel has cancel_dirty_page instead of clear_page_dirty]) + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_CANCEL_DIRTY_PAGE, 1, + [kernel has cancel_dirty_page instead of clear_page_dirty]) ],[ - AC_MSG_RESULT(no) + AC_MSG_RESULT(no) ]) + fi ]) # @@ -1375,7 +1409,7 @@ EXTRA_KCFLAGS="$tmp_flags" AC_DEFUN([LC_CONST_ACL_SIZE], [AC_MSG_CHECKING([calc acl size]) tmp_flags="$CFLAGS" -CFLAGS="$CFLAGS -I$LINUX/include -I$LINUX_OBJ/include -I$LINUX_OBJ/include2 $EXTRA_KCFLAGS" +CFLAGS="$CFLAGS -I$LINUX/include -I$LINUX_OBJ/include -I$LINUX_OBJ/include2 -I$LINUX/arch/`uname -m|sed -e 's/ppc.*/powerpc/' -e 's/x86_64/x86/' -e 's/i.86/x86/'`/include $EXTRA_KCFLAGS" AC_TRY_RUN([ #define __KERNEL__ #include @@ -1793,6 +1827,39 @@ AC_DEFUN([LC_LINUX_FIEMAP_H], []) ]) +# LC_LOCK_MAP_ACQUIRE +# after 2.6.27 lock_map_acquire replaces lock_acquire +AC_DEFUN([LC_LOCK_MAP_ACQUIRE], +[AC_MSG_CHECKING([if lock_map_acquire is defined]) +LB_LINUX_TRY_COMPILE([ + #include +],[ + lock_map_acquire(NULL); +],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_LOCK_MAP_ACQUIRE, 1, + [lock_map_acquire is defined]) +],[ + AC_MSG_RESULT(no) +]) +]) + +# 2.6.31 replaces blk_queue_hardsect_size by blk_queue_logical_block_size function +AC_DEFUN([LC_BLK_QUEUE_LOG_BLK_SIZE], +[AC_MSG_CHECKING([if blk_queue_logical_block_size is defined]) +LB_LINUX_TRY_COMPILE([ + #include +],[ + blk_queue_logical_block_size(NULL, 0); +],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_BLK_QUEUE_LOG_BLK_SIZE, 1, + [blk_queue_logical_block_size is defined]) +],[ + AC_MSG_RESULT(no) +]) +]) + # # LC_PROG_LINUX # @@ -1877,6 +1944,7 @@ AC_DEFUN([LC_PROG_LINUX], LC_UMOUNTBEGIN_HAS_VFSMOUNT LC_SEQ_LOCK LC_EXPORT_FILEMAP_FDATAWRITE_RANGE + LC_FLUSH_OWNER_ID if test x$enable_server = xyes ; then LC_EXPORT_INVALIDATE_MAPPING_PAGES fi @@ -1933,6 +2001,7 @@ AC_DEFUN([LC_PROG_LINUX], LC_QUOTA_ON_5ARGS LC_QUOTA_OFF_3ARGS LC_VFS_DQ_OFF + LC_LOCK_MAP_ACQUIRE # 2.6.27.15-2 sles11 LC_BI_HW_SEGMENTS @@ -1940,6 +2009,9 @@ AC_DEFUN([LC_PROG_LINUX], LC_VFS_SYMLINK_5ARGS LC_SB_ANY_QUOTA_ACTIVE LC_SB_HAS_QUOTA_ACTIVE + + # 2.6.31 + LC_BLK_QUEUE_LOG_BLK_SIZE ]) # @@ -1997,6 +2069,63 @@ if test x$enable_liblustre_acl = xyes ; then AC_DEFINE(LIBLUSTRE_POSIX_ACL, 1, Liblustre Support ACL-enabled MDS) fi +# 2.6.29 change prepare/commit_write to write_begin/end +AC_DEFUN([LC_WRITE_BEGIN_END], +[AC_MSG_CHECKING([if kernel has .write_begin/end]) +LB_LINUX_TRY_COMPILE([ + #include + #include +#ifdef HAVE_LINUX_MMTYPES_H + #include +#endif +],[ + struct address_space_operations aops; + struct page *page; + + aops.write_begin = NULL; + aops.write_end = NULL; + page = grab_cache_page_write_begin(NULL, 0, 0); +], [ + AC_MSG_RESULT([yes]) + AC_DEFINE(HAVE_KERNEL_WRITE_BEGIN_END, 1, + [kernel has .write_begin/end]) +],[ + AC_MSG_RESULT([no]) +]) +]) + +# 2.6.29 blkdev_put has 2 arguments +AC_DEFUN([LC_BLKDEV_PUT_2ARGS], +[AC_MSG_CHECKING([blkdev_put needs 2 parameters]) +LB_LINUX_TRY_COMPILE([ + #include +],[ + blkdev_put(NULL, 0); +],[ + AC_DEFINE(HAVE_BLKDEV_PUT_2ARGS, 1, + [blkdev_put needs 2 paramters]) + AC_MSG_RESULT([yes]) +],[ + AC_MSG_RESULT([no]) +]) +]) + +# 2.6.29 dentry_open has 4 arguments +AC_DEFUN([LC_DENTRY_OPEN_4ARGS], +[AC_MSG_CHECKING([dentry_open needs 4 parameters]) +LB_LINUX_TRY_COMPILE([ + #include +],[ + dentry_open(NULL, NULL, 0, NULL); +],[ + AC_DEFINE(HAVE_DENTRY_OPEN_4ARGS, 1, + [dentry_open needs 4 paramters]) + AC_MSG_RESULT([yes]) +],[ + AC_MSG_RESULT([no]) +]) +]) + # # --enable-mpitest # @@ -2361,6 +2490,12 @@ if test x$enable_lu_ref = xyes ; then AC_DEFINE([USE_LU_REF], 1, [enable lu_ref reference tracking code]) fi + #2.6.29 + LC_WRITE_BEGIN_END + LC_D_OBTAIN_ALIAS + LC_BLKDEV_PUT_2ARGS + LC_DENTRY_OPEN_4ARGS + ]) # @@ -2395,20 +2530,19 @@ AC_DEFUN([LC_CONFIG_FILES], lustre/Makefile lustre/autoMakefile lustre/autoconf/Makefile +lustre/conf/Makefile lustre/contrib/Makefile lustre/doc/Makefile lustre/include/Makefile lustre/include/lustre_ver.h lustre/include/linux/Makefile lustre/include/lustre/Makefile -lustre/kernel_patches/targets/2.6-vanilla.target -lustre/kernel_patches/targets/2.6-rhel4.target lustre/kernel_patches/targets/2.6-rhel5.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/2.6-sles11.target lustre/kernel_patches/targets/2.6-oel5.target +lustre/kernel_patches/targets/2.6-fc11.target +lustre/kernel_patches/targets/2.6-fc12.target lustre/ldlm/Makefile lustre/fid/Makefile lustre/fid/autoMakefile @@ -2447,8 +2581,8 @@ lustre/osc/Makefile lustre/osc/autoMakefile lustre/ost/Makefile lustre/ost/autoMakefile -lustre/osd/Makefile -lustre/osd/autoMakefile +lustre/osd-ldiskfs/Makefile +lustre/osd-ldiskfs/autoMakefile lustre/mgc/Makefile lustre/mgc/autoMakefile lustre/mgs/Makefile @@ -2464,11 +2598,6 @@ lustre/tests/Makefile lustre/tests/mpi/Makefile lustre/utils/Makefile lustre/utils/gss/Makefile +lustre/obdclass/darwin/Makefile ]) -case $lb_target_os in - darwin) - AC_CONFIG_FILES([ lustre/obdclass/darwin/Makefile ]) - ;; -esac - ])