📄 lustre-core.m4
字号:
],[])])AC_DEFUN([LC_EXPORT___D_MOVE],[LB_CHECK_SYMBOL_EXPORT([__d_move],[fs/dcache.c],[AC_DEFINE(HAVE___D_MOVE, 1, [__d_move is exported by the kernel])],[])])# The actual symbol exported varies among architectures, so we need# to check many symbols (but only in the current architecture.) No# matter what symbol is exported, the kernel #defines node_to_cpumask# to the appropriate function and that's what we use.AC_DEFUN([LC_EXPORT_NODE_TO_CPUMASK], [LB_LINUX_ARCH LB_CHECK_SYMBOL_EXPORT([node_to_cpumask], [arch/$LINUX_ARCH/mm/numa.c], [AC_DEFINE(HAVE_NODE_TO_CPUMASK, 1, [node_to_cpumask is exported by the kernel])]) # x86_64 LB_CHECK_SYMBOL_EXPORT([node_to_cpu_mask], [arch/$LINUX_ARCH/kernel/smpboot.c], [AC_DEFINE(HAVE_NODE_TO_CPUMASK, 1, [node_to_cpumask is exported by the kernel])]) # ia64 LB_CHECK_SYMBOL_EXPORT([node_2_cpu_mask], [arch/$LINUX_ARCH/kernel/smpboot.c], [AC_DEFINE(HAVE_NODE_TO_CPUMASK, 1, [node_to_cpumask is exported by the kernel])]) # i386 ])## LC_VFS_INTENT_PATCHES## check if the kernel has the VFS intent patchesAC_DEFUN([LC_VFS_INTENT_PATCHES],[AC_MSG_CHECKING([if the kernel has the VFS intent patches])LB_LINUX_TRY_COMPILE([ #include <linux/fs.h> #include <linux/namei.h>],[ struct nameidata nd; struct lookup_intent *it; it = &nd.intent; intent_init(it, IT_OPEN); it->d.lustre.it_disposition = 0; it->d.lustre.it_data = NULL;],[ AC_MSG_RESULT([yes]) AC_DEFINE(HAVE_VFS_INTENT_PATCHES, 1, [VFS intent patches are applied])],[ AC_MSG_RESULT([no])])])# 2.6.22 lost second parameter for invalidate_bdevAC_DEFUN([LC_INVALIDATE_BDEV_2ARG],[AC_MSG_CHECKING([if invalidate_bdev has second argument])LB_LINUX_TRY_COMPILE([ #include <linux/buffer_head.h>],[ invalidate_bdev(NULL,0);],[ AC_MSG_RESULT([yes]) AC_DEFINE(HAVE_INVALIDATE_BDEV_2ARG, 1, [invalidate_bdev has second argument])],[ AC_MSG_RESULT([no])])])# 2.6.23 have return type 'void' for unregister_blkdevAC_DEFUN([LC_UNREGISTER_BLKDEV_RETURN_INT],[AC_MSG_CHECKING([if unregister_blkdev return int])LB_LINUX_TRY_COMPILE([ #include <linux/fs.h>],[ int i = unregister_blkdev(0,NULL);],[ AC_MSG_RESULT([yes]) AC_DEFINE(HAVE_UNREGISTER_BLKDEV_RETURN_INT, 1, [unregister_blkdev return int])],[ AC_MSG_RESULT([no])])])# 2.6.23 change .sendfile to .splice_readAC_DEFUN([LC_KERNEL_SPLICE_READ],[AC_MSG_CHECKING([if kernel has .splice_read])LB_LINUX_TRY_COMPILE([ #include <linux/fs.h>],[ struct file_operations file; file.splice_read = NULL;], [ AC_MSG_RESULT([yes]) AC_DEFINE(HAVE_KERNEL_SPLICE_READ, 1, [kernel has .slice_read])],[ AC_MSG_RESULT([no])])])# 2.6.23 extract nfs export related data into exportfs.hAC_DEFUN([LC_HAVE_EXPORTFS_H],[tmpfl="$CFLAGS"CFLAGS="$CFLAGS -I$LINUX_OBJ/include"AC_CHECK_HEADERS([linux/exportfs.h])CFLAGS="$tmpfl"])## LC_PROG_LINUX## Lustre linux kernel checks#AC_DEFUN([LC_PROG_LINUX], [LC_LUSTRE_VERSION_H if test x$enable_server = xyes ; then LC_CONFIG_BACKINGFS fi LC_CONFIG_PINGER LC_CONFIG_CHECKSUM LC_CONFIG_LIBLUSTRE_RECOVERY LC_CONFIG_QUOTA LC_CONFIG_HEALTH_CHECK_WRITE LC_CONFIG_LRU_RESIZE LC_CONFIG_ADAPTIVE_TIMEOUTS LC_TASK_PPTR # RHEL4 patches LC_EXPORT_TRUNCATE_COMPLETE LC_EXPORT_D_REHASH_COND LC_EXPORT___D_REHASH LC_EXPORT_D_MOVE_LOCKED LC_EXPORT___D_MOVE LC_EXPORT_NODE_TO_CPUMASK LC_STRUCT_KIOBUF LC_FUNC_COND_RESCHED LC_FUNC_ZAP_PAGE_RANGE LC_FUNC_PDE LC_FUNC_DIRECT_IO LC_HEADER_MM_INLINE LC_STRUCT_INODE LC_FUNC_REGISTER_CACHE LC_FUNC_GRAB_CACHE_PAGE_NOWAIT_GFP LC_FUNC_DEV_SET_RDONLY LC_FUNC_FILEMAP_FDATAWRITE LC_STRUCT_STATFS LC_FUNC_PAGE_MAPPED LC_STRUCT_FILE_OPS_UNLOCKED_IOCTL LC_FILEMAP_POPULATE LC_D_ADD_UNIQUE LC_BIT_SPINLOCK_H 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_FUNC_F_OP_FLOCK LC_QUOTA_READ LC_COOKIE_FOLLOW_LINK LC_FUNC_RCU # does the kernel have VFS intent patches? LC_VFS_INTENT_PATCHES # 2.6.15 LC_INODE_I_MUTEX # SLES 10 (at least) LC_SYMVERFILE # 2.6.17 LC_DQUOTOFF_MUTEX # 2.6.18 LC_NR_PAGECACHE LC_STATFS_DENTRY_PARAM LC_VFS_KERN_MOUNT LC_INVALIDATEPAGE_RETURN_INT LC_UMOUNTBEGIN_HAS_VFSMOUNT #2.6.18 + RHEL5 (fc6) LC_PG_FS_MISC LC_PAGE_CHECKED # 2.6.19 LC_INODE_BLKSIZE LC_VFS_READDIR_U64_INO LC_FILE_WRITEV LC_FILE_READV # 2.6.20 LC_CANCEL_DIRTY_PAGE # raid5-zerocopy patch LC_PAGE_CONSTANT # 2.6.22 LC_INVALIDATE_BDEV_2ARG # 2.6.23 LC_UNREGISTER_BLKDEV_RETURN_INT LC_KERNEL_SPLICE_READ LC_HAVE_EXPORTFS_H])## LC_CONFIG_CLIENT_SERVER## Build client/server sides of Lustre#AC_DEFUN([LC_CONFIG_CLIENT_SERVER],[AC_MSG_CHECKING([whether to build Lustre server support])AC_ARG_ENABLE([server], AC_HELP_STRING([--disable-server], [disable Lustre server support]), [],[enable_server='yes'])AC_MSG_RESULT([$enable_server])AC_MSG_CHECKING([whether to build Lustre client support])AC_ARG_ENABLE([client], AC_HELP_STRING([--disable-client], [disable Lustre client support]), [],[enable_client='yes'])AC_MSG_RESULT([$enable_client])])## LC_CONFIG_LIBLUSTRE## whether to build liblustre#AC_DEFUN([LC_CONFIG_LIBLUSTRE],[AC_MSG_CHECKING([whether to build Lustre library])AC_ARG_ENABLE([liblustre], AC_HELP_STRING([--disable-liblustre], [disable building of Lustre library]), [],[enable_liblustre=$with_sysio])AC_MSG_RESULT([$enable_liblustre])# only build sysio if liblustre is builtwith_sysio="$enable_liblustre"AC_MSG_CHECKING([whether to build liblustre tests])AC_ARG_ENABLE([liblustre-tests], AC_HELP_STRING([--enable-liblustre-tests], [enable liblustre tests, if --disable-tests is used]), [],[enable_liblustre_tests=$enable_tests])if test x$enable_liblustre != xyes ; then enable_liblustre_tests='no'fiAC_MSG_RESULT([$enable_liblustre_tests])AC_MSG_CHECKING([whether to enable liblustre acl])AC_ARG_ENABLE([liblustre-acl], AC_HELP_STRING([--disable-liblustre-acl], [disable ACL support for liblustre]), [],[enable_liblustre_acl=yes])AC_MSG_RESULT([$enable_liblustre_acl])if test x$enable_liblustre_acl = xyes ; then AC_DEFINE(LIBLUSTRE_POSIX_ACL, 1, Liblustre Support ACL-enabled MDS)fiAC_MSG_CHECKING([whether to build mpitests])AC_ARG_ENABLE([mpitests], AC_HELP_STRING([--enable-mpitests], [build liblustre mpi tests]), [],[enable_mpitests=no])AC_MSG_RESULT([$enable_mpitests])AC_MSG_NOTICE([Enabling Lustre configure options for libsysio])ac_configure_args="$ac_configure_args --with-lustre-hack --with-sockets"LC_CONFIG_PINGERLC_CONFIG_LIBLUSTRE_RECOVERY])AC_DEFUN([LC_CONFIG_LRU_RESIZE],[AC_MSG_CHECKING([whether to enable lru self-adjusting])AC_ARG_ENABLE([lru_resize], AC_HELP_STRING([--enable-lru-resize], [enable lru resize support]), [],[enable_lru_resize='yes'])AC_MSG_RESULT([$enable_lru_resize])if test x$enable_lru_resize != xno; then AC_DEFINE(HAVE_LRU_RESIZE_SUPPORT, 1, [Enable lru resize support])fi])AC_DEFUN([LC_CONFIG_ADAPTIVE_TIMEOUTS],[AC_MSG_CHECKING([whether to enable ptlrpc adaptive timeouts support])AC_ARG_ENABLE([adaptive_timeouts], AC_HELP_STRING([--enable-adaptive-timeouts], [enable ptlrpc adaptive timeouts support]), [],[enable_adaptive_timeouts='no'])AC_MSG_RESULT([$enable_adaptive_timeouts])if test x$enable_adaptive_timeouts == xyes; then AC_DEFINE(HAVE_AT_SUPPORT, 1, [Enable adaptive timeouts support])fi])## LC_CONFIG_QUOTA## whether to enable quota support#AC_DEFUN([LC_CONFIG_QUOTA],[AC_MSG_CHECKING([whether to enable quota support])AC_ARG_ENABLE([quota], AC_HELP_STRING([--enable-quota], [enable quota support]), [],[enable_quota='yes'])AC_MSG_RESULT([$enable_quota])if test x$linux25 != xyes; then enable_quota='no'fiif test x$enable_quota != xno; then AC_DEFINE(HAVE_QUOTA_SUPPORT, 1, [Enable quota support])fi]) AC_DEFUN([LC_QUOTA_READ],[AC_MSG_CHECKING([if kernel supports quota_read])LB_LINUX_TRY_COMPILE([ #include <linux/fs.h>],[ struct super_operations sp; void *i = (void *)sp.quota_read;],[ AC_MSG_RESULT([yes]) AC_DEFINE(KERNEL_SUPPORTS_QUOTA_READ, 1, [quota_read found])],[ AC_MSG_RESULT([no])])])## LC_COOKIE_FOLLOW_LINK## kernel 2.6.13+ ->follow_link returns a cookie#AC_DEFUN([LC_COOKIE_FOLLOW_LINK],[AC_MSG_CHECKING([if inode_operations->follow_link returns a cookie])LB_LINUX_TRY_COMPILE([ #include <linux/fs.h> #include <linux/namei.h>],[ struct dentry dentry; struct nameidata nd; dentry.d_inode->i_op->put_link(&dentry, &nd, NULL);],[ AC_DEFINE(HAVE_COOKIE_FOLLOW_LINK, 1, [inode_operations->follow_link returns a cookie]) AC_MSG_RESULT([yes])],[ AC_MSG_RESULT([no])])])## LC_FUNC_RCU## kernels prior than 2.6.0(?) have no RCU supported; in kernel 2.6.5(SUSE), # call_rcu takes three parameters.#AC_DEFUN([LC_FUNC_RCU],[AC_MSG_CHECKING([if kernel have RCU supported])LB_LINUX_TRY_COMPILE([ #include <linux/rcupdate.h>],[],[ AC_DEFINE(HAVE_RCU, 1, [have RCU defined]) AC_MSG_RESULT([yes]) AC_MSG_CHECKING([if call_rcu takes three parameters]) LB_LINUX_TRY_COMPILE([ #include <linux/rcupdate.h> ],[ struct rcu_head rh; call_rcu(&rh, (void (*)(struct rcu_head *))1, NULL); ],[ AC_DEFINE(HAVE_CALL_RCU_PARAM, 1, [call_rcu takes three parameters]) AC_MSG_RESULT([yes]) ],[ AC_MSG_RESULT([no]) ])],[ AC_MSG_RESULT([no])])])## LC_CONFIGURE## other configure checks#AC_DEFUN([LC_CONFIGURE],[LC_CONFIG_OBD_BUFFER_SIZE# include/liblustre.hAC_CHECK_HEADERS([asm/page.h sys/user.h sys/vfs.h stdint.h blkid/blkid.h])# include/lustre/lustre_user.h# See note there re: __ASM_X86_64_PROCESSOR_HAC_CHECK_HEADERS([linux/fs.h linux/quota.h])# liblustre/llite_lib.hAC_CHECK_HEADERS([xtio.h file.h])# liblustre/dir.cAC_CHECK_HEADERS([linux/types.h sys/types.h linux/unistd.h unistd.h])# liblustre/lutil.cAC_CHECK_HEADERS([netinet/in.h arpa/inet.h catamount/data.h])AC_CHECK_FUNCS([inet_ntoa])# libsysio/src/readlink.cLC_READLINK_SSIZE_T# lvfs/prng.c - depends on linux/types.h from liblustre/dir.cAC_CHECK_HEADERS([linux/random.h], [], [], [#ifdef HAVE_LINUX_TYPES_H # include <linux/types.h> #endif ])# utils/llverfs.cAC_CHECK_HEADERS([ext2fs/ext2fs.h])# check for -lz supportZLIB=""AC_CHECK_LIB([z], [adler32], [AC_CHECK_HEADERS([zlib.h], [ZLIB="-lz" AC_DEFINE([HAVE_ADLER], 1, [support alder32 checksum type])], [AC_MSG_WARN([No zlib-devel package found, unable to use adler32 checksum])])], [AC_MSG_WARN([No zlib package found, unable to use adler32 checksum])])AC_SUBST(ZLIB)# Super safe dfAC_ARG_ENABLE([mindf], AC_HELP_STRING([--enable-mindf], [Make statfs report the minimum available space on any single OST instead of the sum of free space on all OSTs]), [],[])if test "$enable_mindf" = "yes" ; then AC_DEFINE([MIN_DF], 1, [Report minimum OST free space])fiAC_ARG_ENABLE([fail_alloc], AC_HELP_STRING([--disable-fail-alloc], [disable randomly alloc failure]), [],[enable_fail_alloc=yes])AC_MSG_CHECKING([whether to randomly failing memory alloc])AC_MSG_RESULT([$enable_fail_alloc])if test x$enable_fail_alloc != xno ; then AC_DEFINE([RANDOM_FAIL_ALLOC], 1, [enable randomly alloc failure])fi])## LC_CONDITIONALS## AM_CONDITIONALS for lustre#AC_DEFUN([LC_CONDITIONALS],[AM_CONDITIONAL(LIBLUSTRE, test x$enable_liblustre = xyes)AM_CONDITIONAL(USE_QUILT, test x$QUILT != xno)AM_CONDITIONAL(LIBLUSTRE_TESTS, test x$enable_liblustre_tests = xyes)AM_CONDITIONAL(MPITESTS, test x$enable_mpitests = xyes, Build MPI Tests)AM_CONDITIONAL(CLIENT, test x$enable_client = xyes)AM_CONDITIONAL(SERVER, test x$enable_server = xyes)AM_CONDITIONAL(QUOTA, test x$enable_quota = xyes)AM_CONDITIONAL(BLKID, test x$ac_cv_header_blkid_blkid_h = xyes)AM_CONDITIONAL(EXT2FS_DEVEL, test x$ac_cv_header_ext2fs_ext2fs_h = xyes)AM_CONDITIONAL(LIBPTHREAD, test x$enable_libpthread = xyes)])## LC_CONFIG_FILES## files that should be generated with AC_OUTPUT#AC_DEFUN([LC_CONFIG_FILES],[AC_CONFIG_FILES([lustre/Makefilelustre/autoMakefilelustre/autoconf/Makefilelustre/contrib/Makefilelustre/doc/Makefilelustre/include/Makefilelustre/include/lustre_ver.hlustre/include/linux/Makefilelustre/include/lustre/Makefilelustre/kernel_patches/targets/2.6-suse.targetlustre/kernel_patches/targets/2.6-vanilla.targetlustre/kernel_patches/targets/2.6-rhel4.targetlustre/kernel_patches/targets/2.6-rhel5.targetlustre/kernel_patches/targets/2.6-fc5.targetlustre/kernel_patches/targets/2.6-patchless.targetlustre/kernel_patches/targets/2.6-sles10.targetlustre/kernel_patches/targets/hp_pnnl-2.4.targetlustre/kernel_patches/targets/rh-2.4.targetlustre/kernel_patches/targets/rhel-2.4.targetlustre/kernel_patches/targets/suse-2.4.21-2.targetlustre/kernel_patches/targets/sles-2.4.targetlustre/ldlm/Makefilelustre/liblustre/Makefilelustre/liblustre/tests/Makefilelustre/llite/Makefilelustre/llite/autoMakefilelustre/lov/Makefilelustre/lov/autoMakefilelustre/lvfs/Makefilelustre/lvfs/autoMakefilelustre/mdc/Makefilelustre/mdc/autoMakefilelustre/mds/Makefilelustre/mds/autoMakefilelustre/obdclass/Makefilelustre/obdclass/autoMakefilelustre/obdclass/linux/Makefilelustre/obdecho/Makefilelustre/obdecho/autoMakefilelustre/obdfilter/Makefilelustre/obdfilter/autoMakefilelustre/osc/Makefilelustre/osc/autoMakefilelustre/ost/Makefilelustre/ost/autoMakefilelustre/mgc/Makefilelustre/mgc/autoMakefilelustre/mgs/Makefilelustre/mgs/autoMakefilelustre/ptlrpc/Makefilelustre/ptlrpc/autoMakefilelustre/quota/Makefilelustre/quota/autoMakefilelustre/scripts/Makefilelustre/scripts/version_tag.pllustre/tests/Makefilelustre/utils/Makefile])case $lb_target_os in darwin) AC_CONFIG_FILES([ lustre/obdclass/darwin/Makefile ]) ;;esac])
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -