X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=config%2Flustre-build-ldiskfs.m4;h=6f1ae82386bf89589ce9a73d7ea6eb5382551898;hb=9002fabc81f6cb1c467c5b89548161579fcd48f6;hp=e34e75aa40e3096d0f846c9fb1b063b44c85ffe7;hpb=a66e12d6ede2afda3bb7a5b1f22b8c17c1176584;p=fs%2Flustre-release.git diff --git a/config/lustre-build-ldiskfs.m4 b/config/lustre-build-ldiskfs.m4 index e34e75a..6f1ae82 100644 --- a/config/lustre-build-ldiskfs.m4 +++ b/config/lustre-build-ldiskfs.m4 @@ -5,12 +5,13 @@ AC_DEFUN([LDISKFS_LINUX_SERIES], [ LDISKFS_SERIES= AC_MSG_CHECKING([which ldiskfs series to use]) AS_IF([test x$RHEL_KERNEL = xyes], [ - AS_VERSION_COMPARE([$RHEL_KERNEL_VERSION],[2.6.32-431],[ - AS_VERSION_COMPARE([$RHEL_KERNEL_VERSION],[2.6.32-343],[ - AS_VERSION_COMPARE([$RHEL_KERNEL_VERSION],[2.6.32],[], - [LDISKFS_SERIES="2.6-rhel6.series"], [LDISKFS_SERIES="2.6-rhel6.series"])], - [LDISKFS_SERIES="2.6-rhel6.4.series"],[LDISKFS_SERIES="2.6-rhel6.4.series"])], - [LDISKFS_SERIES="2.6-rhel6.5.series"],[LDISKFS_SERIES="2.6-rhel6.5.series"]) + case $RHEL_RELEASE_NO in + 71) LDISKFS_SERIES="3.10-rhel7.series" ;; + 66) LDISKFS_SERIES="2.6-rhel6.6.series" ;; + 65) LDISKFS_SERIES="2.6-rhel6.5.series" ;; + 64) LDISKFS_SERIES="2.6-rhel6.4.series" ;; + 6[0-3]) LDISKFS_SERIES="2.6-rhel6.series" ;; + esac ], [test x$SUSE_KERNEL = xyes], [ AS_VERSION_COMPARE([$LINUXRELEASE],[3.0.0],[ AS_VERSION_COMPARE([$LINUXRELEASE],[2.6.32], [], @@ -68,6 +69,42 @@ ext_pblock, [ ]) # LB_EXT_PBLOCK # +# LB_EXT4_JOURNAL_START_3ARGS +# +# 3.9 added a type argument to ext4_journal_start and friends +# +AC_DEFUN([LB_EXT4_JOURNAL_START_3ARGS], [ +LB_CHECK_COMPILE([if ext4_journal_start takes 3 arguments], +ext4_journal_start, [ + #include + #include "$EXT4_SRC_DIR/ext4_jbd2.h" +],[ + ext4_journal_start(NULL, 0, 0); +],[ + AC_DEFINE(JOURNAL_START_HAS_3ARGS, 1, [ext4_journal_start takes 3 arguments]) +]) +]) # LB_EXT4_JOURNAL_START_3ARGS + +# +# LB_LDISKFS_MAP_BLOCKS +# +# Since 2.6.35 brought ext4_map_blocks() for IO. +# We just check this function whether existed. +# it must be exported by ldiskfs patches. +# +AC_DEFUN([LB_LDISKFS_MAP_BLOCKS], [ +LB_CHECK_COMPILE([if kernel has ext4_map_blocks], +ext4_map_blocks, [ + #include + #include "$EXT4_SRC_DIR/ext4.h" +],[ + ext4_map_blocks(NULL, NULL, NULL, 0); +],[ + AC_DEFINE(HAVE_LDISKFS_MAP_BLOCKS, 1, [kernel has ext4_map_blocks]) +]) +]) + +# # LDISKFS_AC_PATCH_PROGRAM # # Determine which program should be used to apply the patches to @@ -144,6 +181,8 @@ AS_IF([test x$enable_ldiskfs != xno],[ LDISKFS_AC_PATCH_PROGRAM LB_EXT_FREE_BLOCKS_WITH_BUFFER_HEAD LB_EXT_PBLOCK + LB_EXT4_JOURNAL_START_3ARGS + LB_LDISKFS_MAP_BLOCKS AC_DEFINE(CONFIG_LDISKFS_FS_POSIX_ACL, 1, [posix acls for ldiskfs]) AC_DEFINE(CONFIG_LDISKFS_FS_SECURITY, 1, [fs security for ldiskfs]) AC_DEFINE(CONFIG_LDISKFS_FS_XATTR, 1, [extened attributes for ldiskfs]) @@ -161,7 +200,7 @@ AM_CONDITIONAL([LDISKFS_ENABLED], [test x$enable_ldiskfs = xyes]) # # LB_VALIDATE_EXT4_SRC_DIR # -# Spot check the existance of several source files common to ext4. +# Spot check the existence of several source files common to ext4. # Detecting this at configure time allows us to avoid a potential build # failure and provide a useful error message to explain what is wrong. #