X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Fautoconf%2Flustre-core.m4;h=0e58b7b6dc1eaa960d7674dbf9ff3a0992e20ac4;hp=b1f17d080f72fd711a60d02269d9f2747036797b;hb=f44a953b30b2a439a9477ed5ecf599e172366493;hpb=6f8d0e2905286cadda1564ace6c2e6b034f0dfd6;ds=sidebyside diff --git a/lustre/autoconf/lustre-core.m4 b/lustre/autoconf/lustre-core.m4 index b1f17d0..0e58b7b 100644 --- a/lustre/autoconf/lustre-core.m4 +++ b/lustre/autoconf/lustre-core.m4 @@ -266,23 +266,6 @@ kernel SUNRPC support is required by using GSS. ]) # LC_CONFIG_SUNRPC # -# LC_HAVE_CRYPTO_HASH -# -# 4.6 kernel commit 896545098777564212b9e91af4c973f094649aa7 -# removed crypto_hash support. Since GSS only works with -# crypto_hash it has to be disabled for newer distros. -# -AC_DEFUN([LC_HAVE_CRYPTO_HASH], [ -LB_CHECK_COMPILE([if crypto_hash API is supported], -crypto_hash, [ - #include -],[ - crypto_hash_digestsize(NULL); -], [], [enable_gss="no"]) -]) -]) # LC_HAVE_CRYPTO_HASH - -# # LC_CONFIG_GSS (default 'auto' (tests for dependencies, if found, enables)) # # Build gss and related tools of Lustre. Currently both kernel and user space @@ -297,7 +280,6 @@ AC_MSG_RESULT([$enable_gss]) AS_IF([test "x$enable_gss" != xno], [ LC_CONFIG_GSS_KEYRING - LC_HAVE_CRYPTO_HASH LC_HAVE_CRED_TGCRED LC_KEY_TYPE_INSTANTIATE_2ARGS sunrpc_required=$enable_gss @@ -349,9 +331,7 @@ AC_COMPILE_IFELSE([AC_LANG_SOURCE([ int main(void) { int rc; - HMAC_CTX ctx; - HMAC_CTX_init(&ctx); - rc = HMAC_Init_ex(&ctx, "test", 4, EVP_md_null(), NULL); + rc = HMAC_Init_ex(NULL, "test", 4, EVP_md_null(), NULL); } ])],[AC_DEFINE(HAVE_OPENSSL_SSK, 1, [OpenSSL HMAC functions needed for SSK])], @@ -1987,6 +1967,23 @@ file_function_iter, [ ]) # LC_HAVE_FILE_OPERATIONS_READ_WRITE_ITER # +# LC_HAVE_INTERVAL_BLK_INTEGRITY +# +# 3.17 replace sector_size with interval in struct blk_integrity +# +AC_DEFUN([LC_HAVE_INTERVAL_BLK_INTEGRITY], [ +LB_CHECK_COMPILE([if 'blk_integrity.interval' exist], +interval_blk_integrity, [ + #include +],[ + ((struct blk_integrity *)0)->interval = 0; +],[ + AC_DEFINE(HAVE_INTERVAL_BLK_INTEGRITY, 1, + [blk_integrity.interval exist]) +]) +]) # LC_HAVE_INTERVAL_BLK_INTEGRITY + +# # LC_KEY_MATCH_DATA # # 3.17 replaces key_type::match with match_preparse @@ -2241,6 +2238,25 @@ bio_endio, [ ]) # LC_BIO_ENDIO_USES_ONE_ARG # +# LC_HAVE_INTERVAL_EXP_BLK_INTEGRITY +# +# 4.3 replace interval with interval_exp in 'struct blk_integrity' +# 'struct blk_integrity_profile' is also added in this version, +# thus use this to determine whether 'struct blk_integrity' has profile +# +AC_DEFUN([LC_HAVE_INTERVAL_EXP_BLK_INTEGRITY], [ +LB_CHECK_COMPILE([if 'blk_integrity.interval_exp' exist], +blk_integrity_interval_exp, [ + #include +],[ + ((struct blk_integrity *)0)->interval_exp = 0; +],[ + AC_DEFINE(HAVE_INTERVAL_EXP_BLK_INTEGRITY, 1, + [blk_integrity.interval_exp exist]) +]) +]) # LC_HAVE_INTERVAL_EXP_BLK_INTEGRITY + +# # LC_HAVE_LOOP_CTL_GET_FREE # # 4.x kernel have moved userspace APIs to @@ -2307,6 +2323,44 @@ EXTRA_KCFLAGS="$tmp_flags" ]) # LC_HAVE_XATTR_HANDLER_SIMPLIFIED # +# LC_HAVE_BIP_ITER_BIO_INTEGRITY_PAYLOAD +# +# 4.3 replace interval with interval_exp in 'struct blk_integrity'. +# +AC_DEFUN([LC_HAVE_BIP_ITER_BIO_INTEGRITY_PAYLOAD], [ +LB_CHECK_COMPILE([if 'bio_integrity_payload.bip_iter' exist], +bio_integrity_payload_bip_iter, [ + #include +],[ + ((struct bio_integrity_payload *)0)->bip_iter.bi_size = 0; +],[ + AC_DEFINE(HAVE_BIP_ITER_BIO_INTEGRITY_PAYLOAD, 1, + [bio_integrity_payload.bip_iter exist]) +]) +]) # LC_HAVE_BIP_ITER_BIO_INTEGRITY_PAYLOAD + +# +# LC_BIO_INTEGRITY_PREP_FN +# +# Lustre kernel patch extents bio_integrity_prep to accept optional +# generate/verify_fn as extra args. +# +AC_DEFUN([LC_BIO_INTEGRITY_PREP_FN], [ +LB_CHECK_COMPILE([if 'bio_integrity_prep_fn' exists], +bio_integrity_prep_fn, [ + #include +],[ + bio_integrity_prep_fn(NULL, NULL, NULL); +],[ + AC_DEFINE(HAVE_BIO_INTEGRITY_PREP_FN, 1, + [kernel has bio_integrity_prep_fn]) + AC_SUBST(PATCHED_INTEGRITY_INTF) +],[ + AC_SUBST(PATCHED_INTEGRITY_INTF, [#]) +]) +]) # LC_BIO_INTEGRITY_PREP_FN + +# # LC_HAVE_LOCKS_LOCK_FILE_WAIT # # 4.4 kernel have moved locks API users to @@ -2501,6 +2555,47 @@ generic_write_sync_2args, [ ]) # LC_GENERIC_WRITE_SYNC_2ARGS # +# LC_FOP_ITERATE_SHARED +# +# Kernel version 4.7 adds iterate_shared method to file_operations +# +AC_DEFUN([LC_FOP_ITERATE_SHARED], [ +LB_CHECK_COMPILE([if 'file_operations' has 'iterate_shared'], +fop_iterate_shared, [ + #include +],[ + struct file_operations fop; + fop.iterate_shared = NULL; +],[ + AC_DEFINE(HAVE_FOP_ITERATE_SHARED, 1, + [file_operations has iterate_shared]) +]) +]) # LC_FOP_ITERATE_SHARED + +# +# LC_FOPS_ITERATE_SHARED +# +# 4.7 commit ae05327a00fd47c34dfe25294b359a3f3fef96e8 +# ext4: switch to ->iterate_shared() +# this replaces ext4_dir_operations iterate with iterate_shared. +# dir_relaxed_shared() was also added in this commit, so we can +# use that function to verify that the ext4_dir_operations is using +# iterate_shared. +# +AC_DEFUN([LC_FOPS_ITERATE_SHARED], [ +LB_CHECK_COMPILE([if ext4_dir_operations uses iterate_shared], +iterate_shared, [ + #include +],[ + ((struct file_operations *)0)->iterate_shared(NULL, NULL); + dir_relax_shared(NULL); +],[ + AC_DEFINE(HAVE_ITERATE_SHARED, 1, + ['iterate_shared' is available]) +]) +]) # LC_FOPS_ITERATE_SHARED + +# # LC_HAVE_POSIX_ACL_VALID_USER_NS # # 4.8 posix_acl_valid takes struct user_namespace @@ -2735,6 +2830,45 @@ vm_operations_no_vm_area_struct, [ ]) # LC_VM_OPERATIONS_REMOVE_VMF_ARG # +# LC_HAVE_KEY_USAGE_REFCOUNT +# +# Kernel version 4.11 commit fff292914d3a2f1efd05ca71c2ba72a3c663201e +# converted key.usage from atomic_t to refcount_t. +# +AC_DEFUN([LC_HAVE_KEY_USAGE_REFCOUNT], [ +LB_CHECK_COMPILE([if 'key.usage' is refcount_t], +key_usage_refcount, [ + #include +],[ + struct key key = { }; + + refcount_read(&key.usage); +],[ + AC_DEFINE(HAVE_KEY_USAGE_REFCOUNT, 1, [key.usage is of type refcount_t]) +]) +]) #LC_HAVE_KEY_USAGE_REFCOUNT + +# +# LC_HAVE_CRYPTO_MAX_ALG_NAME_128 +# +# Kernel version 4.11 commit f437a3f477cce402dbec6537b29e9e33962c9f73 +# switched CRYPTO_MAX_ALG_NAME from 64 to 128. +# +AC_DEFUN([LC_HAVE_CRYPTO_MAX_ALG_NAME_128], [ +LB_CHECK_COMPILE([if 'CRYPTO_MAX_ALG_NAME' is 128], +crypto_max_alg_name, [ + #include +],[ + #if CRYPTO_MAX_ALG_NAME != 128 + exit(1); + #endif +],[ + AC_DEFINE(HAVE_CRYPTO_MAX_ALG_NAME_128, 1, + ['CRYPTO_MAX_ALG_NAME' is 128]) +]) +]) # LC_HAVE_CRYPTO_MAX_ALG_NAME_128 + +# # Kernel version 4.12 commit 47f38c539e9a42344ff5a664942075bd4df93876 # CURRENT_TIME is not 64 bit time safe so it was replaced with # current_time() @@ -2787,6 +2921,23 @@ bi_status, [ ]) # LC_BI_STATUS # +# LC_BIO_INTEGRITY_ENABLED +# +# 4.13 removed bio_integrity_enabled +# +AC_DEFUN([LC_BIO_INTEGRITY_ENABLED], [ +LB_CHECK_COMPILE([if 'bio_integrity_enabled' exist], +bio_integrity_enabled, [ + #include +],[ + bio_integrity_enabled(NULL); +],[ + AC_DEFINE(HAVE_BIO_INTEGRITY_ENABLED, 1, + ['bio_integrity_enabled' is available]) +]) +]) # LC_BIO_INTEGRITY_ENABLED + +# # LC_PAGEVEC_INIT_ONE_PARAM # # 4.14 pagevec_init takes one parameter @@ -2804,6 +2955,23 @@ pagevec_init, [ ]) # LC_PAGEVEC_INIT_ONE_PARAM # +# LC_BI_BDEV +# +# 4.14 replaced bi_bdev to bi_disk +# +AC_DEFUN([LC_BI_BDEV], [ +LB_CHECK_COMPILE([if 'bi_bdev' exist], +bi_bdev, [ + #include +],[ + ((struct bio *)0)->bi_bdev = NULL; +],[ + AC_DEFINE(HAVE_BI_BDEV, 1, + ['bi_bdev' is available]) +]) +]) # LC_BI_BDEV + +# # LC_PROG_LINUX # # Lustre linux kernel checks @@ -2952,6 +3120,7 @@ AC_DEFUN([LC_PROG_LINUX], [ LC_HAVE_FILE_OPERATIONS_READ_WRITE_ITER # 3.17 + LC_HAVE_INTERVAL_BLK_INTEGRITY LC_KEY_MATCH_DATA # 3.18 @@ -2979,6 +3148,8 @@ AC_DEFUN([LC_PROG_LINUX], [ LC_SYMLINK_OPS_USE_NAMEIDATA # 4.3 + LC_HAVE_INTERVAL_EXP_BLK_INTEGRITY + LC_HAVE_BIP_ITER_BIO_INTEGRITY_PAYLOAD LC_HAVE_CACHE_HEAD_HLIST LC_HAVE_XATTR_HANDLER_SIMPLIFIED @@ -3005,6 +3176,7 @@ AC_DEFUN([LC_PROG_LINUX], [ # 4.7 LC_DIRECTIO_2ARGS LC_GENERIC_WRITE_SYNC_2ARGS + LC_FOPS_ITERATE_SHARED # 4.8 LC_HAVE_POSIX_ACL_VALID_USER_NS @@ -3025,14 +3197,23 @@ AC_DEFUN([LC_PROG_LINUX], [ # 4.11 LC_INODEOPS_ENHANCED_GETATTR LC_VM_OPERATIONS_REMOVE_VMF_ARG + LC_HAVE_KEY_USAGE_REFCOUNT + LC_HAVE_CRYPTO_MAX_ALG_NAME_128 # 4.12 LC_CURRENT_TIME LC_SUPER_SETUP_BDI_NAME LC_BI_STATUS + # 4.13 + LC_BIO_INTEGRITY_ENABLED + # 4.14 LC_PAGEVEC_INIT_ONE_PARAM + LC_BI_BDEV + + # kernel patch to extend integrity interface + LC_BIO_INTEGRITY_PREP_FN # AS_IF([test "x$enable_server" != xno], [ @@ -3346,12 +3527,15 @@ lustre/Makefile lustre/autoMakefile lustre/autoconf/Makefile lustre/conf/Makefile +lustre/conf/resource/Makefile lustre/contrib/Makefile lustre/doc/Makefile lustre/include/Makefile lustre/include/lustre/Makefile lustre/include/uapi/linux/lustre/Makefile -lustre/kernel_patches/targets/3.10-rhel7.target +lustre/kernel_patches/targets/3.10-rhel7.6.target +lustre/kernel_patches/targets/3.10-rhel7.5.target +lustre/kernel_patches/targets/4.14-rhel7.5.target lustre/kernel_patches/targets/2.6-rhel6.9.target lustre/kernel_patches/targets/2.6-rhel6.8.target lustre/kernel_patches/targets/2.6-rhel6.7.target