4 # Wrapper for AC_CONFIG_SUBDIR
6 AC_DEFUN([LC_CONFIG_SRCDIR], [
7 AC_CONFIG_SRCDIR([lustre/obdclass/obdo.c])
14 # lustre specific paths
16 AC_DEFUN([LC_PATH_DEFAULTS], [
17 # ptlrpc kernel build requires this
25 demodir='$(docdir)/demo'
28 pkgexampledir='${pkgdatadir}/examples'
29 AC_SUBST(pkgexampledir)
35 # is the target os supported?
37 AC_DEFUN([LC_TARGET_SUPPORTED], [
46 ]) # LC_TARGET_SUPPORTED
49 # LC_GLIBC_SUPPORT_FHANDLES
51 AC_DEFUN([LC_GLIBC_SUPPORT_FHANDLES], [
52 AC_CHECK_FUNCS([name_to_handle_at],
53 [AC_DEFINE(HAVE_FHANDLE_GLIBC_SUPPORT, 1,
54 [file handle and related syscalls are supported])],
55 [AC_MSG_WARN([file handle and related syscalls are not supported])])
56 ]) # LC_GLIBC_SUPPORT_FHANDLES
59 # LC_GLIBC_SUPPORT_COPY_FILE_RANGE
61 AC_DEFUN([LC_GLIBC_SUPPORT_COPY_FILE_RANGE], [
62 AC_CHECK_FUNCS([copy_file_range],
63 [AC_DEFINE(HAVE_COPY_FILE_RANGE, 1,
64 [copy_file_range() is supported])],
65 [AC_MSG_WARN([copy_file_range() is not supported])])
66 ]) # LC_GLIBC_SUPPORT_COPY_FILE_RANGE
71 AC_DEFUN([LC_FID2PATH_ANON_UNION], [
74 AC_MSG_CHECKING([if 'struct getinfo_fid2path' has anonymous union])
75 AC_COMPILE_IFELSE([AC_LANG_SOURCE([
76 #include <linux/lustre/lustre_idl.h>
79 struct getinfo_fid2path gf;
80 struct lu_fid root_fid;
82 *gf.gf_root_fid = root_fid;
86 AC_DEFINE(HAVE_FID2PATH_ANON_UNIONS, 1, [union is unnamed])
92 ]) # LC_FID2PATH_ANON_UNION
97 # Ensure the stack size is at least 8k in Lustre server (all kernels)
99 AC_DEFUN([LC_SRC_STACK_SIZE], [
100 LB2_LINUX_TEST_SRC([stack_size_8k], [
101 #include <linux/thread_info.h>
103 #if THREAD_SIZE < 8192
104 #error "stack size < 8192"
108 AC_DEFUN([LC_STACK_SIZE], [
109 LB2_MSG_LINUX_TEST_RESULT([if stack size is at least 8k],
110 [stack_size_8k], [],[
112 [Lustre requires that Linux is configured with at least a 8KB stack.])
119 # Allow the user to set the MDS thread upper limit
121 AC_DEFUN([LC_MDS_MAX_THREADS], [
122 AC_MSG_CHECKING([for maximum number of MDS threads])
123 AC_ARG_WITH([mds_max_threads],
124 AS_HELP_STRING([--with-mds-max-threads=count],
125 [maximum threads available on the MDS: (default=512)]),
126 [AC_DEFINE_UNQUOTED(MDS_MAX_THREADS, $with_mds_max_threads,
127 [maximum number of MDS threads])])
128 AC_MSG_RESULT([$with_mds_max_threads])
129 ]) # LC_MDS_MAX_THREADS
134 # the pinger is temporary, until we have the recovery node in place
136 AC_DEFUN([LC_CONFIG_PINGER], [
137 AC_MSG_CHECKING([whether to enable Lustre pinger support])
138 AC_ARG_ENABLE([pinger],
139 AS_HELP_STRING([--disable-pinger],
140 [disable recovery pinger support]),
141 [], [enable_pinger="yes"])
142 AC_MSG_RESULT([$enable_pinger])
143 AS_IF([test "x$enable_pinger" != xno], [
144 AC_DEFINE(CONFIG_LUSTRE_FS_PINGER, 1, [Use the Pinger])
145 AC_SUBST(ENABLE_PINGER, yes)
147 AC_SUBST(ENABLE_PINGER, no)
149 ]) # LC_CONFIG_PINGER
154 # do checksum of bulk data between client and OST
156 AC_DEFUN([LC_CONFIG_CHECKSUM], [
157 AC_MSG_CHECKING([whether to enable data checksum support])
158 AC_ARG_ENABLE([checksum],
159 AS_HELP_STRING([--disable-checksum],
160 [disable data checksum support]),
161 [], [enable_checksum="yes"])
162 AC_MSG_RESULT([$enable_checksum])
163 AS_IF([test "x$enable_checksum" != xno], [
164 AC_DEFINE(CONFIG_ENABLE_CHECKSUM, 1, [do data checksums])
165 AC_SUBST(ENABLE_CHECKSUM, yes)
167 AC_SUBST(ENABLE_CHECKSUM, no)
169 ]) # LC_CONFIG_CHECKSUM
174 # enable distributed flock by default
176 AC_DEFUN([LC_CONFIG_FLOCK], [
177 AC_MSG_CHECKING([whether to enable flock by default])
178 AC_ARG_ENABLE([flock],
179 AS_HELP_STRING([--disable-flock],
180 [disable flock by default]),
181 [], [enable_flock="yes"])
182 AC_MSG_RESULT([$enable_flock])
183 AS_IF([test "x$enable_flock" != xno], [
184 AC_DEFINE(CONFIG_ENABLE_FLOCK, 1, [enable flock by default])
185 AC_SUBST(ENABLE_FLOCK, yes)
187 AC_SUBST(ENABLE_FLOCK, no)
192 # LC_CONFIG_HEALTH_CHECK_WRITE
194 # Turn off the actual write to the disk
196 AC_DEFUN([LC_CONFIG_HEALTH_CHECK_WRITE], [
197 AC_MSG_CHECKING([whether to enable a write with the health check])
198 AC_ARG_ENABLE([health_write],
199 AS_HELP_STRING([--enable-health_write],
200 [enable disk writes when doing health check]),
201 [], [enable_health_write="no"])
202 AC_MSG_RESULT([$enable_health_write])
203 AS_IF([test "x$enable_health_write" != xno], [
204 AC_DEFINE(USE_HEALTH_CHECK_WRITE, 1, [Write when Checking Health])
205 AC_SUBST(ENABLE_HEALTH_WRITE, yes)
207 AC_SUBST(ENABLE_HEALTH_WRITE, no)
209 ]) # LC_CONFIG_HEALTH_CHECK_WRITE
212 # LC_CONFIG_LRU_RESIZE
214 AC_DEFUN([LC_CONFIG_LRU_RESIZE], [
215 AC_MSG_CHECKING([whether to enable lru self-adjusting])
216 AC_ARG_ENABLE([lru_resize],
217 AS_HELP_STRING([--enable-lru-resize],
218 [enable lru resize support]),
219 [], [enable_lru_resize="yes"])
220 AC_MSG_RESULT([$enable_lru_resize])
221 AS_IF([test "x$enable_lru_resize" != xno], [
222 AC_DEFINE(HAVE_LRU_RESIZE_SUPPORT, 1, [Enable lru resize support])
223 AC_SUBST(ENABLE_LRU_RESIZE, yes)
225 AC_SUBST(ENABLE_LRU_RESIZE, no)
227 ]) # LC_CONFIG_LRU_RESIZE
232 # Quota support. The kernel must support CONFIG_QUOTA.
234 AC_DEFUN([LC_SRC_CONFIG_QUOTA], [
235 LB2_SRC_CHECK_CONFIG_IM([QUOTA])
237 AC_DEFUN([LC_CONFIG_QUOTA], [
238 LB2_TEST_CHECK_CONFIG_IM([QUOTA],[],[AC_MSG_ERROR(
239 [Lustre quota requires that CONFIG_QUOTA is enabled in your kernel.])])
245 # fhandle kernel support for open_by_handle_at() and name_to_handle_at()
246 # system calls. The kernel must support CONFIG_FHANDLE.
248 AC_DEFUN([LC_SRC_CONFIG_FHANDLE], [
249 LB2_SRC_CHECK_CONFIG_IM([FHANDLE])
251 AC_DEFUN([LC_CONFIG_FHANDLE], [
252 LB2_TEST_CHECK_CONFIG_IM([FHANDLE],[],[AC_MSG_ERROR(
253 [Lustre fid handling requires that CONFIG_FHANDLE is enabled in your kernel.])])
254 ]) # LC_CONFIG_FHANDLE
257 # LC_POSIX_ACL_CONFIG
261 AC_DEFUN([LC_SRC_POSIX_ACL_CONFIG], [
262 LB2_SRC_CHECK_CONFIG_IM([FS_POSIX_ACL])
264 AC_DEFUN([LC_POSIX_ACL_CONFIG], [
265 LB2_TEST_CHECK_CONFIG_IM([FS_POSIX_ACL],
266 [AC_DEFINE(CONFIG_LUSTRE_FS_POSIX_ACL, 1, [Enable POSIX acl])],
268 ]) # LC_POSIX_ACL_CONFIG
270 # CRYPTO_MD5 check and warn only if GSS is not disabled.
273 # LC_CONFIG_GSS_KEYRING
275 # default 'auto', tests for dependencies, if found, enables;
276 # only called if gss is enabled
278 AC_DEFUN([LC_CONFIG_GSS_KEYRING], [
279 AC_MSG_CHECKING([whether to enable gss keyring backend])
280 AC_ARG_ENABLE([gss_keyring],
281 [AS_HELP_STRING([--disable-gss-keyring],
282 [disable gss keyring backend])],
283 [], [AS_IF([test "x$enable_gss" != xno], [
284 enable_gss_keyring="yes"], [
285 enable_gss_keyring="auto"])])
286 AC_MSG_RESULT([$enable_gss_keyring])
287 AS_IF([test "x$enable_gss_keyring" != xno], [
288 LB_CHECK_CONFIG_IM([KEYS], [], [
289 gss_keyring_conf_test="fail"
290 AC_MSG_WARN([GSS keyring backend requires that CONFIG_KEYS be enabled in your kernel.])])
292 AC_CHECK_LIB([keyutils], [keyctl_search], [], [
293 gss_keyring_conf_test="fail"
294 AC_MSG_WARN([GSS keyring backend requires libkeyutils])])
296 AS_IF([test "x$gss_keyring_conf_test" != xfail], [
297 AC_DEFINE([HAVE_GSS_KEYRING], [1],
298 [Define this if you enable gss keyring backend])
299 enable_gss_keyring="yes"
301 AS_IF([test "x$enable_gss_keyring" = xyes], [
302 AC_MSG_ERROR([Cannot enable gss_keyring. See above for details.])
309 ]) # LC_CONFIG_GSS_KEYRING
312 # LC_KEY_TYPE_INSTANTIATE_2ARGS
314 # rhel7 key_type->instantiate takes 2 args (struct key, struct key_preparsed_payload)
316 AC_DEFUN([LC_SRC_KEY_TYPE_INSTANTIATE_2ARGS], [
317 LB2_LINUX_TEST_SRC([key_type_instantiate_2args], [
318 #include <linux/key-type.h>
320 ((struct key_type *)0)->instantiate(0, NULL);
323 AC_DEFUN([LC_KEY_TYPE_INSTANTIATE_2ARGS], [
324 LB2_MSG_LINUX_TEST_RESULT([if 'key_type->instantiate' has two args],
325 [key_type_instantiate_2args], [
326 AC_DEFINE(HAVE_KEY_TYPE_INSTANTIATE_2ARGS, 1,
327 [key_type->instantiate has two args])
329 ]) # LC_KEY_TYPE_INSTANTIATE_2ARGS
334 AC_DEFUN([LC_CONFIG_SUNRPC], [
335 LB_CHECK_CONFIG_IM([SUNRPC], [], [
336 AS_IF([test "x$sunrpc_required" = xyes], [
339 kernel SUNRPC support is required by using GSS.
342 ]) # LC_CONFIG_SUNRPC
345 # LC_CONFIG_GSS (default 'auto' (tests for dependencies, if found, enables))
347 # Build gss and related tools of Lustre. Currently both kernel and user space
348 # parts are depend on linux platform.
350 AC_DEFUN([LC_CONFIG_GSS], [
351 AC_MSG_CHECKING([whether to enable gss support])
353 [AS_HELP_STRING([--enable-gss], [enable gss support])],
354 [], [enable_gss="auto"])
355 AC_MSG_RESULT([$enable_gss])
357 AC_ARG_VAR([TEST_JOBS],
358 [simultaneous jobs during configure (defaults to $(nproc))])
359 if test "x$ac_cv_env_TEST_JOBS_set" != "xset"; then
360 TEST_JOBS=${TEST_JOBS:-$(nproc)}
364 AC_ARG_VAR([TEST_DIR],
365 [location of temporary parallel configure tests (defaults to $PWD/lb2)])
366 TEST_DIR=${TEST_DIR:-${ac_pwd}/_lpb}
369 AS_IF([test "x$enable_gss" != xno], [
370 LC_CONFIG_GSS_KEYRING
372 sunrpc_required=$enable_gss
376 require_krb5=$enable_gss
380 AS_IF([test -n "$KRBDIR"], [
381 gss_conf_test="success"
383 gss_conf_test="failure"
386 AS_IF([test "x$gss_conf_test" = xsuccess && test "x$enable_gss" != xno], [
387 AC_DEFINE([HAVE_GSS], [1], [Define this is if you enable gss])
390 enable_gss_keyring="no"
394 AS_IF([test "x$enable_ssk" != xno], [
395 enable_ssk=$enable_gss
398 enable_gss_keyring="no"
404 # OpenSSL 1.0+ return int for HMAC functions but older SLES11 versions do not
405 AC_DEFUN([LC_OPENSSL_HMAC], [
406 has_hmac_functions="no"
407 saved_flags="$CFLAGS"
409 AC_MSG_CHECKING([whether OpenSSL has HMAC_Init_ex])
410 AS_IF([test "x$enable_ssk" != xno], [
411 AC_COMPILE_IFELSE([AC_LANG_SOURCE([
412 #include <openssl/hmac.h>
413 #include <openssl/evp.h>
417 rc = HMAC_Init_ex(NULL, "test", 4, EVP_md_null(), NULL);
421 has_hmac_functions="yes"
424 AC_MSG_RESULT([$has_hmac_functions])
425 CFLAGS="$saved_flags"
428 # LC_OPENSSL_EVP_PKEY
430 # OpenSSL 3.0 introduces EVP_PKEY_get_params
431 AC_DEFUN([LC_OPENSSL_EVP_PKEY], [
433 saved_flags="$CFLAGS"
435 AC_MSG_CHECKING([whether OpenSSL has EVP_PKEY_get_params])
436 AS_IF([test "x$enable_ssk" != xno], [
437 AC_COMPILE_IFELSE([AC_LANG_SOURCE([
438 #include <openssl/evp.h>
443 int rc = EVP_PKEY_get_params(NULL, params);
447 AC_DEFINE(HAVE_OPENSSL_EVP_PKEY, 1, [OpenSSL EVP_PKEY_get_params])
451 CFLAGS="$saved_flags"
452 AC_MSG_RESULT([$has_evp_pkey])
453 ]) # LC_OPENSSL_EVP_PKEY
458 # Check whether to enable Lustre client crypto
460 AC_DEFUN([LC_OPENSSL_SSK], [
461 AS_IF([test "x$enable_ssk" != xno], [
465 AS_IF([test "x$has_hmac_functions" = xyes -o "x$has_evp_pkey" = xyes], [
466 AC_DEFINE(HAVE_OPENSSL_SSK, 1, [OpenSSL HMAC functions needed for SSK])
470 AC_MSG_CHECKING([whether OpenSSL has functions needed for SSK])
471 AC_MSG_RESULT([$enable_ssk])
474 # LC_OPENSSL_GETSEPOL
476 # OpenSSL is needed for l_getsepol
477 AC_DEFUN([LC_OPENSSL_GETSEPOL], [
478 saved_flags="$CFLAGS"
480 AC_MSG_CHECKING([whether openssl-devel is present])
481 AC_COMPILE_IFELSE([AC_LANG_SOURCE([
482 #include <openssl/evp.h>
485 EVP_MD_CTX *mdctx = EVP_MD_CTX_create();
489 AC_DEFINE(HAVE_OPENSSL_GETSEPOL, 1, [openssl-devel is present])
490 enable_getsepol="yes"
496 No openssl-devel headers found, unable to build l_getsepol and SELinux status checking
499 AC_MSG_RESULT([$enable_getsepol])
500 CFLAGS="$saved_flags"
501 ]) # LC_OPENSSL_GETSEPOL
504 AC_DEFUN([LC_HAVE_LIBAIO], [
505 AC_CHECK_HEADER([libaio.h],
507 AC_MSG_WARN([libaio is not installed on the system]))
511 # LC_INVALIDATE_RANGE
513 # 3.11 invalidatepage requires the length of the range to invalidate
515 AC_DEFUN([LC_SRC_INVALIDATE_RANGE], [
516 LB2_LINUX_TEST_SRC([address_space_ops_invalidatepage_3args], [
517 #include <linux/fs.h>
519 struct address_space_operations a_ops;
520 a_ops.invalidatepage(NULL, 0, 0);
523 AC_DEFUN([LC_INVALIDATE_RANGE], [
525 [if 'address_space_operations.invalidatepage' requires 3 arguments])
526 LB2_LINUX_TEST_RESULT([address_space_ops_invalidatepage_3args], [
527 AC_DEFINE(HAVE_INVALIDATE_RANGE, 1,
528 [address_space_operations.invalidatepage needs 3 arguments])
530 ]) # LC_INVALIDATE_RANGE
533 # LC_HAVE_DIR_CONTEXT
535 # 3.11 readdir now takes the new struct dir_context
537 AC_DEFUN([LC_SRC_HAVE_DIR_CONTEXT], [
538 LB2_LINUX_TEST_SRC([dir_context], [
539 #include <linux/fs.h>
541 #ifdef FMODE_KABI_ITERATE
542 #error "back to use readdir in kabi_extand mode"
544 struct dir_context ctx;
550 AC_DEFUN([LC_HAVE_DIR_CONTEXT], [
551 LB2_MSG_LINUX_TEST_RESULT([if 'dir_context' exist],
553 AC_DEFINE(HAVE_DIR_CONTEXT, 1, [dir_context exist])
555 ]) # LC_HAVE_DIR_CONTEXT
560 # 3.11 dentry_operations.d_compare() taken 5 arguments.
562 AC_DEFUN([LC_SRC_D_COMPARE_5ARGS], [
563 LB2_LINUX_TEST_SRC([d_compare_5args], [
564 #include <linux/dcache.h>
566 ((struct dentry_operations*)0)->d_compare(NULL,NULL,0,NULL,NULL);
569 AC_DEFUN([LC_D_COMPARE_5ARGS], [
570 LB2_MSG_LINUX_TEST_RESULT([if 'd_compare' taken 5 arguments],
572 AC_DEFINE(HAVE_D_COMPARE_5ARGS, 1,
573 [d_compare need 5 arguments])
575 ]) # LC_D_COMPARE_5ARGS
580 # 3.11 need to access d_count to get dentry reference count
582 AC_DEFUN([LC_SRC_HAVE_DCOUNT], [
583 LB2_LINUX_TEST_SRC([d_count], [
584 #include <linux/dcache.h>
586 struct dentry de = { };
589 count = d_count(&de);
592 AC_DEFUN([LC_HAVE_DCOUNT], [
593 LB2_MSG_LINUX_TEST_RESULT([if 'd_count' exists],
595 AC_DEFINE(HAVE_D_COUNT, 1, [d_count exist])
600 # LC_PID_NS_FOR_CHILDREN
602 # 3.11 replaces pid_ns by pid_ns_for_children in struct nsproxy
604 AC_DEFUN([LC_SRC_PID_NS_FOR_CHILDREN], [
605 LB2_LINUX_TEST_SRC([pid_ns_for_children], [
606 #include <linux/nsproxy.h>
609 ns.pid_ns_for_children = NULL;
612 AC_DEFUN([LC_PID_NS_FOR_CHILDREN], [
613 LB2_MSG_LINUX_TEST_RESULT([if 'struct nsproxy' has 'pid_ns_for_children'],
614 [pid_ns_for_children], [
615 AC_DEFINE(HAVE_PID_NS_FOR_CHILDREN, 1,
616 ['struct nsproxy' has 'pid_ns_for_children'])
618 ]) # LC_PID_NS_FOR_CHILDREN
621 # LC_OLDSIZE_TRUNCATE_PAGECACHE
623 # 3.12 truncate_pagecache without oldsize parameter
625 AC_DEFUN([LC_SRC_OLDSIZE_TRUNCATE_PAGECACHE], [
626 LB2_LINUX_TEST_SRC([truncate_pagecache_old_size], [
627 #include <linux/mm.h>
629 truncate_pagecache(NULL, 0, 0);
632 AC_DEFUN([LC_OLDSIZE_TRUNCATE_PAGECACHE], [
633 LB2_MSG_LINUX_TEST_RESULT([if 'truncate_pagecache' with 'old_size' parameter],
634 [truncate_pagecache_old_size], [
635 AC_DEFINE(HAVE_OLDSIZE_TRUNCATE_PAGECACHE, 1,
638 ]) # LC_OLDSIZE_TRUNCATE_PAGECACHE
643 # For some reason SLES11SP4 is missing the PTR_ERR_OR_ZERO macro
644 # It was added to linux kernel 3.12
646 AC_DEFUN([LC_SRC_PTR_ERR_OR_ZERO_MISSING], [
647 LB2_LINUX_TEST_SRC([is_err_or_null], [
648 #include <linux/err.h>
650 if (PTR_ERR_OR_ZERO(NULL)) return 0;
653 AC_DEFUN([LC_PTR_ERR_OR_ZERO_MISSING], [
654 LB2_MSG_LINUX_TEST_RESULT([if 'PTR_ERR_OR_ZERO' is missing],
656 AC_DEFINE(HAVE_PTR_ERR_OR_ZERO, 1,
657 ['PTR_ERR_OR_ZERO' exist])
659 ]) # LC_PTR_ERR_OR_ZERO_MISSING
662 # LC_HAVE_DENTRY_D_U_D_ALIAS
664 # 3.11 kernel moved d_alias to the union d_u in struct dentry
666 # Some distros move d_alias to d_u but it is still a struct list
668 AC_DEFUN([LC_SRC_HAVE_DENTRY_D_U_D_ALIAS_LIST], [
669 LB2_LINUX_TEST_SRC([d_alias_list], [
670 #include <linux/list.h>
671 #include <linux/dcache.h>
674 INIT_LIST_HEAD(&de.d_u.d_alias);
677 AC_DEFUN([LC_HAVE_DENTRY_D_U_D_ALIAS_LIST], [
678 LB2_MSG_LINUX_TEST_RESULT([if list 'dentry.d_u.d_alias' exist],
680 AC_DEFINE(HAVE_DENTRY_D_U_D_ALIAS, 1,
681 [list dentry.d_u.d_alias exist])
683 ]) # LC_HAVE_DENTRY_D_U_D_ALIAS_LIST
686 # LC_HAVE_DENTRY_D_U_D_ALIAS_HLIST
688 # Some distros move d_alias to d_u and it is an hlist
690 AC_DEFUN([LC_SRC_HAVE_DENTRY_D_U_D_ALIAS_HLIST], [
691 LB2_LINUX_TEST_SRC([d_alias_hlist], [
692 #include <linux/list.h>
693 #include <linux/dcache.h>
696 INIT_HLIST_NODE(&de.d_u.d_alias);
699 AC_DEFUN([LC_HAVE_DENTRY_D_U_D_ALIAS_HLIST], [
700 LB2_MSG_LINUX_TEST_RESULT([if hlist 'dentry.d_u.d_alias' exist],
702 AC_DEFINE(HAVE_DENTRY_D_U_D_ALIAS, 1,
703 [list dentry.d_u.d_alias exist])
705 ]) # LC_HAVE_DENTRY_D_U_D_ALIAS_HLIST
709 # LC_HAVE_DENTRY_D_CHILD
711 # 3.11 kernel d_child has been moved out of the union d_u
714 AC_DEFUN([LC_SRC_HAVE_DENTRY_D_CHILD], [
715 LB2_LINUX_TEST_SRC([d_child], [
716 #include <linux/list.h>
717 #include <linux/dcache.h>
720 INIT_LIST_HEAD(&de.d_child);
723 AC_DEFUN([LC_HAVE_DENTRY_D_CHILD], [
724 LB2_MSG_LINUX_TEST_RESULT([if 'dentry.d_child' exist],
726 AC_DEFINE(HAVE_DENTRY_D_CHILD, 1, [dentry.d_child exist])
728 ]) # LC_HAVE_DENTRY_D_CHILD
733 # 3.12 ki_left removed from struct kiocb
735 AC_DEFUN([LC_SRC_KIOCB_KI_LEFT], [
736 LB2_LINUX_TEST_SRC([kiocb_ki_left], [
737 #include <linux/aio.h>
739 ((struct kiocb*)0)->ki_left = 0;
742 AC_DEFUN([LC_KIOCB_KI_LEFT], [
743 LB2_MSG_LINUX_TEST_RESULT([if 'struct kiocb' with 'ki_left' member],
745 AC_DEFINE(HAVE_KIOCB_KI_LEFT, 1,
748 ]) # LC_KIOCB_KI_LEFT
751 # LC_REGISTER_SHRINKER_RET
753 # v3.11-8748-g1d3d4437eae1 register_shrinker returns a status
755 AC_DEFUN([LC_SRC_REGISTER_SHRINKER_RET], [
756 LB2_LINUX_TEST_SRC([register_shrinker_ret], [
757 #include <linux/mm.h>
759 if (register_shrinker(NULL))
760 unregister_shrinker(NULL);
763 AC_DEFUN([LC_REGISTER_SHRINKER_RET], [
764 LB2_MSG_LINUX_TEST_RESULT([if register_shrinker() returns status],
765 [register_shrinker_ret], [
766 AC_DEFINE(HAVE_REGISTER_SHRINKER_RET, 1,
767 [register_shrinker() returns status])
769 ]) # LC_REGISTER_SHRINKER_RET
772 # LC_VFS_RENAME_5ARGS
774 # 3.13 has vfs_rename with 5 args
776 AC_DEFUN([LC_SRC_VFS_RENAME_5ARGS], [
777 LB2_LINUX_TEST_SRC([vfs_rename_5args], [
778 #include <linux/fs.h>
780 vfs_rename(NULL, NULL, NULL, NULL, NULL);
783 AC_DEFUN([LC_VFS_RENAME_5ARGS], [
784 LB2_MSG_LINUX_TEST_RESULT([if Linux kernel has 'vfs_rename' with 5 args],
785 [vfs_rename_5args], [
786 AC_DEFINE(HAVE_VFS_RENAME_5ARGS, 1,
787 [kernel has vfs_rename with 5 args])
789 ]) # LC_VFS_RENAME_5ARGS
792 # LC_VFS_UNLINK_3ARGS
794 # 3.13 has vfs_unlink with 3 args
796 AC_DEFUN([LC_SRC_VFS_UNLINK_3ARGS], [
797 LB2_LINUX_TEST_SRC([vfs_unlink_3args], [
798 #include <linux/fs.h>
800 vfs_unlink(NULL, NULL, NULL);
803 AC_DEFUN([LC_VFS_UNLINK_3ARGS], [
804 LB2_MSG_LINUX_TEST_RESULT([if Linux kernel has 'vfs_unlink' with 3 args],
805 [vfs_unlink_3args], [
806 AC_DEFINE(HAVE_VFS_UNLINK_3ARGS, 1,
807 [kernel has vfs_unlink with 3 args])
809 ]) # LC_VFS_UNLINK_3ARGS
811 # LC_HAVE_D_IS_POSITIVE
813 # Kernel version 3.13 b18825a7c8e37a7cf6abb97a12a6ad71af160de7
814 # d_is_positive is added
816 AC_DEFUN([LC_SRC_HAVE_D_IS_POSITIVE], [
817 LB2_LINUX_TEST_SRC([d_is_positive], [
818 #include <linux/dcache.h>
823 AC_DEFUN([LC_HAVE_D_IS_POSITIVE], [
824 LB2_MSG_LINUX_TEST_RESULT([if 'd_is_positive' exist],
826 AC_DEFINE(HAVE_D_IS_POSITIVE, 1,
827 ['d_is_positive' is available])
829 ]) # LC_HAVE_D_IS_POSITIVE
834 # 3.14 move some of its data in struct bio into the new
837 AC_DEFUN([LC_SRC_HAVE_BVEC_ITER], [
838 LB2_LINUX_TEST_SRC([have_bvec_iter], [
839 #include <linux/bio.h>
841 struct bvec_iter iter;
843 iter.bi_bvec_done = 0;
846 AC_DEFUN([LC_HAVE_BVEC_ITER], [
847 LB2_MSG_LINUX_TEST_RESULT([if Linux kernel has struct bvec_iter],
849 AC_DEFINE(HAVE_BVEC_ITER, 1,
850 [kernel has struct bvec_iter])
852 ]) # LC_HAVE_BVEC_ITER
857 # 3.14 adds set_acl method to inode_operations
858 # see kernel commit 893d46e443346370cd4ea81d9d35f72952c62a37
860 AC_DEFUN([LC_SRC_IOP_SET_ACL], [
861 LB2_LINUX_TEST_SRC([inode_ops_set_acl], [
862 #include <linux/fs.h>
864 struct inode_operations iop;
868 AC_DEFUN([LC_IOP_SET_ACL], [
869 LB2_MSG_LINUX_TEST_RESULT([if 'inode_operations' has '.set_acl' member function],
870 [inode_ops_set_acl], [
871 AC_DEFINE(HAVE_IOP_SET_ACL, 1,
872 [inode_operations has .set_acl member function])
877 # LC_HAVE_TRUNCATE_IPAGE_FINAL
879 # 3.14 bring truncate_inode_pages_final for evict_inode
881 AC_DEFUN([LC_SRC_HAVE_TRUNCATE_IPAGES_FINAL], [
882 LB2_LINUX_TEST_SRC([truncate_ipages_final], [
883 #include <linux/mm.h>
885 truncate_inode_pages_final(NULL);
888 AC_DEFUN([LC_HAVE_TRUNCATE_IPAGES_FINAL], [
889 LB2_MSG_LINUX_TEST_RESULT([if Linux kernel has truncate_inode_pages_final],
890 [truncate_ipages_final], [
891 AC_DEFINE(HAVE_TRUNCATE_INODE_PAGES_FINAL, 1,
892 [kernel has truncate_inode_pages_final])
894 ]) # LC_HAVE_TRUNCATE_IPAGES_FINAL
897 # LC_IOPS_RENAME_WITH_FLAGS
899 # 3.14 has inode_operations->rename with 5 args
900 # commit 520c8b16505236fc82daa352e6c5e73cd9870cff
902 AC_DEFUN([LC_SRC_IOPS_RENAME_WITH_FLAGS], [
903 LB2_LINUX_TEST_SRC([iops_rename_with_flags], [
904 #include <linux/fs.h>
906 struct inode *i1 = NULL, *i2 = NULL;
907 struct dentry *d1 = NULL, *d2 = NULL;
909 rc = ((struct inode_operations *)0)->rename(i1, d1, i2, d2, 0);
911 ]) # LC_IOPS_RENAME_WITH_FLAGS
912 AC_DEFUN([LC_IOPS_RENAME_WITH_FLAGS], [
913 LB2_MSG_LINUX_TEST_RESULT([if 'inode_operations->rename' taken flags as argument],
914 [iops_rename_with_flags], [
915 AC_DEFINE(HAVE_IOPS_RENAME_WITH_FLAGS, 1,
916 [inode_operations->rename need flags as argument])
918 ]) # LC_IOPS_RENAME_WITH_FLAGS
921 # LC_VFS_RENAME_6ARGS
923 # 3.15 has vfs_rename with 6 args
925 AC_DEFUN([LC_SRC_VFS_RENAME_6ARGS], [
926 LB2_LINUX_TEST_SRC([vfs_rename_6args], [
927 #include <linux/fs.h>
929 vfs_rename(NULL, NULL, NULL, NULL, NULL, NULL);
932 AC_DEFUN([LC_VFS_RENAME_6ARGS], [
933 LB2_MSG_LINUX_TEST_RESULT([if Linux kernel has 'vfs_rename' with 6 args],
934 [vfs_rename_6args], [
935 AC_DEFINE(HAVE_VFS_RENAME_6ARGS, 1,
936 [kernel has vfs_rename with 6 args])
938 ]) # LC_VFS_RENAME_6ARGS
941 # LC_DIRECTIO_USE_ITER
943 # 3.16 kernel changes direct IO to use iov_iter
945 AC_DEFUN([LC_SRC_DIRECTIO_USE_ITER], [
946 LB2_LINUX_TEST_SRC([direct_io_iter], [
947 #include <linux/fs.h>
949 struct address_space_operations ops = { };
950 struct iov_iter *iter = NULL;
953 ops.direct_IO(0, NULL, iter, offset);
956 AC_DEFUN([LC_DIRECTIO_USE_ITER], [
957 LB2_MSG_LINUX_TEST_RESULT([if direct IO uses iov_iter],
959 AC_DEFINE(HAVE_DIRECTIO_ITER, 1, [direct IO uses iov_iter])
961 ]) # LC_DIRECTIO_USE_ITER
964 # LC_HAVE_IOV_ITER_INIT_DIRECTION
967 # 3.16 linux commit 71d8e532b1549a478e6a6a8a44f309d050294d00
968 # changed iov_iter_init api to start accepting a tag
969 # that defines if its a read or write operation
971 AC_DEFUN([LC_SRC_HAVE_IOV_ITER_INIT_DIRECTION], [
972 LB2_LINUX_TEST_SRC([iter_init], [
973 #include <linux/uio.h>
974 #include <linux/fs.h>
976 const struct iovec *iov = NULL;
978 iov_iter_init(NULL, READ, iov, 1, 0);
981 AC_DEFUN([LC_HAVE_IOV_ITER_INIT_DIRECTION], [
982 LB2_MSG_LINUX_TEST_RESULT([if 'iov_iter_init' takes a tag],
984 AC_DEFINE(HAVE_IOV_ITER_INIT_DIRECTION, 1,
985 [iov_iter_init handles directional tag])
987 ]) # LC_HAVE_IOV_ITER_INIT_DIRECTION
990 # LC_HAVE_IOV_ITER_TRUNCATE
993 # 3.16 introduces a new API iov_iter_truncate()
995 AC_DEFUN([LC_SRC_HAVE_IOV_ITER_TRUNCATE], [
996 LB2_LINUX_TEST_SRC([iter_truncate], [
997 #include <linux/uio.h>
998 #include <linux/fs.h>
1000 struct iov_iter *i = NULL;
1002 iov_iter_truncate(i, 0);
1005 AC_DEFUN([LC_HAVE_IOV_ITER_TRUNCATE], [
1006 LB2_MSG_LINUX_TEST_RESULT([if 'iov_iter_truncate' exists],
1008 AC_DEFINE(HAVE_IOV_ITER_TRUNCATE, 1, [iov_iter_truncate exists])
1010 ]) # LC_HAVE_IOV_ITER_TRUNCATE
1013 # LC_HAVE_FILE_OPERATIONS_READ_WRITE_ITER
1015 # 3.16 introduces [read|write]_iter to struct file_operations
1017 AC_DEFUN([LC_SRC_HAVE_FILE_OPERATIONS_READ_WRITE_ITER], [
1018 LB2_LINUX_TEST_SRC([file_function_iter], [
1019 #include <linux/fs.h>
1021 ((struct file_operations *)NULL)->read_iter(NULL, NULL);
1022 ((struct file_operations *)NULL)->write_iter(NULL, NULL);
1025 AC_DEFUN([LC_HAVE_FILE_OPERATIONS_READ_WRITE_ITER], [
1026 LB2_MSG_LINUX_TEST_RESULT([if 'file_operations.[read|write]_iter' exist],
1027 [file_function_iter], [
1028 AC_DEFINE(HAVE_FILE_OPERATIONS_READ_WRITE_ITER, 1,
1029 [file_operations.[read|write]_iter functions exist])
1031 ]) # LC_HAVE_FILE_OPERATIONS_READ_WRITE_ITER
1034 # LC_PAGECACHE_GET_PAGE
1036 # Kernel version 3.16 commit 2457aec63745e235bcafb7ef312b182d8682f0fc
1037 # @pagecache_get_page was introduced since Linux 3.16
1039 AC_DEFUN([LC_SRC_PAGECACHE_GET_PAGE], [
1040 LB2_LINUX_TEST_SRC([pagecache_get_page], [
1041 #include <linux/pagemap.h>
1043 pagecache_get_page(NULL, 0, 0, 0);
1046 AC_DEFUN([LC_PAGECACHE_GET_PAGE], [
1047 LB2_MSG_LINUX_TEST_RESULT([if 'pagecache_get_page' exists],
1048 [pagecache_get_page], [
1049 AC_DEFINE(HAVE_PAGECACHE_GET_PAGE, 1,
1050 ['pagecache_get_page' is available])
1052 ]) # LC_PAGECACHE_GET_PAGE
1055 # LC_HAVE_INTERVAL_BLK_INTEGRITY
1057 # 3.17 replace sector_size with interval in struct blk_integrity
1059 AC_DEFUN([LC_SRC_HAVE_INTERVAL_BLK_INTEGRITY], [
1060 LB2_LINUX_TEST_SRC([interval_blk_integrity], [
1061 #include <linux/blkdev.h>
1063 ((struct blk_integrity *)0)->interval = 0;
1066 AC_DEFUN([LC_HAVE_INTERVAL_BLK_INTEGRITY], [
1067 LB2_MSG_LINUX_TEST_RESULT([if 'blk_integrity.interval' exist],
1068 [interval_blk_integrity], [
1069 AC_DEFINE(HAVE_INTERVAL_BLK_INTEGRITY, 1,
1070 [blk_integrity.interval exist])
1072 ]) # LC_HAVE_INTERVAL_BLK_INTEGRITY
1077 # 3.17 replaces key_type::match with match_preparse
1078 # and has new struct key_match_data
1080 AC_DEFUN([LC_SRC_KEY_MATCH_DATA], [
1081 LB2_LINUX_TEST_SRC([key_match], [
1082 #include <linux/key-type.h>
1084 struct key_match_data data;
1086 data.raw_data = NULL;
1089 AC_DEFUN([LC_KEY_MATCH_DATA], [
1090 LB2_MSG_LINUX_TEST_RESULT([if struct key_match field exist],
1092 AC_DEFINE(HAVE_KEY_MATCH_DATA, 1, [struct key_match_data exist])
1094 ]) # LC_KEY_MATCH_DATA
1097 # LC_HAVE_BLK_INTEGRITY_ITER
1099 # Linux commit v3.17-rc5-69-g1859308853b1 replaces
1100 # struct blk_integrity_exchg with struct blk_integrity_iter
1102 # LB_CHECK_LINUX_HEADER has already run so we can rely on
1103 # HAVE_LINUX_BLK_INTEGRITY_HEADER being set correctly before
1106 AC_DEFUN([LC_SRC_HAVE_BLK_INTEGRITY_ITER], [
1107 LB2_LINUX_TEST_SRC([blk_integrity_iter], [
1108 #ifdef HAVE_LINUX_BLK_INTEGRITY_HEADER
1109 # include <linux/blk-integrity.h>
1111 # include <linux/blkdev.h>
1114 struct blk_integrity_iter iter;
1116 iter.prot_buf = NULL;
1119 AC_DEFUN([LC_HAVE_BLK_INTEGRITY_ITER], [
1120 LB2_MSG_LINUX_TEST_RESULT([if struct blk_integrity_iter exist],
1121 [blk_integrity_iter], [
1122 AC_DEFINE(HAVE_BLK_INTEGRITY_ITER, 1,
1123 [kernel has struct blk_integrity_iter])
1125 ]) # LC_HAVE_BLK_INTEGRITY_ITER
1128 # LC_NFS_FILLDIR_USE_CTX
1130 # 3.18 kernel moved from void cookie to struct dir_context
1132 AC_DEFUN([LC_SRC_NFS_FILLDIR_USE_CTX], [
1133 LB2_LINUX_TEST_SRC([filldir_ctx], [
1134 #include <linux/fs.h>
1136 int filldir(struct dir_context *ctx, const char* name,
1137 int i, loff_t off, u64 tmp, unsigned temp)
1142 struct dir_context ctx = {
1146 ctx.actor(NULL, "test", 0, (loff_t) 0, 0, 0);
1149 AC_DEFUN([LC_NFS_FILLDIR_USE_CTX], [
1150 LB2_MSG_LINUX_TEST_RESULT([if filldir_t uses struct dir_context],
1152 AC_DEFINE(HAVE_FILLDIR_USE_CTX, 1,
1153 [filldir_t needs struct dir_context as argument])
1155 ]) # LC_NFS_FILLDIR_USE_CTX
1158 # LC_PERCPU_COUNTER_INIT
1160 # 3.18 For kernels 3.18 and after percpu_counter_init starts
1161 # to pass a GFP_* memory allocation flag for internal
1162 # memory allocation purposes.
1164 AC_DEFUN([LC_SRC_PERCPU_COUNTER_INIT], [
1165 LB2_LINUX_TEST_SRC([percpu_counter_init], [
1166 #include <linux/percpu_counter.h>
1168 percpu_counter_init(NULL, 0, GFP_KERNEL);
1171 AC_DEFUN([LC_PERCPU_COUNTER_INIT], [
1172 LB2_MSG_LINUX_TEST_RESULT([if percpu_counter_init uses GFP_* flag as argument],
1173 [percpu_counter_init], [
1174 AC_DEFINE(HAVE_PERCPU_COUNTER_INIT_GFP_FLAG, 1,
1175 [percpu_counter_init uses GFP_* flag])
1177 ]) # LC_PERCPU_COUNTER_INIT
1180 # LC_KIOCB_HAS_NBYTES
1182 # 3.19 kernel removed ki_nbytes from struct kiocb
1184 AC_DEFUN([LC_SRC_KIOCB_HAS_NBYTES], [
1185 LB2_LINUX_TEST_SRC([ki_nbytes], [
1186 #include <linux/fs.h>
1188 struct kiocb iocb = { };
1193 AC_DEFUN([LC_KIOCB_HAS_NBYTES], [
1194 LB2_MSG_LINUX_TEST_RESULT([if struct kiocb has ki_nbytes field],
1196 AC_DEFINE(HAVE_KI_NBYTES, 1, [ki_nbytes field exist])
1198 ]) # LC_KIOCB_HAS_NBYTES
1201 # LC_HAVE_DQUOT_QC_DQBLK
1203 # 3.19 has quotactl_ops->[sg]et_dqblk that take struct kqid and qc_dqblk
1204 # Added in commit 14bf61ffe
1206 AC_DEFUN([LC_SRC_HAVE_DQUOT_QC_DQBLK], [
1207 LB2_LINUX_TEST_SRC([qc_dqblk], [
1208 #include <linux/fs.h>
1209 #include <linux/quota.h>
1211 ((struct quotactl_ops *)0)->set_dqblk(NULL, *((struct kqid*)0), (struct qc_dqblk*)0);
1214 AC_DEFUN([LC_HAVE_DQUOT_QC_DQBLK], [
1215 LB2_MSG_LINUX_TEST_RESULT([if 'quotactl_ops.set_dqblk' takes struct qc_dqblk],
1217 AC_DEFINE(HAVE_DQUOT_QC_DQBLK, 1,
1218 [quotactl_ops.set_dqblk takes struct qc_dqblk])
1219 AC_DEFINE(HAVE_DQUOT_KQID, 1,
1220 [quotactl_ops.set_dqblk takes struct kqid])
1222 ]) # LC_HAVE_DQUOT_QC_DQBLK
1225 # LC_HAVE_AIO_COMPLETE
1227 # 3.19 kernel makes aio_complete() static
1229 AC_DEFUN([LC_SRC_HAVE_AIO_COMPLETE], [
1230 LB2_LINUX_TEST_SRC([aio_complete], [
1231 #include <linux/aio.h>
1233 aio_complete(NULL, 0, 0);
1236 AC_DEFUN([LC_HAVE_AIO_COMPLETE], [
1237 LB2_MSG_LINUX_TEST_RESULT([if kernel has exported aio_complete()],
1239 AC_DEFINE(HAVE_AIO_COMPLETE, 1, [aio_complete defined])
1241 ]) # LC_HAVE_AIO_COMPLETE
1244 # LC_HAVE_IS_ROOT_INODE
1246 # 3.19 kernel adds is_root_inode()
1247 # Commit a7400222e3eb ("new helper: is_root_inode()")
1249 AC_DEFUN([LC_SRC_HAVE_IS_ROOT_INODE], [
1250 LB2_LINUX_TEST_SRC([is_root_inode], [
1251 #include <linux/fs.h>
1253 is_root_inode(NULL);
1256 AC_DEFUN([LC_HAVE_IS_ROOT_INODE], [
1257 LB2_MSG_LINUX_TEST_RESULT([if kernel has is_root_inode()],
1259 AC_DEFINE(HAVE_IS_ROOT_INODE, 1, [is_root_inode defined])
1261 ]) # LC_HAVE_IS_ROOT_INODE
1264 # LC_BACKING_DEV_INFO_REMOVAL
1266 # 3.20 kernel removed backing_dev_info from address_space
1268 AC_DEFUN([LC_SRC_BACKING_DEV_INFO_REMOVAL], [
1269 LB2_LINUX_TEST_SRC([backing_dev_info], [
1270 #include <linux/fs.h>
1272 struct address_space mapping;
1274 mapping.backing_dev_info = NULL;
1277 AC_DEFUN([LC_BACKING_DEV_INFO_REMOVAL], [
1278 LB2_MSG_LINUX_TEST_RESULT([if struct address_space has backing_dev_info],
1279 [backing_dev_info], [
1280 AC_DEFINE(HAVE_BACKING_DEV_INFO, 1, [backing_dev_info exist])
1282 ]) # LC_BACKING_DEV_INFO_REMOVAL
1285 # LC_HAVE_PROJECT_QUOTA
1287 # Kernel version v4.0-rc1-197-g847aac644e92
1289 AC_DEFUN([LC_SRC_HAVE_PROJECT_QUOTA], [
1290 LB2_LINUX_TEST_SRC([get_projid], [
1292 #include <linux/quota.h>
1294 struct dquot_operations ops = { };
1296 ops.get_projid(NULL, NULL);
1299 AC_DEFUN([LC_HAVE_PROJECT_QUOTA], [
1300 LB2_MSG_LINUX_TEST_RESULT([if get_projid exists],
1302 AC_DEFINE(HAVE_PROJECT_QUOTA, 1,
1303 [get_projid function exists])
1305 ]) # LC_HAVE_PROJECT_QUOTA
1310 # 4.1 kernel has iov_iter_rw
1312 AC_DEFUN([LC_SRC_IOV_ITER_RW], [
1313 LB2_LINUX_TEST_SRC([iov_iter_rw], [
1314 #include <linux/fs.h>
1315 #include <linux/uio.h>
1317 struct iov_iter *iter = NULL;
1322 AC_DEFUN([LC_IOV_ITER_RW], [
1323 LB2_MSG_LINUX_TEST_RESULT([if iov_iter_rw exist],
1325 AC_DEFINE(HAVE_IOV_ITER_RW, 1, [iov_iter_rw exist])
1330 # LC_HAVE_SYNC_READ_WRITE
1332 # 4.1 new_sync_[read|write] no longer exported
1334 AC_DEFUN([LC_HAVE_SYNC_READ_WRITE], [
1335 LB_CHECK_EXPORT([new_sync_read], [fs/read_write.c],
1336 [AC_DEFINE(HAVE_SYNC_READ_WRITE, 1,
1337 [new_sync_[read|write] is exported by the kernel])])
1338 ]) # LC_HAVE_SYNC_READ_WRITE
1343 # 4.1 redefined bi_cnt as __bi_cnt in commit dac56212e8127dbc0
1345 AC_DEFUN([LC_SRC_HAVE___BI_CNT], [
1346 LB2_LINUX_TEST_SRC([have___bi_cnt], [
1347 #include <asm/atomic.h>
1348 #include <linux/bio.h>
1349 #include <linux/blk_types.h>
1351 struct bio bio = { };
1353 cnt = atomic_read(&bio.__bi_cnt);
1356 AC_DEFUN([LC_HAVE___BI_CNT], [
1357 LB2_MSG_LINUX_TEST_RESULT([if Linux kernel has __bi_cnt in struct bio],
1359 AC_DEFINE(HAVE___BI_CNT, 1, [struct bio has __bi_cnt])
1361 ]) # LC_HAVE___BI_CNT
1364 # LC_SYMLINK_OPS_USE_NAMEIDATA
1366 # For the 4.2+ kernels the file system internal symlink api no
1367 # longer uses struct nameidata as a argument
1369 AC_DEFUN([LC_SRC_SYMLINK_OPS_USE_NAMEIDATA], [
1370 LB2_LINUX_TEST_SRC([symlink_use_nameidata], [
1371 #include <linux/namei.h>
1372 #include <linux/fs.h>
1374 struct nameidata *nd = NULL;
1376 ((struct inode_operations *)0)->follow_link(NULL, nd);
1377 ((struct inode_operations *)0)->put_link(NULL, nd, NULL);
1380 AC_DEFUN([LC_SYMLINK_OPS_USE_NAMEIDATA], [
1381 LB2_MSG_LINUX_TEST_RESULT([if symlink inode operations have struct nameidata argument],
1382 [symlink_use_nameidata], [
1383 AC_DEFINE(HAVE_SYMLINK_OPS_USE_NAMEIDATA, 1,
1384 [symlink inode operations need struct nameidata argument])
1386 ]) # LC_SYMLINK_OPS_USE_NAMEIDATA
1389 # LC_BIO_ENDIO_USES_ONE_ARG
1391 # 4.2 kernel bio_endio now only takes one argument
1393 AC_DEFUN([LC_SRC_BIO_ENDIO_USES_ONE_ARG], [
1394 LB2_LINUX_TEST_SRC([bio_endio], [
1395 #include <linux/bio.h>
1400 AC_DEFUN([LC_BIO_ENDIO_USES_ONE_ARG], [
1401 LB2_MSG_LINUX_TEST_RESULT([if 'bio_endio' with one argument exist],
1403 AC_DEFINE(HAVE_BIO_ENDIO_USES_ONE_ARG, 1,
1404 [bio_endio takes only one argument])
1406 ]) # LC_BIO_ENDIO_USES_ONE_ARG
1409 # LC_ACCOUNT_PAGE_DIRTIED_3ARGS
1411 # 4.2 [to 4.5] kernel page dirtied takes 3 arguments
1413 AC_DEFUN([LC_SRC_ACCOUNT_PAGE_DIRTIED_3ARGS], [
1414 LB2_LINUX_TEST_SRC([account_page_dirtied_3a], [
1415 #include <linux/mm.h>
1417 account_page_dirtied(NULL, NULL, NULL);
1420 AC_DEFUN([LC_ACCOUNT_PAGE_DIRTIED_3ARGS], [
1421 LB2_MSG_LINUX_TEST_RESULT([if 'account_page_dirtied' with 3 args exists],
1422 [account_page_dirtied_3a], [
1423 AC_DEFINE(HAVE_ACCOUNT_PAGE_DIRTIED_3ARGS, 1,
1424 [account_page_dirtied takes three arguments])
1426 ]) # LC_ACCOUNT_PAGE_DIRTIED_3ARGS
1429 # LC_HAVE_CRYPTO_ALLOC_SKCIPHER
1431 # Kernel version 4.12 commit 7a7ffe65c8c5
1432 # introduced crypto_alloc_skcipher().
1434 AC_DEFUN([LC_SRC_HAVE_CRYPTO_ALLOC_SKCIPHER], [
1435 LB2_LINUX_TEST_SRC([crypto_alloc_skcipher], [
1436 #include <crypto/skcipher.h>
1438 crypto_alloc_skcipher(NULL, 0, 0);
1441 AC_DEFUN([LC_HAVE_CRYPTO_ALLOC_SKCIPHER], [
1442 LB2_MSG_LINUX_TEST_RESULT([if crypto_alloc_skcipher is defined],
1443 [crypto_alloc_skcipher], [
1444 AC_DEFINE(HAVE_CRYPTO_ALLOC_SKCIPHER, 1,
1445 [crypto_alloc_skcipher is defined])
1447 ]) # LC_HAVE_CRYPTO_ALLOC_SKCIPHER
1450 # LC_HAVE_INTERVAL_EXP_BLK_INTEGRITY
1452 # 4.3 replace interval with interval_exp in 'struct blk_integrity'
1453 # 'struct blk_integrity_profile' is also added in this version,
1454 # thus use this to determine whether 'struct blk_integrity' has profile
1456 AC_DEFUN([LC_SRC_HAVE_INTERVAL_EXP_BLK_INTEGRITY], [
1457 LB2_LINUX_TEST_SRC([blk_integrity_interval_exp], [
1458 #include <linux/blkdev.h>
1460 ((struct blk_integrity *)0)->interval_exp = 0;
1463 AC_DEFUN([LC_HAVE_INTERVAL_EXP_BLK_INTEGRITY], [
1464 LB2_MSG_LINUX_TEST_RESULT([if 'blk_integrity.interval_exp' exist],
1465 [blk_integrity_interval_exp], [
1466 AC_DEFINE(HAVE_INTERVAL_EXP_BLK_INTEGRITY, 1,
1467 [blk_integrity.interval_exp exist])
1469 ]) # LC_HAVE_INTERVAL_EXP_BLK_INTEGRITY
1472 # LC_HAVE_CACHE_HEAD_HLIST
1474 # 4.3 kernel swiched to hlist for cache_head
1476 AC_DEFUN([LC_SRC_HAVE_CACHE_HEAD_HLIST], [
1477 LB2_LINUX_TEST_SRC([cache_head_has_hlist], [
1478 #include <linux/sunrpc/cache.h>
1480 do {} while(sizeof(((struct cache_head *)0)->cache_list));
1483 AC_DEFUN([LC_HAVE_CACHE_HEAD_HLIST], [
1484 LB2_MSG_LINUX_TEST_RESULT([if 'struct cache_head' has 'cache_list' field],
1485 [cache_head_has_hlist], [
1486 AC_DEFINE(HAVE_CACHE_HEAD_HLIST, 1,
1487 [cache_head has hlist cache_list])
1489 ]) # LC_HAVE_CACHE_HEAD_HLIST
1492 # LC_HAVE_XATTR_HANDLER_SIMPLIFIED
1494 # Kernel version 4.3 commit e409de992e3ea3674393465f07cc71c948edd87a
1495 # simplified xattr_handler handling by passing in the handler pointer
1497 AC_DEFUN([LC_SRC_HAVE_XATTR_HANDLER_SIMPLIFIED], [
1498 LB2_LINUX_TEST_SRC([xattr_handler_simplified], [
1499 #include <linux/xattr.h>
1501 struct xattr_handler handler;
1503 ((struct xattr_handler *)0)->get(&handler, NULL, NULL, NULL, 0);
1504 ((struct xattr_handler *)0)->set(&handler, NULL, NULL, NULL, 0, 0);
1507 AC_DEFUN([LC_HAVE_XATTR_HANDLER_SIMPLIFIED], [
1508 LB2_MSG_LINUX_TEST_RESULT([if 'struct xattr_handler' functions pass in handler pointer],
1509 [xattr_handler_simplified], [
1510 AC_DEFINE(HAVE_XATTR_HANDLER_SIMPLIFIED, 1,
1511 [handler pointer is parameter])
1513 ]) # LC_HAVE_XATTR_HANDLER_SIMPLIFIED
1516 # LC_HAVE_BIP_ITER_BIO_INTEGRITY_PAYLOAD
1518 # 4.3 replace interval with interval_exp in 'struct blk_integrity'.
1520 AC_DEFUN([LC_SRC_HAVE_BIP_ITER_BIO_INTEGRITY_PAYLOAD], [
1521 LB2_LINUX_TEST_SRC([bio_integrity_payload_bip_iter], [
1522 #include <linux/bio.h>
1524 ((struct bio_integrity_payload *)0)->bip_iter.bi_size = 0;
1527 AC_DEFUN([LC_HAVE_BIP_ITER_BIO_INTEGRITY_PAYLOAD], [
1528 LB2_MSG_LINUX_TEST_RESULT([if 'bio_integrity_payload.bip_iter' exist],
1529 [bio_integrity_payload_bip_iter], [
1530 AC_DEFINE(HAVE_BIP_ITER_BIO_INTEGRITY_PAYLOAD, 1,
1531 [bio_integrity_payload.bip_iter exist])
1533 ]) # LC_HAVE_BIP_ITER_BIO_INTEGRITY_PAYLOAD
1536 # LC_BIO_INTEGRITY_PREP_FN
1538 # Lustre kernel patch extents bio_integrity_prep to accept optional
1539 # generate/verify_fn as extra args.
1541 AC_DEFUN([LC_SRC_BIO_INTEGRITY_PREP_FN], [
1542 LB2_LINUX_TEST_SRC([bio_integrity_prep_fn], [
1543 #include <linux/bio.h>
1545 bio_integrity_prep_fn(NULL, NULL, NULL);
1548 AC_DEFUN([LC_BIO_INTEGRITY_PREP_FN], [
1549 LB2_MSG_LINUX_TEST_RESULT([if 'bio_integrity_prep_fn' exists],
1550 [bio_integrity_prep_fn], [
1551 AC_DEFINE(HAVE_BIO_INTEGRITY_PREP_FN, 1,
1552 [kernel has bio_integrity_prep_fn])
1553 AC_SUBST(PATCHED_INTEGRITY_INTF)
1555 AC_SUBST(PATCHED_INTEGRITY_INTF, [#])
1557 ]) # LC_BIO_INTEGRITY_PREP_FN
1559 # LC_BIO_INTEGRITY_PREP_FN_RETURNS_BOOL
1561 # 13 kernel integrity API has changed and in 4.13+
1562 # (as well as in rhel 8.4) bio_integrity_prep() returns boolean true
1565 AC_DEFUN([LC_SRC_BIO_INTEGRITY_PREP_FN_RETURNS_BOOL], [
1566 LB2_LINUX_TEST_SRC([bio_integrity_prep_ret_bool], [
1567 #include <linux/bio.h>
1568 #include <linux/typecheck.h>
1570 #pragma GCC diagnostic warning "-Werror"
1571 typedef bool (*bio_integrity_prep_type)(struct bio *bio) ;
1573 typecheck_fn(bio_integrity_prep_type, bio_integrity_prep);
1576 AC_DEFUN([LC_BIO_INTEGRITY_PREP_FN_RETURNS_BOOL], [
1577 LB2_MSG_LINUX_TEST_RESULT([if 'bio_integrity_prep_fn' returns bool],
1578 [bio_integrity_prep_ret_bool], [
1579 AC_DEFINE(HAVE_BIO_INTEGRITY_PREP_FN_RETURNS_BOOL, 1,
1580 [bio_integrity_prep_fn returns bool])
1582 ]) # LC_BIO_INTEGRITY_PREP_FN_RETURNS_BOOL
1587 # 4.4/4.8 redefined bi_rw as bi_opf (SLES12/kernel commit 4382e33ad37486)
1589 AC_DEFUN([LC_SRC_HAVE_BI_OPF], [
1590 LB2_LINUX_TEST_SRC([have_bi_opf], [
1591 #include <linux/bio.h>
1598 AC_DEFUN([LC_HAVE_BI_OPF], [
1599 LB2_MSG_LINUX_TEST_RESULT([if Linux kernel has bi_opf in struct bio],
1601 AC_DEFINE(HAVE_BI_OPF, 1, [struct bio has bi_opf])
1606 # LC_HAVE_SUBMIT_BIO_2ARGS
1608 # 4.4 removed an argument from submit_bio
1610 AC_DEFUN([LC_SRC_HAVE_SUBMIT_BIO_2ARGS], [
1611 LB2_LINUX_TEST_SRC([have_submit_bio_2args], [
1612 #include <linux/bio.h>
1615 submit_bio(READ, &bio);
1618 AC_DEFUN([LC_HAVE_SUBMIT_BIO_2ARGS], [
1619 LB2_MSG_LINUX_TEST_RESULT([if submit_bio takes two arguments],
1620 [have_submit_bio_2args], [
1621 AC_DEFINE(HAVE_SUBMIT_BIO_2ARGS, 1,
1622 [submit_bio takes two arguments])
1624 ]) # LC_HAVE_SUBMIT_BIO_2_ARGS
1627 # LC_HAVE_CLEAN_BDEV_ALIASES
1629 # 4.4/4.9 unmap_underlying_metadata was replaced by clean_bdev_aliases
1630 # (SLES12/kernel commit 29f3ad7d8380364c)
1632 AC_DEFUN([LC_SRC_HAVE_CLEAN_BDEV_ALIASES], [
1633 LB2_LINUX_TEST_SRC([have_clean_bdev_aliases], [
1634 #include <linux/buffer_head.h>
1636 clean_bdev_aliases(NULL,1,1);
1639 AC_DEFUN([LC_HAVE_CLEAN_BDEV_ALIASES], [
1640 LB2_MSG_LINUX_TEST_RESULT([if kernel has clean_bdev_aliases],
1641 [have_clean_bdev_aliases], [
1642 AC_DEFINE(HAVE_CLEAN_BDEV_ALIASES, 1,
1643 [kernel has clean_bdev_aliases])
1645 ]) # LC_HAVE_CLEAN_BDEV_ALIASES
1648 # LC_HAVE_LOCKS_LOCK_FILE_WAIT
1650 # 4.4 kernel have moved locks API users to
1651 # locks_lock_inode_wait()
1653 AC_DEFUN([LC_SRC_HAVE_LOCKS_LOCK_FILE_WAIT], [
1654 LB2_LINUX_TEST_SRC([locks_lock_file_wait], [
1655 #include <linux/fs.h>
1657 locks_lock_file_wait(NULL, NULL);
1660 AC_DEFUN([LC_HAVE_LOCKS_LOCK_FILE_WAIT], [
1661 LB2_MSG_LINUX_TEST_RESULT([if 'locks_lock_file_wait' exists],
1662 [locks_lock_file_wait], [
1663 AC_DEFINE(HAVE_LOCKS_LOCK_FILE_WAIT, 1,
1664 [kernel has locks_lock_file_wait])
1666 ]) # LC_HAVE_LOCKS_LOCK_FILE_WAIT
1669 # LC_HAVE_KEY_PAYLOAD_DATA_ARRAY
1671 # 4.4 kernel merged type-specific data with the payload data for keys
1673 AC_DEFUN([LC_SRC_HAVE_KEY_PAYLOAD_DATA_ARRAY], [
1674 LB2_LINUX_TEST_SRC([key_payload_data_array], [
1675 #include <linux/key.h>
1677 struct key key = { };
1679 key.payload.data[0] = NULL;
1682 AC_DEFUN([LC_HAVE_KEY_PAYLOAD_DATA_ARRAY], [
1683 LB2_MSG_LINUX_TEST_RESULT([if 'struct key' has 'payload.data' as an array],
1684 [key_payload_data_array], [
1685 AC_DEFINE(HAVE_KEY_PAYLOAD_DATA_ARRAY, 1, [payload.data is an array])
1687 ]) # LC_HAVE_KEY_PAYLOAD_DATA_ARRAY
1690 # LC_HAVE_XATTR_HANDLER_NAME
1692 # Kernel version 4.4 commit 98e9cb5711c68223f0e4d5201b9a6add255ec550
1693 # add a name member to struct xattr_handler
1695 AC_DEFUN([LC_SRC_HAVE_XATTR_HANDLER_NAME], [
1696 LB2_LINUX_TEST_SRC([xattr_handler_name], [
1697 #include <linux/xattr.h>
1699 ((struct xattr_handler *)NULL)->name = NULL;
1702 AC_DEFUN([LC_HAVE_XATTR_HANDLER_NAME], [
1703 LB2_MSG_LINUX_TEST_RESULT([if 'struct xattr_handler' has a name member],
1704 [xattr_handler_name], [
1705 AC_DEFINE(HAVE_XATTR_HANDLER_NAME, 1,
1706 [xattr_handler has a name member])
1708 ]) # LC_HAVE_XATTR_HANDLER_NAME
1711 # LC_HAVE_FILE_DENTRY
1713 # 4.5 adds wrapper file_dentry
1715 AC_DEFUN([LC_SRC_HAVE_FILE_DENTRY], [
1716 LB2_LINUX_TEST_SRC([file_dentry], [
1717 #include <linux/fs.h>
1722 AC_DEFUN([LC_HAVE_FILE_DENTRY], [
1723 LB2_MSG_LINUX_TEST_RESULT([if Linux kernel has 'file_dentry'],
1725 AC_DEFINE(HAVE_FILE_DENTRY, 1, [kernel has file_dentry])
1727 ]) # LC_HAVE_FILE_DENTRY
1730 # LC_HAVE_INODE_LOCK
1732 # 4.5 introduced inode_lock
1734 AC_DEFUN([LC_SRC_HAVE_INODE_LOCK], [
1735 LB2_LINUX_TEST_SRC([inode_lock], [
1736 #include <linux/fs.h>
1741 AC_DEFUN([LC_HAVE_INODE_LOCK], [
1742 LB2_MSG_LINUX_TEST_RESULT([if 'inode_lock' is defined],
1744 AC_DEFINE(HAVE_INODE_LOCK, 1, [inode_lock is defined])
1746 ]) # LC_HAVE_INODE_LOCK
1749 # LC_HAVE_IOP_GET_LINK
1751 # 4.5 vfs replaced iop->follow_link with
1754 AC_DEFUN([LC_SRC_HAVE_IOP_GET_LINK], [
1755 LB2_LINUX_TEST_SRC([inode_ops_get_link], [
1756 #include <linux/fs.h>
1758 struct inode_operations iop;
1759 iop.get_link = NULL;
1762 AC_DEFUN([LC_HAVE_IOP_GET_LINK], [
1763 LB2_MSG_LINUX_TEST_RESULT([if 'iop' has 'get_link'],
1764 [inode_ops_get_link], [
1765 AC_DEFINE(HAVE_IOP_GET_LINK, 1, [have iop get_link])
1767 ]) # LC_HAVE_IOP_GET_LINK
1770 # LC_HAVE_IN_COMPAT_SYSCALL
1772 # 4.6 renamed is_compat_task to in_compat_syscall
1774 AC_DEFUN([LC_SRC_HAVE_IN_COMPAT_SYSCALL], [
1775 LB2_LINUX_TEST_SRC([in_compat_syscall], [
1776 #include <linux/compat.h>
1778 in_compat_syscall();
1781 AC_DEFUN([LC_HAVE_IN_COMPAT_SYSCALL], [
1782 LB2_MSG_LINUX_TEST_RESULT([if 'in_compat_syscall' is defined],
1783 [in_compat_syscall], [
1784 AC_DEFINE(HAVE_IN_COMPAT_SYSCALL, 1, [have in_compat_syscall])
1786 ]) # LC_HAVE_IN_COMPAT_SYSCALL
1789 # LC_HAVE_XATTR_HANDLER_INODE_PARAM
1791 # Kernel version 4.6 commit b296821a7c42fa58baa17513b2b7b30ae66f3336
1792 # and commit 5930122683dff58f0846b0f0405b4bd598a3ba6a added inode parameter
1793 # to xattr_handler functions
1795 AC_DEFUN([LC_SRC_HAVE_XATTR_HANDLER_INODE_PARAM], [
1796 LB2_LINUX_TEST_SRC([xattr_handler_inode_param], [
1797 #include <linux/xattr.h>
1799 const struct xattr_handler handler;
1801 ((struct xattr_handler *)0)->get(&handler, NULL, NULL, NULL, NULL, 0);
1802 ((struct xattr_handler *)0)->set(&handler, NULL, NULL, NULL, NULL, 0, 0);
1805 AC_DEFUN([LC_HAVE_XATTR_HANDLER_INODE_PARAM], [
1806 LB2_MSG_LINUX_TEST_RESULT([if 'struct xattr_handler' functions have inode parameter],
1807 [xattr_handler_inode_param], [
1808 AC_DEFINE(HAVE_XATTR_HANDLER_INODE_PARAM, 1, [needs inode parameter])
1810 ]) # LC_HAVE_XATTR_HANDLER_INODE_PARAM
1815 # Kernel version 4.6 commit 85c7f81041d57cfe9dc97f4680d5586b54534a39
1816 # introduced parallel lookups in the VFS layer. The inline function
1817 # d_in_lookup was added to notify when the same item was being queried
1820 AC_DEFUN([LC_SRC_D_IN_LOOKUP], [
1821 LB2_LINUX_TEST_SRC([d_in_lookup], [
1822 #include <linux/dcache.h>
1827 AC_DEFUN([LC_D_IN_LOOKUP], [
1828 LB2_MSG_LINUX_TEST_RESULT([if 'd_in_lookup' is defined],
1830 AC_DEFINE(HAVE_D_IN_LOOKUP, 1, [d_in_lookup is defined])
1835 # LC_LOCK_PAGE_MEMCG
1837 # Kernel version 4.6 adds lock_page_memcg(page)
1838 # Linux commit v5.15-12273-gab2f9d2d3626
1839 # mm: unexport {,un}lock_page_memcg
1841 AC_DEFUN([LC_SRC_LOCK_PAGE_MEMCG], [
1842 LB2_LINUX_TEST_SRC([lock_page_memcg], [
1843 #include <linux/memcontrol.h>
1845 lock_page_memcg(NULL);
1848 AC_DEFUN([LC_LOCK_PAGE_MEMCG], [
1849 LB2_MSG_LINUX_TEST_RESULT([if 'lock_page_memcg' is defined],
1850 [lock_page_memcg], [
1851 AC_DEFINE(HAVE_LOCK_PAGE_MEMCG, 1, [lock_page_memcg is defined])
1853 ]) # LC_LOCK_PAGE_MEMCG
1856 # LC_HAVE_DOWN_WRITE_KILLABLE
1858 # Kernel version v4.6-rc3-28-g916633a40370
1860 AC_DEFUN([LC_SRC_HAVE_DOWN_WRITE_KILLABLE], [
1861 LB2_LINUX_TEST_SRC([down_write_killable], [
1862 #include <linux/rwsem.h>
1864 struct rw_semaphore sem;
1868 rc = down_write_killable(&sem);
1872 AC_DEFUN([LC_HAVE_DOWN_WRITE_KILLABLE], [
1873 LB2_MSG_LINUX_TEST_RESULT([if down_write_killable exists],
1874 [down_write_killable], [
1875 AC_DEFINE(HAVE_DOWN_WRITE_KILLABLE, 1,
1876 [down_write_killable function exists])
1878 ]) # LC_HAVE_DOWN_WRITE_KILLABLE
1883 # Kernel version 4.7-rc5 commit 285b102d3b745f3c2c110c9c327741d87e64aacc
1884 # add new d_init to initialize dentry at allocation time
1886 AC_DEFUN([LC_SRC_D_INIT], [
1887 LB2_LINUX_TEST_SRC([d_init], [
1888 #include <linux/dcache.h>
1890 struct dentry_operations ops = { };
1893 rc = ops.d_init(NULL);
1896 AC_DEFUN([LC_D_INIT], [
1897 LB2_MSG_LINUX_TEST_RESULT([if dentry operations supports 'd_init'],
1899 AC_DEFINE(HAVE_D_INIT, 1, ['d_init' exists])
1906 # Kernel version 4.7 commit c8b8e32d700fe943a935e435ae251364d016c497
1907 # direct-io: eliminate the offset argument to ->direct_IO
1909 AC_DEFUN([LC_SRC_DIRECTIO_2ARGS], [
1910 LB2_LINUX_TEST_SRC([direct_io_2args], [
1911 #include <linux/fs.h>
1913 struct address_space_operations ops = { };
1914 struct iov_iter *iter = NULL;
1915 struct kiocb *iocb = NULL;
1918 rc = ops.direct_IO(iocb, iter);
1921 AC_DEFUN([LC_DIRECTIO_2ARGS], [
1922 LB2_MSG_LINUX_TEST_RESULT([if '->direct_IO()' takes 2 arguments],
1923 [direct_io_2args], [
1924 AC_DEFINE(HAVE_DIRECTIO_2ARGS, 1, [direct_IO has 2 arguments])
1926 ]) # LC_DIRECTIO_2ARGS
1929 # LC_GENERIC_WRITE_SYNC_2ARGS
1931 # Kernel version 4.7 commit dde0c2e79848298cc25621ad080d47f94dbd7cce
1932 # fs: add IOCB_SYNC and IOCB_DSYNC
1934 AC_DEFUN([LC_SRC_GENERIC_WRITE_SYNC_2ARGS], [
1935 LB2_LINUX_TEST_SRC([generic_write_sync_2args], [
1936 #include <linux/fs.h>
1938 struct kiocb *iocb = NULL;
1941 rc = generic_write_sync(iocb, 0);
1944 AC_DEFUN([LC_GENERIC_WRITE_SYNC_2ARGS], [
1945 LB2_MSG_LINUX_TEST_RESULT([if 'generic_write_sync()' takes 2 arguments],
1946 [generic_write_sync_2args], [
1947 AC_DEFINE(HAVE_GENERIC_WRITE_SYNC_2ARGS, 1,
1948 [generic_write_sync has 2 arguments])
1950 ]) # LC_GENERIC_WRITE_SYNC_2ARGS
1953 # LC_FOP_ITERATE_SHARED
1955 # Kernel v4.6-rc3-29-g6192269 adds iterate_shared method to file_operations
1957 AC_DEFUN([LC_SRC_FOP_ITERATE_SHARED], [
1958 LB2_LINUX_TEST_SRC([fop_iterate_shared], [
1959 #include <linux/fs.h>
1961 struct file_operations fop;
1962 fop.iterate_shared = NULL;
1965 AC_DEFUN([LC_FOP_ITERATE_SHARED], [
1966 LB2_MSG_LINUX_TEST_RESULT([if 'file_operations' has 'iterate_shared'],
1967 [fop_iterate_shared], [
1968 AC_DEFINE(HAVE_FOP_ITERATE_SHARED, 1,
1969 [file_operations has iterate_shared])
1971 ]) # LC_FOP_ITERATE_SHARED
1974 # LC_EXPORT_DEFAULT_FILE_SPLICE_READ
1976 # 4.8-rc8 commit 82c156f853840645604acd7c2cebcb75ed1b6652 switched
1977 # generic_file_splice_read() to using ->read_iter. We can test this
1978 # change since default_file_splice_read() is no longer exported.
1980 AC_DEFUN([LC_EXPORT_DEFAULT_FILE_SPLICE_READ], [
1981 LB_CHECK_EXPORT([default_file_splice_read], [fs/splice.c],
1982 [AC_DEFINE(HAVE_DEFAULT_FILE_SPLICE_READ_EXPORT, 1,
1983 [default_file_splice_read is exported])])
1984 ]) # LC_EXPORT_DEFAULT_FILE_SPLCE_READ
1987 # LC_HAVE_POSIX_ACL_VALID_USER_NS
1989 # 4.8 posix_acl_valid takes struct user_namespace
1991 AC_DEFUN([LC_SRC_HAVE_POSIX_ACL_VALID_USER_NS], [
1992 LB2_LINUX_TEST_SRC([posix_acl_valid], [
1993 #include <linux/fs.h>
1994 #include <linux/posix_acl.h>
1996 posix_acl_valid((struct user_namespace*)NULL, (const struct posix_acl*)NULL);
1999 AC_DEFUN([LC_HAVE_POSIX_ACL_VALID_USER_NS], [
2000 LB2_MSG_LINUX_TEST_RESULT([if 'posix_acl_valid' takes 'struct user_namespace'],
2001 [posix_acl_valid], [
2002 AC_DEFINE(HAVE_POSIX_ACL_VALID_USER_NS, 1,
2003 [posix_acl_valid takes struct user_namespace])
2005 ]) # LC_HAVE_POSIX_ACL_VALID_USER_NS
2008 # LC_D_COMPARE_4ARGS
2010 # Kernel version 4.8 commit 6fa67e707559303e086303aeecc9e8b91ef497d5
2011 # get rid of 'parent' argument of ->d_compare()
2013 AC_DEFUN([LC_SRC_D_COMPARE_4ARGS], [
2014 LB2_LINUX_TEST_SRC([d_compare_4args], [
2015 #include <linux/dcache.h>
2017 ((struct dentry_operations*)0)->d_compare(NULL,0,NULL,NULL);
2020 AC_DEFUN([LC_D_COMPARE_4ARGS], [
2021 LB2_MSG_LINUX_TEST_RESULT([if 'd_compare' taken 4 arguments],
2022 [d_compare_4args], [
2023 AC_DEFINE(HAVE_D_COMPARE_4ARGS, 1,
2024 [d_compare need 4 arguments])
2026 ]) # LC_D_COMPARE_4ARGS
2029 # LC_FULL_NAME_HASH_3ARGS
2031 # Kernel version 4.8 commit 8387ff2577eb9ed245df9a39947f66976c6bcd02
2032 # vfs: make the string hashes salt the hash
2034 AC_DEFUN([LC_SRC_FULL_NAME_HASH_3ARGS], [
2035 LB2_LINUX_TEST_SRC([full_name_hash_3args], [
2036 #include <linux/stringhash.h>
2039 hash = full_name_hash(NULL,NULL,0);
2042 AC_DEFUN([LC_FULL_NAME_HASH_3ARGS], [
2043 LB2_MSG_LINUX_TEST_RESULT([if 'full_name_hash' taken 3 arguments],
2044 [full_name_hash_3args], [
2045 AC_DEFINE(HAVE_FULL_NAME_HASH_3ARGS, 1,
2046 [full_name_hash need 3 arguments])
2048 ]) # LC_FULL_NAME_HASH_3ARGS
2051 # LC_STRUCT_POSIX_ACL_XATTR
2053 # Kernel version 4.8 commit 2211d5ba5c6c4e972ba6dbc912b2897425ea6621
2054 # posix_acl: xattr representation cleanups
2056 AC_DEFUN([LC_SRC_STRUCT_POSIX_ACL_XATTR], [
2057 LB2_LINUX_TEST_SRC([struct_posix_acl_xattr], [
2058 #include <linux/fs.h>
2059 #include <linux/posix_acl_xattr.h>
2061 struct posix_acl_xattr_header *h = NULL;
2062 struct posix_acl_xattr_entry *e;
2063 e = (void *)(h + 1);
2066 AC_DEFUN([LC_STRUCT_POSIX_ACL_XATTR], [
2067 LB2_MSG_LINUX_TEST_RESULT([if 'struct posix_acl_xattr_{header,entry}' defined],
2068 [struct_posix_acl_xattr], [
2069 AC_DEFINE(HAVE_STRUCT_POSIX_ACL_XATTR, 1,
2070 [struct posix_acl_xattr_{header,entry} defined])
2072 ]) # LC_STRUCT_POSIX_ACL_XATTR
2077 # Kernel version 4.8 commit fd50ecaddf8372a1d96e0daeaac0f93cf04e4d42
2078 # removed {get,set,remove}xattr inode operations
2080 AC_DEFUN([LC_SRC_IOP_XATTR], [
2081 LB2_LINUX_TEST_SRC([inode_ops_xattr], [
2082 #include <linux/fs.h>
2084 struct inode_operations iop;
2085 iop.setxattr = NULL;
2086 iop.getxattr = NULL;
2087 iop.removexattr = NULL;
2090 AC_DEFUN([LC_IOP_XATTR], [
2091 LB2_MSG_LINUX_TEST_RESULT([if 'inode_operations' has {get,set,remove}xattr members],
2092 [inode_ops_xattr], [
2093 AC_DEFINE(HAVE_IOP_XATTR, 1,
2094 [inode_operations has {get,set,remove}xattr members])
2101 # Kernel version 4.9 commit 81243eacfa400f5f7b89f4c2323d0de9982bb0fb
2102 # cred: simpler, 1D supplementary groups
2104 AC_DEFUN([LC_SRC_GROUP_INFO_GID], [
2105 LB2_LINUX_TEST_SRC([group_info_gid], [
2106 #include <linux/cred.h>
2109 p = ((struct group_info *)0)->gid;
2112 AC_DEFUN([LC_GROUP_INFO_GID], [
2113 LB2_MSG_LINUX_TEST_RESULT([if 'struct group_info' has member 'gid'],
2115 AC_DEFINE(HAVE_GROUP_INFO_GID, 1,
2116 [struct group_info has member gid])
2118 ]) # LC_GROUP_INFO_GID
2123 # Kernel version 4.9 commit 5d6c31910bc0713e37628dc0ce677dcb13c8ccf4
2124 # added __vfs_{get,set,remove}xattr helpers
2126 AC_DEFUN([LC_SRC_VFS_SETXATTR], [
2127 LB2_LINUX_TEST_SRC([vfs_setxattr], [
2128 #include <linux/xattr.h>
2130 __vfs_setxattr(NULL, NULL, NULL, NULL, 0, 0);
2133 AC_DEFUN([LC_VFS_SETXATTR], [
2134 LB2_MSG_LINUX_TEST_RESULT([if '__vfs_setxattr' helper is available],
2136 AC_DEFINE(HAVE_VFS_SETXATTR, 1, ['__vfs_setxattr' is available])
2138 ]) # LC_VFS_SETXATTR
2141 # LC_POSIX_ACL_UPDATE_MODE
2143 # Kernel version 4.9 commit 073931017b49d9458aa351605b43a7e34598caef
2144 # posix_acl: Clear SGID bit when setting file permissions
2146 AC_DEFUN([LC_SRC_POSIX_ACL_UPDATE_MODE], [
2147 LB2_LINUX_TEST_SRC([posix_acl_update_mode], [
2148 #include <linux/fs.h>
2149 #include <linux/posix_acl.h>
2151 posix_acl_update_mode(NULL, NULL, NULL);
2154 AC_DEFUN([LC_POSIX_ACL_UPDATE_MODE], [
2155 LB2_MSG_LINUX_TEST_RESULT([if 'posix_acl_update_mode' exists],
2156 [posix_acl_update_mode], [
2157 AC_DEFINE(HAVE_POSIX_ACL_UPDATE_MODE, 1,
2158 ['posix_acl_update_mode' is available])
2160 ]) # LC_POSIX_ACL_UPDATE_MODE
2163 # LC_HAVE_BDI_IO_PAGES
2165 # Kernel version 4.9 commit 9491ae4aade6814afcfa67f4eb3e3342c2b39750
2166 # mm: don't cap request size based on read-ahead setting
2167 # This patch introduces a bdi hint, io_pages.
2169 AC_DEFUN([LC_SRC_HAVE_BDI_IO_PAGES], [
2170 LB2_LINUX_TEST_SRC([bdi_has_io_pages], [
2171 #include <linux/backing-dev.h>
2173 struct backing_dev_info info;
2178 AC_DEFUN([LC_HAVE_BDI_IO_PAGES], [
2179 LB2_MSG_LINUX_TEST_RESULT([if 'struct backing_dev_info' has 'io_pages' field],
2180 [bdi_has_io_pages], [
2181 AC_DEFINE(HAVE_BDI_IO_PAGES, 1,
2182 [backing_dev_info has io_pages])
2184 ]) # LC_HAVE_BDI_IO_PAGES
2187 # LC_IOP_GENERIC_READLINK
2189 # Kernel version 4.10 commit dfeef68862edd7d4bafe68ef7aeb5f658ef24bb5
2190 # removed generic_readlink from individual file systems
2192 AC_DEFUN([LC_SRC_IOP_GENERIC_READLINK], [
2193 LB2_LINUX_TEST_SRC([inode_ops_readlink], [
2194 #include <linux/fs.h>
2196 struct inode_operations iop;
2197 iop.readlink = generic_readlink;
2200 AC_DEFUN([LC_IOP_GENERIC_READLINK], [
2201 LB2_MSG_LINUX_TEST_RESULT([if 'generic_readlink' still exist],
2202 [inode_ops_readlink], [
2203 AC_DEFINE(HAVE_IOP_GENERIC_READLINK, 1,
2204 [generic_readlink has been removed])
2206 ]) # LC_IOP_GENERIC_READLINK
2209 # LC_HAVE_VM_FAULT_ADDRESS
2211 # Kernel version 4.10 commit 1a29d85eb0f19b7d8271923d8917d7b4f5540b3e
2212 # removed virtual_address field. Need to use address field instead
2214 AC_DEFUN([LC_SRC_HAVE_VM_FAULT_ADDRESS], [
2215 LB2_LINUX_TEST_SRC([vm_fault_address], [
2216 #include <linux/mm.h>
2218 struct vm_fault vmf = { 0 };
2219 unsigned long addr = (unsigned long)vmf.address;
2223 AC_DEFUN([LC_HAVE_VM_FAULT_ADDRESS], [
2224 LB2_MSG_LINUX_TEST_RESULT([if 'struct vm_fault' replaced virtual_address with address field],
2225 [vm_fault_address], [
2226 AC_DEFINE(HAVE_VM_FAULT_ADDRESS, 1,
2227 [virtual_address has been replaced by address field])
2229 ]) # LC_HAVE_VM_FAULT_ADDRESS
2232 # LC_INODEOPS_ENHANCED_GETATTR
2234 # Kernel version 4.11 commit a528d35e8bfcc521d7cb70aaf03e1bd296c8493f
2235 # expanded getattr to be able to get more stat information.
2237 AC_DEFUN([LC_SRC_INODEOPS_ENHANCED_GETATTR], [
2238 LB2_LINUX_TEST_SRC([getattr_path], [
2239 #include <linux/fs.h>
2243 ((struct inode_operations *)1)->getattr(&path, NULL, 0, 0);
2246 AC_DEFUN([LC_INODEOPS_ENHANCED_GETATTR], [
2247 LB2_MSG_LINUX_TEST_RESULT([if 'inode_operations' getattr member can gather advance stats],
2249 AC_DEFINE(HAVE_INODEOPS_ENHANCED_GETATTR, 1,
2250 [inode_operations .getattr member function can gather advance stats])
2252 ]) # LC_INODEOPS_ENHANCED_GETATTR
2255 # LC_VM_OPERATIONS_REMOVE_VMF_ARG
2257 # Kernel version 4.11 commit 11bac80004499ea59f361ef2a5516c84b6eab675
2258 # removed struct vm_area_struct as an argument for vm_operations since
2259 # in the same kernel version struct vma_area_struct was folded into
2262 AC_DEFUN([LC_SRC_VM_OPERATIONS_REMOVE_VMF_ARG], [
2263 LB2_LINUX_TEST_SRC([vm_operations_no_vm_area_struct], [
2264 #include <linux/mm.h>
2266 struct vm_fault vmf;
2268 ((struct vm_operations_struct *)0)->fault(&vmf);
2269 ((struct vm_operations_struct *)0)->page_mkwrite(&vmf);
2272 AC_DEFUN([LC_VM_OPERATIONS_REMOVE_VMF_ARG], [
2273 LB2_MSG_LINUX_TEST_RESULT([if 'struct vm_operations' removed struct vm_area_struct],
2274 [vm_operations_no_vm_area_struct], [
2275 AC_DEFINE(HAVE_VM_OPS_USE_VM_FAULT_ONLY, 1,
2276 ['struct vm_operations' remove struct vm_area_struct argument])
2278 ]) # LC_VM_OPERATIONS_REMOVE_VMF_ARG
2281 # LC_HAVE_KEY_USAGE_REFCOUNT
2283 # Kernel version 4.11 commit fff292914d3a2f1efd05ca71c2ba72a3c663201e
2284 # converted key.usage from atomic_t to refcount_t.
2286 AC_DEFUN([LC_SRC_HAVE_KEY_USAGE_REFCOUNT], [
2287 LB2_LINUX_TEST_SRC([key_usage_refcount], [
2288 #include <linux/key.h>
2290 struct key key = { };
2292 refcount_read(&key.usage);
2295 AC_DEFUN([LC_HAVE_KEY_USAGE_REFCOUNT], [
2296 LB2_MSG_LINUX_TEST_RESULT([if 'key.usage' is refcount_t],
2297 [key_usage_refcount], [
2298 AC_DEFINE(HAVE_KEY_USAGE_REFCOUNT, 1,
2299 [key.usage is of type refcount_t])
2301 ]) #LC_HAVE_KEY_USAGE_REFCOUNT
2304 # LC_HAVE_CRYPTO_MAX_ALG_NAME_128
2306 # Kernel version 4.11 commit f437a3f477cce402dbec6537b29e9e33962c9f73
2307 # switched CRYPTO_MAX_ALG_NAME from 64 to 128.
2309 AC_DEFUN([LC_SRC_HAVE_CRYPTO_MAX_ALG_NAME_128], [
2310 LB2_LINUX_TEST_SRC([crypto_max_alg_name], [
2311 #include <linux/crypto.h>
2313 #if CRYPTO_MAX_ALG_NAME != 128
2318 AC_DEFUN([LC_HAVE_CRYPTO_MAX_ALG_NAME_128], [
2319 LB2_MSG_LINUX_TEST_RESULT([if 'CRYPTO_MAX_ALG_NAME' is 128],
2320 [crypto_max_alg_name], [
2321 AC_DEFINE(HAVE_CRYPTO_MAX_ALG_NAME_128, 1,
2322 ['CRYPTO_MAX_ALG_NAME' is 128])
2324 ]) # LC_HAVE_CRYPTO_MAX_ALG_NAME_128
2327 # Kernel version 4.12 commit 47f38c539e9a42344ff5a664942075bd4df93876
2328 # CURRENT_TIME is not 64 bit time safe so it was replaced with
2331 AC_DEFUN([LC_SRC_CURRENT_TIME], [
2332 LB2_LINUX_TEST_SRC([current_time], [
2333 #include <linux/fs.h>
2337 attr.ia_atime = current_time(NULL);
2340 AC_DEFUN([LC_CURRENT_TIME], [
2341 LB2_MSG_LINUX_TEST_RESULT([if CURRENT_TIME has been replaced with current_time],
2343 AC_DEFINE(HAVE_CURRENT_TIME, 1,
2344 [current_time() has replaced CURRENT_TIME])
2346 ]) # LC_CURRENT_TIME
2349 # LC_HAVE_GET_INODE_USAGE
2351 # Kernel version v4.12-rc2-43-g7a9ca53aea10
2353 AC_DEFUN([LC_SRC_HAVE_GET_INODE_USAGE], [
2354 LB2_LINUX_TEST_SRC([get_inode_usage], [
2356 #include <linux/quota.h>
2358 struct dquot_operations ops = { };
2360 ops.get_inode_usage(NULL, NULL);
2363 AC_DEFUN([LC_HAVE_GET_INODE_USAGE], [
2364 LB2_MSG_LINUX_TEST_RESULT([if get_inode_usage exists],
2365 [get_inode_usage], [
2366 AC_DEFINE(HAVE_GET_INODE_USAGE, 1,
2367 [get_inode_usage function exists])
2369 ]) # LC_HAVE_GET_INODE_USAGE
2372 # LC_SUPER_SETUP_BDI_NAME
2374 # Kernel version 4.12 commit 9594caf216dc0fe3e318b34af0127276db661241
2375 # unified bdi handling
2377 AC_DEFUN([LC_SRC_SUPER_SETUP_BDI_NAME], [
2378 LB2_LINUX_TEST_SRC([super_setup_bdi_name], [
2379 #include <linux/fs.h>
2381 super_setup_bdi_name(NULL, "lustre");
2384 AC_DEFUN([LC_SUPER_SETUP_BDI_NAME], [
2385 LB2_MSG_LINUX_TEST_RESULT([if 'super_setup_bdi_name' exist],
2386 [super_setup_bdi_name], [
2387 AC_DEFINE(HAVE_SUPER_SETUP_BDI_NAME, 1,
2388 ['super_setup_bdi_name' is available])
2390 ]) # LC_SUPER_SETUP_BDI_NAME
2395 # 4.12 replace bi_error to bi_status
2397 AC_DEFUN([LC_SRC_BI_STATUS], [
2398 LB2_LINUX_TEST_SRC([bi_status], [
2399 #include <linux/blk_types.h>
2401 ((struct bio *)0)->bi_status = 0;
2404 AC_DEFUN([LC_BI_STATUS], [
2405 LB2_MSG_LINUX_TEST_RESULT([if 'bi_status' exist],
2407 AC_DEFINE(HAVE_BI_STATUS, 1, ['bi_status' is available])
2412 # LC_PAGEVEC_INIT_ONE_PARAM
2414 # 4.14 pagevec_init takes one parameter
2416 AC_DEFUN([LC_SRC_PAGEVEC_INIT_ONE_PARAM], [
2417 LB2_LINUX_TEST_SRC([pagevec_init], [
2418 #include <linux/pagevec.h>
2423 AC_DEFUN([LC_PAGEVEC_INIT_ONE_PARAM], [
2424 LB2_MSG_LINUX_TEST_RESULT([if 'pagevec_init' takes one parameter],
2426 AC_DEFINE(HAVE_PAGEVEC_INIT_ONE_PARAM, 1,
2427 ['pagevec_init' takes one parameter])
2429 ]) # LC_PAGEVEC_INIT_ONE_PARAM
2434 # 4.14 replaced bi_bdev to bi_disk
2436 AC_DEFUN([LC_SRC_BI_BDEV], [
2437 LB2_LINUX_TEST_SRC([bi_bdev], [
2438 #include <linux/bio.h>
2440 ((struct bio *)0)->bi_bdev = NULL;
2443 AC_DEFUN([LC_BI_BDEV], [
2444 LB2_MSG_LINUX_TEST_RESULT([if 'bi_bdev' exist],
2446 AC_DEFINE(HAVE_BI_BDEV, 1, ['bi_bdev' is available])
2451 # LC_INTERVAL_TREE_CACHED
2453 # 4.14 f808c13fd3738948e10196496959871130612b61
2454 # switched INTERVAL_TREE_DEFINE to use cached RB_Trees.
2456 AC_DEFUN([LC_SRC_INTERVAL_TREE_CACHED], [
2457 LB2_LINUX_TEST_SRC([itree_cached], [
2458 #include <linux/interval_tree_generic.h>
2459 struct foo { struct rb_node rb; int last; int a,b;};
2460 #define START(n) ((n)->a)
2461 #define LAST(n) ((n)->b)
2462 struct rb_root_cached tree;
2463 INTERVAL_TREE_DEFINE(struct foo, rb, int, last,
2464 START, LAST, , foo);
2466 foo_insert(NULL, &tree);
2469 AC_DEFUN([LC_INTERVAL_TREE_CACHED], [
2470 LB2_MSG_LINUX_TEST_RESULT([if interval_trees use rb_tree_cached],
2472 AC_DEFINE(HAVE_INTERVAL_TREE_CACHED, 1,
2473 [interval trees use rb_tree_cached])
2475 ]) # LC_INTERVAL_TREE_CACHED
2480 # 4.14 introduced IS_ENCRYPTED and S_ENCRYPTED
2482 AC_DEFUN([LC_IS_ENCRYPTED], [
2483 LB_CHECK_COMPILE([if IS_ENCRYPTED is defined],
2485 #include <linux/fs.h>
2487 (void)IS_ENCRYPTED((struct inode *)1);
2489 has_is_encrypted="yes"
2491 ]) # LC_IS_ENCRYPTED used by LC_CONFIG_CRYPTO
2496 # kernel 4.17 commit b93b016313b3ba8003c3b8bb71f569af91f19fc7
2498 AC_DEFUN([LC_SRC_I_PAGES], [
2499 LB2_LINUX_TEST_SRC([i_pages], [
2500 #include <linux/fs.h>
2502 struct address_space mapping = {};
2505 i_pages = &mapping.i_pages;
2508 AC_DEFUN([LC_I_PAGES], [
2509 LB2_MSG_LINUX_TEST_RESULT([if struct address_space has i_pages],
2511 AC_DEFINE(HAVE_I_PAGES, 1, [struct address_space has i_pages])
2518 # kernel 4.17 commit 3d3539018d2cbd12e5af4a132636ee7fd8d43ef0
2519 # mm: create the new vm_fault_t type
2521 AC_DEFUN([LC_SRC_VM_FAULT_T], [
2522 LB2_LINUX_TEST_SRC([vm_fault_t], [
2523 #include <linux/mm_types.h>
2525 vm_fault_t x = VM_FAULT_SIGBUS;
2529 AC_DEFUN([LC_VM_FAULT_T], [
2530 LB2_MSG_LINUX_TEST_RESULT([if vm_fault_t type exists],
2532 AC_DEFINE(HAVE_VM_FAULT_T, 1, [if vm_fault_t type exists])
2539 # kernel 4.17 commit 3d3539018d2cbd12e5af4a132636ee7fd8d43ef0
2540 # mm: VM_FAULT_RETRY is defined in enum vm_fault_reason
2542 AC_DEFUN([LC_SRC_VM_FAULT_RETRY], [
2543 LB2_LINUX_TEST_SRC([VM_FAULT_RETRY], [
2544 #include <linux/mm.h>
2546 #ifndef VM_FAULT_RETRY
2552 AC_DEFUN([LC_VM_FAULT_RETRY], [
2553 LB2_MSG_LINUX_TEST_RESULT([if VM_FAULT_RETRY is defined],
2555 AC_DEFINE(HAVE_VM_FAULT_RETRY, 1,
2556 [if VM_FAULT_RETRY is defined])
2558 ]) # LC_VM_FAULT_RETRY
2561 # LC_ALLOC_FILE_PSEUDO
2563 # kernel 4.18-rc1 commit d93aa9d82aea80b80f225dbf9c7986df444d8106
2564 # new wrapper: alloc_file_pseudo()
2566 AC_DEFUN([LC_SRC_ALLOC_FILE_PSEUDO], [
2567 LB2_LINUX_TEST_SRC([alloc_file_pseudo], [
2568 #include <linux/file.h>
2571 file = alloc_file_pseudo(NULL, NULL, "[test]",
2575 AC_DEFUN([LC_ALLOC_FILE_PSEUDO], [
2576 LB2_MSG_LINUX_TEST_RESULT([if 'alloc_file_pseudo' is defined],
2577 [alloc_file_pseudo], [
2578 AC_DEFINE(HAVE_ALLOC_FILE_PSEUDO, 1,
2579 ['alloc_file_pseudo' exist])
2581 ]) # LC_ALLOC_FILE_PSEUDO
2584 # LC_INODE_TIMESPEC64
2586 # kernel 4.17-rc7 commit 8efd6894ff089adeeac7cb9f32125b85d963d1bc
2587 # fs: add timespec64_truncate()
2588 # kernel 4.18 commit 95582b00838837fc07e042979320caf917ce3fe6
2589 # inode timestamps switched to timespec64
2590 # kernel 4.19-rc2 commit 976516404ff3fab2a8caa8bd6f5efc1437fed0b8
2591 # y2038: remove unused time interfaces
2595 # When inode times are timespec64 stop using the deprecated
2598 # kernel v5.5-rc1-6-gba70609d5ec6 ba70609d5ec664a8f36ba1c857fcd97a478adf79
2599 # fs: Delete timespec64_trunc()
2601 AC_DEFUN([LC_SRC_INODE_TIMESPEC64], [
2602 LB2_LINUX_TEST_SRC([inode_timespec64], [
2603 #include <linux/fs.h>
2605 struct inode *inode = NULL;
2606 struct timespec64 ts = {0, 1};
2608 inode->i_atime = ts;
2612 AC_DEFUN([LC_INODE_TIMESPEC64], [
2613 LB2_MSG_LINUX_TEST_RESULT([if inode timestamps are struct timespec64],
2614 [inode_timespec64], [
2615 AC_DEFINE(HAVE_INODE_TIMESPEC64, 1,
2616 [inode times are using timespec64])
2618 ]) # LC_INODE_TIMESPEC64
2621 # LC_RADIX_TREE_TAG_SET
2623 # kernel 4.20 commit v4.19-rc5-248-g9b89a0355144
2624 # xarray: Add XArray marks - replaced radix_tree_tag_set
2626 AC_DEFUN([LC_SRC_RADIX_TREE_TAG_SET], [
2627 LB2_LINUX_TEST_SRC([radix_tree_tag_set], [
2628 #include <linux/fs.h>
2629 #include <linux/radix-tree.h>
2631 radix_tree_tag_set(NULL, 0, PAGECACHE_TAG_DIRTY);
2634 AC_DEFUN([LC_RADIX_TREE_TAG_SET], [
2635 LB2_MSG_LINUX_TEST_RESULT([if 'radix_tree_tag_set' exists],
2636 [radix_tree_tag_set], [
2637 AC_DEFINE(HAVE_RADIX_TREE_TAG_SET, 1,
2638 [radix_tree_tag_set exists])
2640 ]) # LC_RADIX_TREE_TAG_SET
2643 # LC_UAPI_LINUX_MOUNT_H
2645 # kernel 4.20 commit e262e32d6bde0f77fb0c95d977482fc872c51996
2646 # vfs: Suppress MS_* flag defs within the kernel ...
2648 AC_DEFUN([LC_SRC_UAPI_LINUX_MOUNT_H], [
2649 LB2_LINUX_TEST_SRC([uapi_linux_mount], [
2650 #include <uapi/linux/mount.h>
2656 AC_DEFUN([LC_UAPI_LINUX_MOUNT_H], [
2657 LB2_MSG_LINUX_TEST_RESULT([if MS_RDONLY was moved to uapi/linux/mount.h],
2658 [uapi_linux_mount], [
2659 AC_DEFINE(HAVE_UAPI_LINUX_MOUNT_H, 1,
2660 [if MS_RDONLY was moved to uapi/linux/mount.h])
2662 ]) # LC_UAPI_LINUX_MOUNT_H
2665 # LC_HAVE_SUNRPC_CACHE_HASH_LOCK_IS_A_SPINLOCK
2667 # kernel 4.20 commit 1863d77f15da0addcd293a1719fa5d3ef8cde3ca
2668 # SUNRPC: Replace the cache_detail->hash_lock with a regular spinlock
2670 # Now that the reader functions are all RCU protected, use a regular
2671 # spinlock rather than a reader/writer lock.
2673 AC_DEFUN([LC_SRC_HAVE_SUNRPC_CACHE_HASH_LOCK_IS_A_SPINLOCK], [
2674 LB2_LINUX_TEST_SRC([hash_lock_isa_spinlock_t], [
2675 #include <linux/sunrpc/cache.h>
2677 spinlock_t *lock = &(((struct cache_detail *)0)->hash_lock);
2681 AC_DEFUN([LC_HAVE_SUNRPC_CACHE_HASH_LOCK_IS_A_SPINLOCK], [
2682 LB2_MSG_LINUX_TEST_RESULT([if cache_detail->hash_lock is a spinlock],
2683 [hash_lock_isa_spinlock_t], [
2684 AC_DEFINE(HAVE_CACHE_HASH_SPINLOCK, 1,
2685 [if cache_detail->hash_lock is a spinlock])
2687 ]) # LC_HAVE_SUNRPC_CACHE_HASH_LOCK_IS_A_SPINLOCK
2690 # LC_GENL_FAMILY_HAS_RESV_START_OP
2692 # Linux v5.0-11693-g3b0f31f2b8c9
2693 # genetlink: make policy common to family
2695 AC_DEFUN([LC_SRC_GENL_FAMILY_HAS_RESV_START_OP], [
2696 LB2_LINUX_TEST_SRC([genl_family_has_resv_start_op], [
2697 #include <net/genetlink.h>
2699 static const struct genl_family family = {
2700 .resv_start_op = 42,
2705 AC_DEFUN([LC_GENL_FAMILY_HAS_RESV_START_OP], [
2706 LB2_MSG_LINUX_TEST_RESULT([if struct genl_family has resv_start_op member],
2707 [genl_family_has_resv_start_op], [
2708 AC_DEFINE(GENL_FAMILY_HAS_RESV_START_OP, 1,
2709 [struct genl_family has resv_start_op member])
2711 ]) # LC_GENL_FAMILY_HAS_RESV_START_OP
2714 # LC_HAVE_BVEC_ITER_ALL
2716 # kernel 5.1 commit 6dc4f100c175dd0511ae8674786e7c9006cdfbfa
2717 # block: allow bio_for_each_segment_all() to iterate over multi-page bvec
2719 AC_DEFUN([LC_SRC_HAVE_BVEC_ITER_ALL], [
2720 LB2_LINUX_TEST_SRC([struct_bvec_iter_all], [
2721 #include <linux/bvec.h>
2723 struct bvec_iter_all iter;
2727 AC_DEFUN([LC_HAVE_BVEC_ITER_ALL], [
2728 LB2_MSG_LINUX_TEST_RESULT([if bvec_iter_all exists for multi-page bvec iternation],
2729 [struct_bvec_iter_all], [
2730 AC_DEFINE(HAVE_BVEC_ITER_ALL, 1,
2731 [if bvec_iter_all exists for multi-page bvec iternation])
2733 ]) # LC_HAVE_BVEC_ITER_ALL
2736 # LC_ACCOUNT_PAGE_DIRTIED
2738 # After 5.2 kernel page dirtied is not exported
2740 AC_DEFUN([LC_ACCOUNT_PAGE_DIRTIED], [
2741 LB_CHECK_EXPORT([account_page_dirtied], [mm/page-writeback.c],
2742 [AC_DEFINE(HAVE_ACCOUNT_PAGE_DIRTIED_EXPORT, 1,
2743 [account_page_dirtied is exported])])
2744 ]) # LC_ACCOUNT_PAGE_DIRTIED
2747 # LC_KEYRING_SEARCH_4ARGS
2749 # Kernel 5.2 commit dcf49dbc8077
2750 # keys: Add a 'recurse' flag for keyring searches
2752 AC_DEFUN([LC_SRC_KEYRING_SEARCH_4ARGS], [
2753 LB2_LINUX_TEST_SRC([keyring_search_4args], [
2754 #include <linux/key.h>
2757 keyring_search(keyring, NULL, NULL, false);
2760 AC_DEFUN([LC_KEYRING_SEARCH_4ARGS], [
2761 LB2_MSG_LINUX_TEST_RESULT([if 'keyring_search' has 4 args],
2762 [keyring_search_4args], [
2763 AC_DEFINE(HAVE_KEYRING_SEARCH_4ARGS, 1,
2764 [keyring_search has 4 args])
2766 ]) # LC_KEYRING_SEARCH_4ARGS
2769 # LC_BIO_BI_PHYS_SEGMENTS
2771 # kernel 5.3-rc1 commit 14ccb66b3f585b2bc21e7256c96090abed5a512c
2772 # block: remove the bi_phys_segments field in struct bio
2774 AC_DEFUN([LC_SRC_BIO_BI_PHYS_SEGMENTS], [
2775 LB2_LINUX_TEST_SRC([bye_bio_bi_phys_segments], [
2776 #include <linux/bio.h>
2778 struct bio *bio = NULL;
2779 bio->bi_phys_segments++;
2782 AC_DEFUN([LC_BIO_BI_PHYS_SEGMENTS], [
2783 LB2_MSG_LINUX_TEST_RESULT([if struct bio has bi_phys_segments member],
2784 [bye_bio_bi_phys_segments], [
2785 AC_DEFINE(HAVE_BIO_BI_PHYS_SEGMENTS, 1,
2786 [struct bio has bi_phys_segments member])
2788 ]) # LC_BIO_BI_PHYS_SEGMENTS
2791 # LC_HAVE_FLUSH_DELAYED_FPUT
2793 # kernel commit v3.5-rc6-284-g4a9d4b024a31 adds flush_delayed_fput()
2794 # kernel commit v5.3-rc2-13-g7239a40ca8bf exports flush_delayed_fput()
2796 AC_DEFUN([LC_HAVE_FLUSH_DELAYED_FPUT], [
2797 LB_CHECK_EXPORT([flush_delayed_fput], [fs/file_table.c],
2798 [AC_DEFINE(HAVE_FLUSH_DELAYED_FPUT, 1,
2799 [flush_delayed_fput() is exported by the kernel])])
2800 ]) # LC_FLUSH_DELAYED_FPUT
2803 # LC_LM_COMPARE_OWNER_EXISTS
2805 # kernel 5.3-rc3 commit f85d93385e9fe6886a751f647f6812a89bf6bee3
2806 # locks: Cleanup lm_compare_owner and lm_owner_key
2807 # removed lm_compare_owner
2809 AC_DEFUN([LC_SRC_LM_COMPARE_OWNER_EXISTS], [
2810 LB2_LINUX_TEST_SRC([lock_manager_ops_lm_compare_owner], [
2811 #include <linux/fs.h>
2813 struct lock_manager_operations lm_ops;
2814 lm_ops.lm_compare_owner = NULL;
2817 AC_DEFUN([LC_LM_COMPARE_OWNER_EXISTS], [
2818 LB2_MSG_LINUX_TEST_RESULT([if lock_manager_operations has lm_compare_owner],
2819 [lock_manager_ops_lm_compare_owner], [
2820 AC_DEFINE(HAVE_LM_COMPARE_OWNER, 1,
2821 [lock_manager_operations has lm_compare_owner])
2823 ]) # LC_LM_COMPARE_OWNER_EXISTS
2826 # LC_FSCRYPT_SUPPORT
2828 # 5.4 introduced fscrypt encryption policies v2
2830 AC_DEFUN([LC_FSCRYPT_SUPPORT], [
2831 LB_CHECK_COMPILE([for fscrypt in-kernel support],
2833 #define __FS_HAS_ENCRYPTION 0
2834 #include <linux/fscrypt.h>
2836 fscrypt_ioctl_get_policy_ex(NULL, NULL);
2838 has_fscrypt_support="yes"
2840 ]) # LC_FSCRYPT_SUPPORT used by LC_CONFIG_CRYPTO
2843 # LC_FSCRYPT_DIGESTED_NAME
2845 # Kernel 5.5-rc4 edc440e3d27fb31e6f9663cf413fad97d714c060
2846 # improved the format of no-key names. This results in the
2847 # removal of FSCRYPT_FNAME_DIGEST and FSCRYPT_FNAME_DIGEST_SIZE.
2849 AC_DEFUN([LC_SRC_FSCRYPT_DIGESTED_NAME], [
2850 LB2_LINUX_TEST_SRC([fscrypt_digested_name], [
2851 #include <linux/fscrypt.h>
2853 struct fscrypt_digested_name fname;
2858 AC_DEFUN([LC_FSCRYPT_DIGESTED_NAME], [
2859 LB2_MSG_LINUX_TEST_RESULT([if fscrypt has 'struct fscrypt_digested_name'],
2860 [fscrypt_digested_name], [
2861 AC_DEFINE(HAVE_FSCRYPT_DIGESTED_NAME, 1,
2862 ['struct fscrypt_digested_name' exists])
2864 ]) # LC_FSCRYPT_DIGESTED_NAME
2867 # LC_FSCRYPT_DUMMY_CONTEXT_ENABLED
2869 # Kernel 5.7-rc7 ed318a6cc0b620440e65f48eb527dc3df7269ce4
2870 # replaces fscrypt_dummy_context_enabled() with
2871 # fscrypt_get_dummy_context(). Later kernels rename
2872 # fscrypt_get_dummy_context() to fscrypt_get_dummy_policy()
2873 # which is why we test fscrypt_dummy_context_enabled().
2875 AC_DEFUN([LC_SRC_FSCRYPT_DUMMY_CONTEXT_ENABLED], [
2876 LB2_LINUX_TEST_SRC([fscrypt_dummy_context_enabled], [
2877 #include <linux/fscrypt.h>
2879 fscrypt_dummy_context_enabled(NULL);
2882 AC_DEFUN([LC_FSCRYPT_DUMMY_CONTEXT_ENABLED], [
2883 LB2_MSG_LINUX_TEST_RESULT([if fscrypt_dummy_context_enabled() exists],
2884 [fscrypt_dummy_context_enabled], [
2885 AC_DEFINE(HAVE_FSCRYPT_DUMMY_CONTEXT_ENABLED, 1,
2886 [fscrypt_dummy_context_enabled() exists])
2888 ]) # LC_FSCRYPT_DUMMY_CONTEXT_ENABLED
2891 # LC_HAVE_KTHREAD_USE_MM
2893 # kernel 5.8 commit f5678e7f2ac31c270334b936352f0ef2fe7dd2b3
2894 # kernel: better document the use_mm/unuse_mm API contract
2896 AC_DEFUN([LC_SRC_HAVE_KTHREAD_USE_MM], [
2897 LB2_LINUX_TEST_SRC([kthread_use_mm], [
2898 #include <linux/kthread.h>
2900 kthread_use_mm(NULL);
2903 AC_DEFUN([LC_HAVE_KTHREAD_USE_MM], [
2904 AC_MSG_CHECKING([if have kthread_use_mm])
2905 LB2_LINUX_TEST_RESULT([kthread_use_mm], [
2906 AC_DEFINE(HAVE_KTHREAD_USE_MM, 1, ['kthread_use_mm' exists])
2908 ]) # LC_HAVE_KTHREAD_USE_MM
2911 # LC_FSCRYPT_FNAME_ALLOC_BUFFER
2913 # Kernel 5.9-rc4 8b10fe68985278de4926daa56ad6af701839e40a
2914 # removed the inode parameter for the fscrypt function
2915 # fscrypt_fname_alloc_buffer()
2917 AC_DEFUN([LC_SRC_FSCRYPT_FNAME_ALLOC_BUFFER], [
2918 LB2_LINUX_TEST_SRC([fscrypt_fname_alloc_buffer], [
2919 #include <linux/fscrypt.h>
2921 fscrypt_fname_alloc_buffer(0, NULL);
2924 AC_DEFUN([LC_FSCRYPT_FNAME_ALLOC_BUFFER], [
2925 LB2_MSG_LINUX_TEST_RESULT([if fscrypt_fname_alloc_buffer() removed inode parameter],
2926 [fscrypt_fname_alloc_buffer], [
2927 AC_DEFINE(HAVE_FSCRYPT_FNAME_ALLOC_BUFFER_NO_INODE, 1,
2928 [fscrypt_fname_alloc_buffer() does not have inode parameter])
2930 ]) # LC_FSCRYPT_FNAME_ALLOC_BUFFER
2933 # LC_FSCRYPT_SET_CONTEXT
2935 # Kernel 5.9-rc4 a992b20cd4ee360dbbe6f69339cb07146e4304d6
2936 # fscrypt_get_encryption_info() is not GFP_NOFS safe which
2937 # is used by fscrypt_inherit_context. Replace fscrypt_inherit_context,
2938 # with two new functions, fscrypt_prepare_new_inode() and
2939 # fscrypt_set_context()
2941 AC_DEFUN([LC_SRC_FSCRYPT_SET_CONTEXT], [
2942 LB2_LINUX_TEST_SRC([fscrypt_set_context], [
2943 #include <linux/fscrypt.h>
2945 fscrypt_set_context(NULL, NULL);
2946 fscrypt_prepare_new_inode(NULL, NULL, NULL);
2949 AC_DEFUN([LC_FSCRYPT_SET_CONTEXT], [
2950 LB2_MSG_LINUX_TEST_RESULT([if 'fscrypt_set_context()' exists],
2951 [fscrypt_set_context], [
2952 AC_DEFINE(HAVE_FSCRYPT_SET_CONTEXT, 1,
2953 [fscrypt_set_context() does exist])
2955 ]) # LC_FSCRYPT_SET_CONTEXT
2958 # LC_FSCRYPT_D_REVALIDATE
2960 # kernel 5.9-rc4 5b2a828b98ec1872799b1b4d82113c76a12d594f
2961 # exported fscrypt_d_revalidate()
2963 AC_DEFUN([LC_FSCRYPT_D_REVALIDATE], [
2964 LB_CHECK_EXPORT([fscrypt_d_revalidate], [fs/crypto/fname.c],
2965 [AC_DEFINE(HAVE_FSCRYPT_D_REVALIDATE, 1,
2966 [fscrypt_d_revalidate() is exported by the kernel])])
2967 ]) # LC_FSCRYPT_D_REVALIDATE
2970 # LC_FSCRYPT_NOKEY_NAME
2972 # kernel 5.9-rc4 70fb2612aab62d47e03f82eaa7384a8d30ca175d
2973 # renamed is_ciphertext_name to is_nokey_name
2975 AC_DEFUN([LC_SRC_FSCRYPT_NOKEY_NAME], [
2976 LB2_LINUX_TEST_SRC([fname_is_nokey_name], [
2977 #include <linux/fscrypt.h>
2979 struct fscrypt_name fname;
2981 fname.is_nokey_name = true;
2984 AC_DEFUN([LC_FSCRYPT_NOKEY_NAME], [
2985 LB2_MSG_LINUX_TEST_RESULT([if struct fscrypt_name has is_nokey_name field],
2986 [fname_is_nokey_name], [
2987 AC_DEFINE(HAVE_FSCRYPT_NOKEY_NAME, 1,
2988 [struct fscrypt_name has is_nokey_name field])
2990 ]) # LC_FSCRYPT_NOKEY_NAME
2993 # LC_FSCRYPT_SET_TEST_DUMMY_ENC_CHAR_ARG
2994 # Kernel 5.9-rc4 c8c868abc91ff23f6f5c4444c419de7c277d77e1
2995 # changed fscrypt_set_test_dummy_encryption() take a 'const char *
2997 AC_DEFUN([LC_SRC_FSCRYPT_SET_TEST_DUMMY_ENC_CHAR_ARG], [
2998 LB2_LINUX_TEST_SRC([fscrypt_set_test_dummy_encryption], [
2999 #include <linux/fscrypt.h>
3002 fscrypt_set_test_dummy_encryption(NULL, arg, NULL);
3005 AC_DEFUN([LC_FSCRYPT_SET_TEST_DUMMY_ENC_CHAR_ARG], [
3006 LB2_MSG_LINUX_TEST_RESULT([if fscrypt_set_test_dummy_encryption() take 'const char' parameter],
3007 [fscrypt_set_test_dummy_encryption], [
3008 AC_DEFINE(HAVE_FSCRYPT_SET_TEST_DUMMY_ENC_CHAR_ARG, 1,
3009 [fscrypt_set_test_dummy_encryption() take 'const char' parameter])
3011 ]) # LC_FSCRYPT_SET_TEST_DUMMY_ENC_CHAR_ARG
3014 # LC_FSCRYPT_DUMMY_POLICY
3016 # Kernel 5.9-rc4 ac4acb1f4b2b6b7e8d913537cccec8789903e164
3017 # move the test dummy context for fscrypt_policy which is
3018 # also used by the user land interface.
3020 AC_DEFUN([LC_SRC_FSCRYPT_DUMMY_POLICY], [
3021 LB2_LINUX_TEST_SRC([fscrypt_free_dummy_policy], [
3022 #include <linux/fscrypt.h>
3024 fscrypt_free_dummy_policy(NULL);
3027 AC_DEFUN([LC_FSCRYPT_DUMMY_POLICY], [
3028 LB2_MSG_LINUX_TEST_RESULT([if fscrypt_free_dummy_policy() exists],
3029 [fscrypt_free_dummy_policy], [
3030 AC_DEFINE(HAVE_FSCRYPT_DUMMY_POLICY, 1,
3031 [fscrypt_free_dummy_policy() exists])
3033 ]) # LC_FSCRYPT_DUMMY_POLICY
3036 # LC_HAVE_ITER_FILE_SPLICE_WRITE
3038 # Linux commit v5.9-rc1-6-g36e2c7421f02
3039 # fs: don't allow splice read/write without explicit ops
3041 AC_DEFUN([LC_SRC_HAVE_ITER_FILE_SPLICE_WRITE], [
3042 LB2_LINUX_TEST_SRC([iter_file_splice_write], [
3043 #include <linux/fs.h>
3045 (void)iter_file_splice_write(NULL, NULL, NULL, 1, 0);
3048 AC_DEFUN([LC_HAVE_ITER_FILE_SPLICE_WRITE], [
3049 LB2_MSG_LINUX_TEST_RESULT([if iter_file_splice_write() exists],
3050 [iter_file_splice_write], [
3051 AC_DEFINE(HAVE_ITER_FILE_SPLICE_WRITE, 1,
3052 ['iter_file_splice_write' exists])
3054 ]) # LC_HAVE_ITER_FILE_SPLICE_WRITE
3057 # LC_HAVE_BDI_DEBUG_STATS
3059 # Linux kernel v5.10 commit 2d146b924ec3c0873f06308d149684dc1105d9a3
3060 # backing-dev: no need to check return value of debugfs_create functions
3061 # backing_dev_info.debug_stats was remove.
3063 AC_DEFUN([LC_SRC_HAVE_BDI_DEBUG_STATS], [
3064 LB2_LINUX_TEST_SRC([bdi_has_debug_stats], [
3065 #include <linux/backing-dev-defs.h>
3067 struct backing_dev_info info;
3069 info.debug_stats = NULL;
3072 AC_DEFUN([LC_HAVE_BDI_DEBUG_STATS], [
3073 AC_MSG_CHECKING([if 'struct backing_dev_info' has 'debug_stats' field])
3074 LB2_LINUX_TEST_RESULT([bdi_has_debug_stats], [
3075 AC_DEFINE(HAVE_BDI_DEBUG_STATS, 1,
3076 [backing_dev_info has debug_stats])
3078 ]) # LC_HAVE_BDI_DEBUG_STATS
3081 # LC_FSCRYPT_IS_NOKEY_NAME
3083 # Kernel 5.10-rc4 159e1de201b6fca10bfec50405a3b53a561096a8
3084 # introduced fscrypt_is_nokey_name() inline macro. While
3085 # introduced for 5.10 kernels it was backported to earlier
3086 # Ubuntu kernels. Also it hides the change introduced due
3087 # to git commit 501e43fbe for kernel 5.9 which also was
3088 # backported to earlier Ubuntu kernels.
3090 AC_DEFUN([LC_SRC_FSCRYPT_IS_NOKEY_NAME], [
3091 LB2_LINUX_TEST_SRC([fscrypt_is_no_key_name], [
3092 #include <linux/fscrypt.h>
3094 fscrypt_is_nokey_name(NULL);
3097 AC_DEFUN([LC_FSCRYPT_IS_NOKEY_NAME], [
3098 LB2_MSG_LINUX_TEST_RESULT([if fscrypt_is_no_key_name() exists],
3099 [fscrypt_is_no_key_name], [
3100 AC_DEFINE(HAVE_FSCRYPT_IS_NOKEY_NAME, 1,
3101 [fscrypt_is_nokey_name() exists])
3103 ]) # LC_FSCRYPT_IS_NOKEY_NAME
3106 # LC_FSCRYPT_PREPARE_READDIR
3108 # Kernel 5.10-rc4 ec0caa974cd092549ab282deb8ec7ea73b36eba0
3109 # replaced fscrypt_get_encryption_info() with
3110 # fscrypt_prepare_readdir()
3112 AC_DEFUN([LC_SRC_FSCRYPT_PREPARE_READDIR], [
3113 LB2_LINUX_TEST_SRC([fscrypt_prepare_readdir], [
3114 #include <linux/fscrypt.h>
3116 fscrypt_prepare_readdir(NULL);
3119 AC_DEFUN([LC_FSCRYPT_PREPARE_READDIR], [
3120 LB2_MSG_LINUX_TEST_RESULT([if fscrypt_prepare_readdir() exists],
3121 [fscrypt_prepare_readdir], [
3122 AC_DEFINE(HAVE_FSCRYPT_PREPARE_READDIR, 1,
3123 [fscrypt_prepare_readdir() exists])
3125 ]) # LC_FSCRYPT_PREPARE_READDIR
3130 # Linux: v5.11-rc5-9-g309dca309fc3
3131 # block: store a block_device pointer in struct bio
3132 # created bio_set_dev macro
3133 # Linux: v5.15-rc6-127-gcf6d6238cdd3
3134 # block: turn macro helpers into inline functions
3135 # created inline function(s).
3137 # Only provide a bio_set_dev it is is not proveded by the kernel
3139 AC_DEFUN([LC_SRC_BIO_SET_DEV], [
3140 LB2_LINUX_TEST_SRC([bio_set_dev], [
3141 #include <linux/bio.h>
3143 struct bio *bio = NULL;
3144 struct block_device *bdev = NULL;
3146 bio_set_dev(bio, bdev);
3149 AC_DEFUN([LC_BIO_SET_DEV], [
3150 LB2_MSG_LINUX_TEST_RESULT([if 'bio_set_dev' is available],
3152 AC_DEFINE(HAVE_BIO_SET_DEV, 1, ['bio_set_dev' is available])
3157 # LC_HAVE_USER_NAMESPACE_ARG
3159 # kernel 5.12 commit 549c7297717c32ee53f156cd949e055e601f67bb
3160 # fs: make helpers idmap mount aware
3161 # Extend some inode methods with an additional user namespace argument.
3163 AC_DEFUN([LC_SRC_HAVE_USER_NAMESPACE_ARG], [
3164 LB2_LINUX_TEST_SRC([inode_ops_has_user_namespace_argument], [
3165 #include <linux/fs.h>
3167 struct inode_operations *iops = NULL;
3168 struct user_namespace *user_ns = NULL;
3170 iops->getattr(user_ns, NULL, NULL, 0, 0);
3173 AC_DEFUN([LC_HAVE_USER_NAMESPACE_ARG], [
3174 LB2_MSG_LINUX_TEST_RESULT([if 'inode_operations' members have user namespace argument],
3175 [inode_ops_has_user_namespace_argument], [
3176 AC_DEFINE(HAVE_USER_NAMESPACE_ARG, 1,
3177 ['inode_operations' members have user namespace argument])
3179 ]) # LC_HAVE_USER_NAMESPACE_ARG
3182 # LC_HAVE_FILEATTR_GET
3184 # kernel 5.13 4c5b479975212065ef39786e115fde42847e95a9
3185 # vfs: add fileattr ops
3186 # Add inode operations to replace FS_IOC_[SG]ETFLAGS ioctl
3187 # The type signature of ->fileattr_set is not stable for the
3188 # first few iterations, so don't commit to a particular signature
3189 # here. Hopefully we will only want to support the final version.
3191 AC_DEFUN([LC_SRC_HAVE_FILEATTR_GET], [
3192 LB2_LINUX_TEST_SRC([fileattr_set], [
3193 #include <linux/fs.h>
3195 struct inode_operations *iops = NULL;
3196 iops->fileattr_get(NULL, NULL);
3199 AC_DEFUN([LC_HAVE_FILEATTR_GET], [
3200 AC_MSG_CHECKING([if 'inode_operations' has fileattr_get (and fileattr_set)])
3201 LB2_LINUX_TEST_RESULT([fileattr_set], [
3202 AC_DEFINE(HAVE_FILEATTR_GET, 1,
3203 ['inode_operations' has fileattr_get and fileattr_set])
3206 ]) # LC_HAVE_FILEATTR_GET
3208 # LC_HAVE_COPY_PAGE_FROM_ITER_ATOMIC
3210 # Kernel 5.13 commit f0b65f39ac505e8f1dcdaa165aa7b8c0bd6fd454
3211 # iov_iter: replace iov_iter_copy_from_user_atomic() with iterator-advancing variant
3213 AC_DEFUN([LC_SRC_HAVE_COPY_PAGE_FROM_ITER_ATOMIC], [
3214 LB2_LINUX_TEST_SRC([copy_page_from_iter_atomic], [
3215 #include <linux/uio.h>
3217 copy_page_from_iter_atomic(NULL, 0, 0, NULL);
3220 AC_DEFUN([LC_HAVE_COPY_PAGE_FROM_ITER_ATOMIC], [
3221 AC_MSG_CHECKING([if have copy_page_from_iter_atomic])
3222 LB2_LINUX_TEST_RESULT([copy_page_from_iter_atomic], [
3223 AC_DEFINE(HAVE_COPY_PAGE_FROM_ITER_ATOMIC, 1,
3224 ['copy_page_from_iter_atomic' exists])
3226 ]) # LC_HAVE_COPY_PAGE_FROM_ITER_ATOMIC
3229 # LC_HAVE_GET_ACL_RCU_ARG
3231 # kernel 5.15 commit 0cad6246621b5887d5b33fea84219d2a71f2f99a
3232 # vfs: add rcu argument to ->get_acl() callback
3233 # Add a rcu argument to the ->get_acl() callback to allow
3234 # get_cached_acl_rcu() to call the ->get_acl() method.
3236 AC_DEFUN([LC_SRC_HAVE_GET_ACL_RCU_ARG], [
3237 LB2_LINUX_TEST_SRC([get_acl_rcu_argument], [
3238 #include <linux/fs.h>
3240 ((struct inode_operations *)1)->get_acl((struct inode *)NULL, 0, false);
3243 AC_DEFUN([LC_HAVE_GET_ACL_RCU_ARG], [
3244 LB2_MSG_LINUX_TEST_RESULT([if 'get_acl' has a rcu argument],
3245 [get_acl_rcu_argument], [
3246 AC_DEFINE(HAVE_GET_ACL_RCU_ARG, 1,
3247 ['get_acl' has a rcu argument])
3249 ]) # LC_HAVE_GET_ACL_RCU_ARG
3251 # LC_HAVE_FAULT_IN_IOV_ITER_READABLE
3253 # Kernel 5.15 commit a6294593e8a1290091d0b078d5d33da5e0cd3dfe
3254 # iov_iter: Turn iov_iter_fault_in_readable into fault_in_iov_iter_readable
3256 AC_DEFUN([LC_SRC_HAVE_FAULT_IN_IOV_ITER_READABLE], [
3257 LB2_LINUX_TEST_SRC([fault_in_iov_iter_readable], [
3258 #include <linux/uio.h>
3260 fault_in_iov_iter_readable(NULL, 0);
3263 AC_DEFUN([LC_HAVE_FAULT_IN_IOV_ITER_READABLE], [
3264 AC_MSG_CHECKING([if have fault_in_iov_iter_readable])
3265 LB2_LINUX_TEST_RESULT([fault_in_iov_iter_readable], [
3266 AC_DEFINE(HAVE_FAULT_IN_IOV_ITER_READABLE, 1,
3267 ['fault_in_iov_iter_readable' exists])
3269 ]) # LC_HAVE_FAULT_IN_IOV_ITER_READABLE
3272 # LC_HAVE_INVALIDATE_LOCK
3274 # Kernel version v5.15-rc1 commit 730633f0b7f951726e87f912a6323641f674ae34
3275 # mm: Protect operations adding pages to page cache with invalidate_lock
3277 AC_DEFUN([LC_HAVE_INVALIDATE_LOCK], [
3278 tmp_flags="$EXTRA_KCFLAGS"
3279 EXTRA_KCFLAGS="-Werror"
3280 LB_CHECK_COMPILE([if have address_space have invalidate_lock member],
3281 address_space_invalidate_lock, [
3282 #include <linux/fs.h>
3284 struct address_space *mapping = NULL;
3286 filemap_invalidate_lock(mapping);
3288 AC_DEFINE(HAVE_INVALIDATE_LOCK, 1,
3289 [address_space invalidate_lock member exists])
3291 EXTRA_KCFLAGS="$tmp_flags"
3292 ]) # LC_HAVE_INVALIDATE_LOCK
3295 # LC_HAVE_SECURITY_DENTRY_INIT_WITH_XATTR_NAME_ARG
3297 # Linux v5.15-rc1-20-g15bf32398ad4
3298 # security: Return xattr name from security_dentry_init_security()
3300 AC_DEFUN([LC_SRC_HAVE_SECURITY_DENTRY_INIT_WITH_XATTR_NAME_ARG], [
3301 LB2_LINUX_TEST_SRC([security_dentry_init_security_xattr_name_arg], [
3302 #include <linux/security.h>
3304 struct dentry *dentry = NULL;
3306 const struct qstr *name = NULL;
3307 const char *xattr_name = NULL;
3310 int rc = security_dentry_init_security(dentry, mode, name, &xattr_name,
3316 AC_DEFUN([LC_HAVE_SECURITY_DENTRY_INIT_WITH_XATTR_NAME_ARG], [
3317 LB2_MSG_LINUX_TEST_RESULT([if security_dentry_init_security() returns xattr name],
3318 [security_dentry_init_security_xattr_name_arg], [
3319 AC_DEFINE(HAVE_SECURITY_DENTRY_INIT_WITH_XATTR_NAME_ARG, 1,
3320 [security_dentry_init_security() returns xattr name])
3322 ]) # LC_HAVE_SECURITY_DENTRY_INIT_WITH_XATTR_NAME_ARG
3325 # LC_HAVE_KIOCB_COMPLETE_2ARGS
3327 # kernel v5.15-rc6-145-g6b19b766e8f0
3328 # fs: get rid of the res2 iocb->ki_complete argument
3330 AC_DEFUN([LC_SRC_HAVE_KIOCB_COMPLETE_2ARGS], [
3331 LB2_LINUX_TEST_SRC([kiocb_ki_complete_2args], [
3332 #include <linux/fs.h>
3334 static void complete_fn(struct kiocb *iocb, long ret)
3340 struct kiocb *kio = NULL;
3342 kio->ki_complete = complete_fn;
3345 AC_DEFUN([LC_HAVE_KIOCB_COMPLETE_2ARGS], [
3346 LB2_MSG_LINUX_TEST_RESULT([if kiocb->ki_complete() has 2 arguments],
3347 [kiocb_ki_complete_2args], [
3348 AC_DEFINE(HAVE_KIOCB_COMPLETE_2ARGS, 1,
3349 [kiocb->ki_complete() has 2 arguments])
3351 ]) # LC_HAVE_KIOCB_COMPLETE_2ARGS
3354 # LC_EXPORTS_DELETE_FROM_PAGE_CACHE
3356 # Linux commit v5.16-rc4-44-g452e9e6992fe
3357 # filemap: Add filemap_remove_folio and __filemap_remove_folio
3359 # Also removes the export of delete_from_page_cache
3361 AC_DEFUN([LC_EXPORTS_DELETE_FROM_PAGE_CACHE], [
3362 LB_CHECK_EXPORT([delete_from_page_cache], [mm/filemap.c],
3363 [AC_DEFINE(HAVE_DELETE_FROM_PAGE_CACHE, 1,
3364 [delete_from_page_cache is exported])])
3365 ]) # LC_EXPORTS_DELETE_FROM_PAGE_CACHE
3369 # LC_HAVE_WB_STAT_MOD
3371 # Kernel 5.16-rc1 bd3488e7b4d61780eb3dfaca1cc6f4026bcffd48
3372 # mm/writeback: Rename __add_wb_stat() to wb_stat_mod()
3374 AC_DEFUN([LC_HAVE_WB_STAT_MOD], [
3375 tmp_flags="$EXTRA_KCFLAGS"
3376 EXTRA_KCFLAGS="-Werror"
3377 LB_CHECK_COMPILE([if wb_stat_mod() exists],
3379 #include <linux/backing-dev.h>
3381 wb_stat_mod(NULL, WB_WRITEBACK, 1);
3383 AC_DEFINE(HAVE_WB_STAT_MOD, 1,
3384 [wb_stat_mod() exists])
3386 EXTRA_KCFLAGS="$tmp_flags"
3387 ]) # LC_HAVE_WB_STAT_MOD
3390 # LC_HAVE_INVALIDATE_FOLIO
3392 # linux commit v5.17-rc4-10-g128d1f8241d6
3393 # fs: Add invalidate_folio() aops method
3395 AC_DEFUN([LC_SRC_HAVE_INVALIDATE_FOLIO], [
3396 LB2_LINUX_TEST_SRC([address_spaace_operaions_invalidate_folio], [
3397 #include <linux/fs.h>
3399 struct address_space_operations *aops = NULL;
3400 struct folio *folio = NULL;
3401 aops->invalidate_folio(folio, 0, PAGE_SIZE);
3405 AC_DEFUN([LC_HAVE_INVALIDATE_FOLIO], [
3406 LB2_MSG_LINUX_TEST_RESULT([if have address_spaace_operaions->invalidate_folio() member],
3407 [address_spaace_operaions_invalidate_folio], [
3408 AC_DEFINE(HAVE_INVALIDATE_FOLIO, 1,
3409 [address_spaace_operaions->invalidate_folio() member exists])
3411 ]) # LC_HAVE_INVALIDATE_FOLIO
3414 # LC_HAVE_DIRTY_FOLIO
3416 # linux commit v5.17-rc4-38-g6f31a5a261db
3417 # fs: Add aops->dirty_folio
3418 # ... replaces ->set_page_dirty() with ->dirty_folio()
3420 AC_DEFUN([LC_SRC_HAVE_DIRTY_FOLIO], [
3421 LB2_LINUX_TEST_SRC([address_spaace_operaions_dirty_folio], [
3422 #include <linux/fs.h>
3424 struct address_space_operations *aops = NULL;
3425 struct address_space *mapping = NULL;
3426 struct folio *folio = NULL;
3427 bool dirty = aops->dirty_folio(mapping, folio);
3431 AC_DEFUN([LC_HAVE_DIRTY_FOLIO], [
3432 LB2_MSG_LINUX_TEST_RESULT([if have address_spaace_operaions->dirty_folio() member],
3433 [address_spaace_operaions_dirty_folio], [
3434 AC_DEFINE(HAVE_DIRTY_FOLIO, 1,
3435 [address_spaace_operaions->dirty_folio() member exists])
3437 ]) # LC_HAVE_DIRTY_FOLIO
3440 # LC_HAVE_ALLOC_INODE_SB
3442 # linux commit v5.17-49-g8b9f3ac5b01d
3443 # fs: introduce alloc_inode_sb() to allocate filesystems specific inode
3445 AC_DEFUN([LC_SRC_HAVE_ALLOC_INODE_SB], [
3446 LB2_LINUX_TEST_SRC([alloc_inode_sb], [
3447 #include <linux/fs.h>
3449 struct super_block *sb = NULL;
3450 struct kmem_cache *cache = NULL;
3452 (void)alloc_inode_sb(sb, cache, GFP_NOFS);
3455 AC_DEFUN([LC_HAVE_ALLOC_INODE_SB], [
3456 LB2_MSG_LINUX_TEST_RESULT([if alloc_inode_sb() exists],
3458 AC_DEFINE(HAVE_ALLOC_INODE_SB, 1,
3459 [alloc_inode_sb() exists])
3461 ]) # LC_HAVE_ALLOC_INODE_SB
3464 # LC_GRAB_CACHE_PAGE_WRITE_BEGIN_WITH_FLAGS
3466 # Linux commit v5.18-rc5-221-gb7446e7cf15f
3467 # fs: Remove aop flags parameter from grab_cache_page_write_begin()
3469 AC_DEFUN([LC_SRC_GRAB_CACHE_PAGE_WRITE_BEGIN_WITH_FLAGS], [
3470 LB2_LINUX_TEST_SRC([grab_cache_page_write_begin_with_flags], [
3471 #include <linux/pagemap.h>
3473 struct address_space *mapping = NULL;
3474 (void)grab_cache_page_write_begin(mapping, 0, 1);
3477 AC_DEFUN([LC_GRAB_CACHE_PAGE_WRITE_BEGIN_WITH_FLAGS], [
3478 LB2_MSG_LINUX_TEST_RESULT([if grab_cache_page_write_begin() has flags argument],
3479 [grab_cache_page_write_begin_with_flags], [
3480 AC_DEFINE(HAVE_GRAB_CACHE_PAGE_WRITE_BEGIN_WITH_FLAGS, 1,
3481 [grab_cache_page_write_begin() has flags argument])
3483 ]) # LC_GRAB_CACHE_PAGE_WRITE_BEGIN_WITH_FLAGS
3486 # LC_HAVE_ADDRESS_SPACE_OPERATIONS_READ_FOLIO
3488 # Linux commit v5.18-rc5-241-g5efe7448a142
3489 # fs: Introduce aops->read_folio
3491 AC_DEFUN([LC_SRC_HAVE_ADDRESS_SPACE_OPERATIONS_READ_FOLIO], [
3492 LB2_LINUX_TEST_SRC([address_space_operations_read_folio], [
3493 #include <linux/fs.h>
3495 struct address_space_operations *aops = NULL;
3496 struct file *file = NULL;
3497 struct folio *folio = NULL;
3498 int err = aops->read_folio(file, folio);
3502 AC_DEFUN([LC_HAVE_ADDRESS_SPACE_OPERATIONS_READ_FOLIO], [
3503 LB2_MSG_LINUX_TEST_RESULT([if struct address_space_operations() has read_folio()],
3504 [address_space_operations_read_folio], [
3505 AC_DEFINE(HAVE_AOPS_READ_FOLIO, 1,
3506 [struct address_space_operations() has read_folio()])
3508 ]) # LC_HAVE_ADDRESS_SPACE_OPERATIONS_READ_FOLIO
3511 # LC_HAVE_READ_CACHE_PAGE_FILLER_WITH_FILE
3513 # Linux commit v5.18-rc5-280-ge9b5b23e957e
3514 # fs: Change the type of filler_t
3516 AC_DEFUN([LC_SRC_HAVE_READ_CACHE_PAGE_FILLER_WITH_FILE], [
3517 LB2_LINUX_TEST_SRC([read_cache_page_filler_with_file], [
3518 #include <linux/pagemap.h>
3519 static inline int _filler(struct file *file, struct folio *f)
3524 struct address_space *mapping = NULL;
3525 struct file *file = NULL;
3526 struct page *page = read_cache_page(mapping, 0, _filler, file);
3530 AC_DEFUN([LC_HAVE_READ_CACHE_PAGE_FILLER_WITH_FILE], [
3531 LB2_MSG_LINUX_TEST_RESULT([if read_cache_page() filler_t needs struct file],
3532 [read_cache_page_filler_with_file], [
3533 AC_DEFINE(HAVE_READ_CACHE_PAGE_WANTS_FILE, 1,
3534 [read_cache_page() filler_t needs struct file])
3536 ]) # LC_HAVE_READ_CACHE_PAGE_FILLER_WITH_FILE
3539 # LC_HAVE_ADDRESS_SPACE_OPERATIONS_RELEASE_FOLIO
3541 # Linux commit v5.18-rc5-282-gfa29000b6b26
3542 # fs: Add aops->release_folio
3544 AC_DEFUN([LC_SRC_HAVE_ADDRESS_SPACE_OPERATIONS_RELEASE_FOLIO], [
3545 LB2_LINUX_TEST_SRC([address_space_operations_release_folio], [
3546 #include <linux/fs.h>
3548 struct address_space_operations *aops = NULL;
3549 struct folio *folio = NULL;
3550 int err = aops->release_folio(folio, GFP_KERNEL);
3554 AC_DEFUN([LC_HAVE_ADDRESS_SPACE_OPERATIONS_RELEASE_FOLIO], [
3555 LB2_MSG_LINUX_TEST_RESULT([if struct address_space_operations() has release_folio()],
3556 [address_space_operations_release_folio], [
3557 AC_DEFINE(HAVE_AOPS_RELEASE_FOLIO, 1,
3558 [struct address_space_operations() has release_folio()])
3560 ]) # LC_HAVE_ADDRESS_SPACE_OPERATIONS_RELEASE_FOLIO
3563 # LC_HAVE_LSMCONTEXT_INIT
3565 # repo: git://git.launchpad.net/~ubuntu-kernel/ubuntu/+source/linux/+git/jammy
3566 # kernel linux-hwe-5.19 commit fef1deb99dad87dd700afae76b35c5b5750e33a8
3567 # LSM: Removed scaffolding function lsmcontext_init
3569 AC_DEFUN([LC_SRC_HAVE_LSMCONTEXT_INIT], [
3570 LB2_LINUX_TEST_SRC([lsmcontext_init], [
3571 #include <linux/security.h>
3573 struct lsmcontext ctx = {};
3575 lsmcontext_init(&ctx, "", 0, 0);
3578 AC_DEFUN([LC_HAVE_LSMCONTEXT_INIT], [
3579 LB2_MSG_LINUX_TEST_RESULT([if lsmcontext_init is available],
3580 [lsmcontext_init], [
3581 AC_DEFINE(HAVE_LSMCONTEXT_INIT, 1,
3582 [lsmcontext_init is available])
3584 ]) # LC_HAVE_LSMCONTEXT_INIT
3587 # LC_SECURITY_DENTRY_INIT_SECURTY_WITH_CTX
3589 # repo: git://git.launchpad.net/~ubuntu-kernel/ubuntu/+source/linux/+git/jammy
3590 # kernel linux-hwe-5.19 commit 57d0004bc811254916be30f94c86d9607867deb0
3591 # LSM: Use lsmcontext in security_dentry_init_security
3593 AC_DEFUN([LC_SRC_SECURITY_DENTRY_INIT_SECURTY_WITH_CTX], [
3594 LB2_LINUX_TEST_SRC([security_dentry_init_security_with_ctx], [
3595 #include <linux/security.h>
3597 struct dentry *dentry = NULL;
3598 const struct qstr *name = NULL;
3599 struct lsmcontext *ctx = NULL;
3600 const char *xattr_name = "";
3602 (void)security_dentry_init_security(dentry, 0, name,
3606 AC_DEFUN([LC_SECURITY_DENTRY_INIT_SECURTY_WITH_CTX], [
3607 LB2_MSG_LINUX_TEST_RESULT([if security_dentry_init_security needs lsmcontext],
3608 [security_dentry_init_security_with_ctx], [
3609 AC_DEFINE(HAVE_SECURITY_DENTRY_INIT_SECURTY_WITH_CTX, 1,
3610 [security_dentry_init_security needs lsmcontext])
3612 ]) # LC_SECURITY_DENTRY_INIT_SECURTY_WITH_CTX
3617 # Linux commit v5.19-rc2-6-g868941b14441
3618 # fs: remove no_llseek
3620 AC_DEFUN([LC_SRC_HAVE_NO_LLSEEK], [
3621 LB2_LINUX_TEST_SRC([no_llseek], [
3622 #include <linux/fs.h>
3624 static const struct file_operations fops = {
3625 .llseek = &no_llseek,
3630 AC_DEFUN([LC_HAVE_NO_LLSEEK], [
3631 LB2_MSG_LINUX_TEST_RESULT([if no_llseek() is available],
3633 AC_DEFINE(HAVE_NO_LLSEEK, 1, [no_llseek() is available])
3635 ]) # LC_HAVE_NO_LLSEEK
3638 # LC_DQUOT_TRANSFER_WITH_USER_NS
3640 # Linux commit v5.19-rc3-6-g71e7b535b890
3641 # quota: port quota helpers mount ids
3643 AC_DEFUN([LC_SRC_DQUOT_TRANSFER_WITH_USER_NS], [
3644 LB2_LINUX_TEST_SRC([dquot_transfer], [
3645 #include <linux/quotaops.h>
3647 struct user_namespace *userns = NULL;
3648 struct inode *inode = NULL;
3649 struct iattr *iattr = NULL;
3650 int err __attribute__ ((unused));
3652 err = dquot_transfer(userns, inode, iattr);
3655 AC_DEFUN([LC_DQUOT_TRANSFER_WITH_USER_NS], [
3656 LB2_MSG_LINUX_TEST_RESULT([if dquot_transfer() has user_ns argument],
3658 AC_DEFINE(HAVE_DQUOT_TRANSFER_WITH_USER_NS, 1,
3659 [dquot_transfer() has user_ns argument])
3661 ]) # LC_DQUOT_TRANSFER_WITH_USER_NS
3664 # LC_HAVE_ADDRESS_SPACE_OPERATIONS_MIGRATE_FOLIO
3666 # Linux commit v5.19-rc3-392-g5490da4f06d1
3667 # fs: Add aops->migrate_folio
3669 AC_DEFUN([LC_SRC_HAVE_ADDRESS_SPACE_OPERATIONS_MIGRATE_FOLIO], [
3670 LB2_LINUX_TEST_SRC([address_space_operations_migrate_folio], [
3671 #include <linux/fs.h>
3673 struct address_space_operations *aops = NULL;
3674 struct address_space *m = NULL;
3675 struct folio *src = NULL;
3676 struct folio *dst = NULL;
3677 int err = aops->migrate_folio(m, dst, src, MIGRATE_ASYNC);
3681 AC_DEFUN([LC_HAVE_ADDRESS_SPACE_OPERATIONS_MIGRATE_FOLIO], [
3682 LB2_MSG_LINUX_TEST_RESULT([if struct address_space_operations() has migrate_folio()],
3683 [address_space_operations_migrate_folio], [
3684 AC_DEFINE(HAVE_AOPS_MIGRATE_FOLIO, 1,
3685 [struct address_space_operations() has migrate_folio()])
3687 ]) # LC_HAVE_ADDRESS_SPACE_OPERATIONS_MIGRATE_FOLIO
3690 # LC_REGISTER_SHRINKER_FORMAT_NAMED
3692 # Linux commit v5.19-rc4-52-ge33c267ab70d
3693 # mm: shrinkers: provide shrinkers with names
3695 AC_DEFUN([LC_SRC_REGISTER_SHRINKER_FORMAT_NAMED], [
3696 LB2_LINUX_TEST_SRC([register_shrinker_format], [
3697 #include <linux/mm.h>
3699 if (register_shrinker(NULL, "lustre-%ps", __func__))
3700 unregister_shrinker(NULL);
3703 AC_DEFUN([LC_REGISTER_SHRINKER_FORMAT_NAMED], [
3704 LB2_MSG_LINUX_TEST_RESULT([if register_shrinker() returns status],
3705 [register_shrinker_format], [
3706 AC_DEFINE(HAVE_REGISTER_SHRINKER_FORMAT_NAMED, 1,
3707 [register_shrinker() returns status])
3709 ]) # LC_REGISTER_SHRINKER_FORMAT_NAMED
3712 # LC_HAVE_VFS_SETXATTR_NON_CONST_VALUE
3714 # From Linux commit v5.19-rc5-17-g0c5fd887d2bb
3715 # acl: move idmapped mount fixup into vfs_{g,s}etxattr()
3716 # Until Linux commit v6.0-rc3-6-g6344e66970c6
3717 # xattr: constify value argument in vfs_setxattr()
3719 AC_DEFUN([LC_SRC_HAVE_VFS_SETXATTR_NON_CONST_VALUE], [
3720 LB2_LINUX_TEST_SRC([vfs_setxattr_non_const_value_arg], [
3721 #include <linux/xattr.h>
3723 struct dentry *de = NULL;
3724 const char *name = "an.xattr";
3725 const void *value = NULL;
3726 int err = vfs_setxattr(&init_user_ns, de, name, value, 0, 0);
3729 ]) # LC_HAVE_VFS_SETXATTR_NON_CONST_VALUE
3730 AC_DEFUN([LC_HAVE_VFS_SETXATTR_NON_CONST_VALUE], [
3731 LB2_MSG_LINUX_TEST_RESULT([if vfs_setxattr() value argument is non-const],
3732 [vfs_setxattr_non_const_value_arg], [
3733 AC_DEFINE([VFS_SETXATTR_VALUE(value)],
3735 [vfs_setxattr() value argument is const void *])
3737 AC_DEFINE([VFS_SETXATTR_VALUE(value)],
3738 [((void *)(value))],
3739 [vfs_setxattr() value argument is non-const])
3741 ]) # LC_HAVE_VFS_SETXATTR_NON_CONST_VALUE
3744 # LC_HAVE_IOV_ITER_GET_PAGES_ALLOC2
3746 # Linux commit v5.19-10313-geba2d3d79829
3747 # get rid of non-advancing variants
3749 AC_DEFUN([LC_SRC_HAVE_IOV_ITER_GET_PAGES_ALLOC2], [
3750 LB2_LINUX_TEST_SRC([iov_iter_get_pages_alloc2], [
3751 #include <linux/uio.h>
3753 struct iov_iter *iter = NULL;
3754 struct page ***pages = NULL;
3757 size_t result __attribute__ ((unused));
3758 result = iov_iter_get_pages_alloc2(iter, pages, maxsize, &start);
3761 AC_DEFUN([LC_HAVE_IOV_ITER_GET_PAGES_ALLOC2], [
3762 LB2_MSG_LINUX_TEST_RESULT([if iov_iter_get_pages_alloc2() is available],
3763 [iov_iter_get_pages_alloc2], [
3764 AC_DEFINE(HAVE_IOV_ITER_GET_PAGES_ALLOC2, 1,
3765 [iov_iter_get_pages_alloc2() is available])
3767 ]) # LC_HAVE_IOV_ITER_GET_PAGES_ALLOC2
3770 # LC_HAVE_GET_RANDOM_U32_AND_U64
3772 # Linux commit v4.10-rc3-6-gc440408cf690
3773 # random: convert get_random_int/long into get_random_u32/u64
3774 # Linux commit v6.0-11338-gde492c83cae0
3775 # prandom: remove unused functions
3777 AC_DEFUN([LC_SRC_HAVE_GET_RANDOM_U32_AND_U64], [
3778 LB2_LINUX_TEST_SRC([get_random_u32_and_u64], [
3779 #include <linux/random.h>
3781 u32 rand32 = get_random_u32();
3782 u64 rand64 = get_random_u64();
3787 AC_DEFUN([LC_HAVE_GET_RANDOM_U32_AND_U64], [
3788 LB2_MSG_LINUX_TEST_RESULT([if get_random_u32() and get_random_u64() are available],
3789 [get_random_u32_and_u64], [
3790 AC_DEFINE(HAVE_GET_RANDOM_U32_AND_U64, 1,
3791 [get_random_[u32|u64] are available])
3793 AC_DEFINE([get_random_u32()], [prandom_u32()],
3794 [get_random_u32() is not available, use prandom_u32])
3796 ]) # LC_HAVE_GET_RANDOM_U32_AND_U64
3799 # LC_NFS_FILLDIR_USE_CTX_RETURN_BOOL
3801 # Linux commit v6.0-rc1-2-g25885a35a720
3802 # Change calling conventions for filldir_t
3804 AC_DEFUN([LC_SRC_NFS_FILLDIR_USE_CTX_RETURN_BOOL], [
3805 LB2_LINUX_TEST_SRC([filldir_ctx_return_bool], [
3806 #include <linux/fs.h>
3808 bool filldir(struct dir_context *ctx, const char* name,
3809 int i, loff_t off, u64 tmp, unsigned temp)
3814 struct dir_context ctx = {
3818 ctx.actor(NULL, "test", 0, (loff_t) 0, 0, 0);
3821 AC_DEFUN([LC_NFS_FILLDIR_USE_CTX_RETURN_BOOL], [
3822 LB2_MSG_LINUX_TEST_RESULT([if filldir_t uses struct dir_context and returns bool],
3823 [filldir_ctx_return_bool], [
3824 AC_DEFINE(HAVE_FILLDIR_USE_CTX_RETURN_BOOL, 1,
3825 [filldir_t needs struct dir_context and returns bool])
3826 AC_DEFINE(HAVE_FILLDIR_USE_CTX, 1,
3827 [filldir_t needs struct dir_context as argument])
3828 AC_DEFINE(FILLDIR_TYPE, bool,
3829 [filldir_t return type is bool or int])
3831 AC_DEFINE(FILLDIR_TYPE, int,
3832 [filldir_t return type is bool or int])
3834 ]) # LC_NFS_FILLDIR_USE_CTX_RETURN_BOOL
3837 # LC_HAVE_FILEMAP_GET_FOLIOS_CONTIG
3839 # Linux commit v6.0-rc3-94-g35b471467f88
3840 # filemap: add filemap_get_folios_contig()
3842 AC_DEFUN([LC_SRC_HAVE_FILEMAP_GET_FOLIOS_CONTIG], [
3843 LB2_LINUX_TEST_SRC([filemap_get_folios_contig], [
3844 #include <linux/pagemap.h>
3846 struct address_space *m = NULL;
3848 struct folio_batch *fbatch = NULL;
3849 (void)filemap_get_folios_contig(m, &start, ULONG_MAX, fbatch);
3852 AC_DEFUN([LC_HAVE_FILEMAP_GET_FOLIOS_CONTIG], [
3853 LB2_MSG_LINUX_TEST_RESULT([if filemap_get_folios_contig() is available],
3854 [filemap_get_folios_contig], [
3855 AC_DEFINE(HAVE_FILEMAP_GET_FOLIOS_CONTIG, 1,
3856 [filemap_get_folios_contig() is available])
3858 ]) # LC_HAVE_FILEMAP_GET_FOLIOS_CONTIG
3861 # LC_HAVE_GET_RANDOM_U32_BELOW
3863 # Linux commit v6.1-13825-g3c202d14a9d7
3864 # prandom: remove prandom_u32_max()
3866 AC_DEFUN([LC_SRC_HAVE_GET_RANDOM_U32_BELOW], [
3867 LB2_LINUX_TEST_SRC([get_random_u32_below], [
3868 #include <linux/random.h>
3870 u32 rand32 = get_random_u32_below(99);
3874 AC_DEFUN([LC_HAVE_GET_RANDOM_U32_BELOW], [
3875 LB2_MSG_LINUX_TEST_RESULT([if get_random_u32_below()is available],
3876 [get_random_u32_below], [
3877 AC_DEFINE(HAVE_GET_RANDOM_U32_BELOW, 1,
3878 [get_random_u32_below() is available])
3880 AC_DEFINE([get_random_u32_below(v)], [prandom_u32_max(v)],
3881 [get_random_u32_below() is not available])
3883 ]) # LC_HAVE_GET_RANDOM_U32_BELOW
3886 # LC_HAVE_ACL_WITH_DENTRY
3888 # Linux commit v6.1-rc1-2-g138060ba92b3
3889 # fs: pass dentry to set acl method
3890 # Linux commit v6.1-rc1-4-g7420332a6ff4
3891 # fs: add new get acl method
3893 AC_DEFUN([LC_SRC_HAVE_ACL_WITH_DENTRY], [
3894 LB2_LINUX_TEST_SRC([acl_with_dentry], [
3895 #include <linux/fs.h>
3897 struct dentry *dentry = NULL;
3899 ((struct inode_operations *)1)->get_acl(NULL, dentry, 0);
3903 AC_DEFUN([LC_HAVE_ACL_WITH_DENTRY], [
3904 LB2_MSG_LINUX_TEST_RESULT([if 'get_acl' and 'set_acl' use dentry argument],
3905 [acl_with_dentry], [
3906 AC_DEFINE(HAVE_ACL_WITH_DENTRY, 1,
3907 ['get_acl' and 'set_acl' use dentry argument])
3909 ]) # LC_HAVE_ACL_WITH_DENTRY
3912 # LC_HAVE_U64_CAPABILITY
3914 # linux kernel v6.2-13111-gf122a08b197d
3915 # capability: just use a 'u64' instead of a 'u32[2]' array
3917 AC_DEFUN([LC_SRC_HAVE_U64_CAPABILITY], [
3918 LB2_LINUX_TEST_SRC([kernel_cap_t_has_u64_value], [
3919 #include <linux/cred.h>
3920 #include <linux/capability.h>
3922 kernel_cap_t cap __attribute__ ((unused));
3923 cap.val = 0xffffffffffffffffull;
3926 AC_DEFUN([LC_HAVE_U64_CAPABILITY], [
3927 LB2_MSG_LINUX_TEST_RESULT([if 'kernel_cap_t' has u64 val],
3928 [kernel_cap_t_has_u64_value], [
3929 AC_DEFINE(HAVE_U64_CAPABILITY, 1,
3930 ['kernel_cap_t' has u64 val])
3932 ]) # LC_HAVE_U64_CAPABILITY
3935 # LC_HAVE_MNT_IDMAP_ARG
3937 # linux kernel v6.2-rc1-4-gb74d24f7a74f
3938 # fs: port ->getattr() to pass mnt_idmap
3939 # linux kernel v6.2-rc1-3-gc1632a0f1120
3940 # fs: port ->setattr() to pass mnt_idmap
3942 AC_DEFUN([LC_SRC_HAVE_MNT_IDMAP_ARG], [
3943 LB2_LINUX_TEST_SRC([inode_ops_getattr_has_mnt_idmap_argument], [
3944 #include <linux/mount.h>
3945 #include <linux/fs.h>
3947 ((struct inode_operations *)1)->getattr((struct mnt_idmap *)NULL,
3951 AC_DEFUN([LC_HAVE_MNT_IDMAP_ARG], [
3952 LB2_MSG_LINUX_TEST_RESULT([if 'inode_operations' members have mnt_idmap argument],
3953 [inode_ops_getattr_has_mnt_idmap_argument], [
3954 AC_DEFINE(HAVE_MNT_IDMAP_ARG, 1,
3955 ['inode_operations' members have mnt_idmap argument])
3956 AC_DEFINE(HAVE_USER_NAMESPACE_ARG, 1,
3957 [use mnt_idmap in place of user_namespace argument])
3958 AC_DEFINE(HAVE_DQUOT_TRANSFER_WITH_USER_NS, 1,
3959 [use mnt_idmap with dquot_transfer])
3961 ]) # LC_HAVE_MNT_IDMAP_ARG
3964 # LC_HAVE_LOCKS_LOCK_FILE_WAIT_IN_FILELOCK
3966 # Linux commit v6.2-rc3-9-g5970e15dbcfe
3967 # filelock: move file locking definitions to separate header file
3969 AC_DEFUN([LC_SRC_HAVE_LOCKS_LOCK_FILE_WAIT_IN_FILELOCK], [
3970 LB2_LINUX_TEST_SRC([locks_lock_file_wait_in_filelock], [
3971 #include <linux/filelock.h>
3973 locks_lock_file_wait(NULL, NULL);
3976 AC_DEFUN([LC_HAVE_LOCKS_LOCK_FILE_WAIT_IN_FILELOCK], [
3977 LB2_MSG_LINUX_TEST_RESULT([if 'locks_lock_file_wait' exists in filelock.h],
3978 [locks_lock_file_wait_in_filelock], [
3979 AC_DEFINE(HAVE_LOCKS_LOCK_FILE_WAIT, 1,
3980 [kernel has locks_lock_file_wait in filelock.h])
3981 AC_DEFINE(HAVE_LINUX_FILELOCK_HEADER, 1,
3982 [linux/filelock.h is present])
3984 ]) # LC_HAVE_LOCKS_LOCK_FILE_WAIT_IN_FILELOCK
3989 # Lustre linux kernel checks
3991 AC_DEFUN([LC_PROG_LINUX_SRC], [
3992 AS_IF([test "x$enable_gss" != xno], [
3993 LC_SRC_KEY_TYPE_INSTANTIATE_2ARGS
3994 LB2_SRC_CHECK_CONFIG_IM([CRYPTO_MD5])
3995 LB2_SRC_CHECK_CONFIG_IM([CRYPTO_SHA1])
3996 LB2_SRC_CHECK_CONFIG_IM([CRYPTO_SHA256])
3997 LB2_SRC_CHECK_CONFIG_IM([CRYPTO_SHA512])
3999 AS_IF([test "x$enable_server" != xno], [
4003 LC_SRC_CONFIG_FHANDLE
4004 LC_SRC_POSIX_ACL_CONFIG
4005 LC_SRC_HAVE_PROJECT_QUOTA
4008 LC_SRC_INVALIDATE_RANGE
4009 LC_SRC_HAVE_DIR_CONTEXT
4010 LC_SRC_D_COMPARE_5ARGS
4012 LC_SRC_PID_NS_FOR_CHILDREN
4015 LC_SRC_OLDSIZE_TRUNCATE_PAGECACHE
4016 LC_SRC_PTR_ERR_OR_ZERO_MISSING
4017 LC_SRC_HAVE_DENTRY_D_U_D_ALIAS_LIST
4018 LC_SRC_HAVE_DENTRY_D_U_D_ALIAS_HLIST
4019 LC_SRC_HAVE_DENTRY_D_CHILD
4020 LC_SRC_KIOCB_KI_LEFT
4021 LC_SRC_REGISTER_SHRINKER_RET
4024 LC_SRC_VFS_RENAME_5ARGS
4025 LC_SRC_VFS_UNLINK_3ARGS
4026 LC_SRC_HAVE_D_IS_POSITIVE
4029 LC_SRC_HAVE_BVEC_ITER
4030 LC_SRC_HAVE_TRUNCATE_IPAGES_FINAL
4031 LC_SRC_IOPS_RENAME_WITH_FLAGS
4035 LC_SRC_VFS_RENAME_6ARGS
4038 LC_SRC_DIRECTIO_USE_ITER
4039 LC_SRC_HAVE_IOV_ITER_INIT_DIRECTION
4040 LC_SRC_HAVE_IOV_ITER_TRUNCATE
4041 LC_SRC_HAVE_FILE_OPERATIONS_READ_WRITE_ITER
4042 LC_SRC_PAGECACHE_GET_PAGE
4045 LC_SRC_HAVE_INTERVAL_BLK_INTEGRITY
4046 LC_SRC_KEY_MATCH_DATA
4047 LC_SRC_HAVE_BLK_INTEGRITY_ITER
4050 LC_SRC_NFS_FILLDIR_USE_CTX
4051 LC_SRC_PERCPU_COUNTER_INIT
4054 LC_SRC_KIOCB_HAS_NBYTES
4055 LC_SRC_HAVE_DQUOT_QC_DQBLK
4056 LC_SRC_HAVE_AIO_COMPLETE
4057 LC_SRC_HAVE_IS_ROOT_INODE
4060 LC_SRC_BACKING_DEV_INFO_REMOVAL
4064 LC_SRC_HAVE___BI_CNT
4067 LC_SRC_BIO_ENDIO_USES_ONE_ARG
4068 LC_SRC_SYMLINK_OPS_USE_NAMEIDATA
4069 LC_SRC_ACCOUNT_PAGE_DIRTIED_3ARGS
4070 LC_SRC_HAVE_CRYPTO_ALLOC_SKCIPHER
4073 LC_SRC_HAVE_INTERVAL_EXP_BLK_INTEGRITY
4074 LC_SRC_HAVE_BIP_ITER_BIO_INTEGRITY_PAYLOAD
4075 LC_SRC_HAVE_CACHE_HEAD_HLIST
4076 LC_SRC_HAVE_XATTR_HANDLER_SIMPLIFIED
4079 LC_SRC_HAVE_LOCKS_LOCK_FILE_WAIT
4080 LC_SRC_HAVE_KEY_PAYLOAD_DATA_ARRAY
4081 LC_SRC_HAVE_XATTR_HANDLER_NAME
4082 LC_SRC_BIO_INTEGRITY_PREP_FN_RETURNS_BOOL
4084 LC_SRC_HAVE_SUBMIT_BIO_2ARGS
4085 LC_SRC_HAVE_CLEAN_BDEV_ALIASES
4088 LC_SRC_HAVE_FILE_DENTRY
4091 LC_SRC_HAVE_INODE_LOCK
4092 LC_SRC_HAVE_IOP_GET_LINK
4093 LC_SRC_HAVE_IN_COMPAT_SYSCALL
4094 LC_SRC_HAVE_XATTR_HANDLER_INODE_PARAM
4095 LC_SRC_LOCK_PAGE_MEMCG
4096 LC_SRC_HAVE_DOWN_WRITE_KILLABLE
4101 LC_SRC_DIRECTIO_2ARGS
4102 LC_SRC_GENERIC_WRITE_SYNC_2ARGS
4103 LC_SRC_FOP_ITERATE_SHARED
4106 LC_SRC_HAVE_POSIX_ACL_VALID_USER_NS
4107 LC_SRC_D_COMPARE_4ARGS
4108 LC_SRC_FULL_NAME_HASH_3ARGS
4109 LC_SRC_STRUCT_POSIX_ACL_XATTR
4113 LC_SRC_GROUP_INFO_GID
4115 LC_SRC_POSIX_ACL_UPDATE_MODE
4116 LC_SRC_HAVE_BDI_IO_PAGES
4119 LC_SRC_IOP_GENERIC_READLINK
4120 LC_SRC_HAVE_VM_FAULT_ADDRESS
4123 LC_SRC_INODEOPS_ENHANCED_GETATTR
4124 LC_SRC_VM_OPERATIONS_REMOVE_VMF_ARG
4125 LC_SRC_HAVE_KEY_USAGE_REFCOUNT
4126 LC_SRC_HAVE_CRYPTO_MAX_ALG_NAME_128
4130 LC_SRC_SUPER_SETUP_BDI_NAME
4134 LC_SRC_HAVE_GET_INODE_USAGE
4137 LC_SRC_PAGEVEC_INIT_ONE_PARAM
4139 LC_SRC_INTERVAL_TREE_CACHED
4143 LC_SRC_VM_FAULT_RETRY
4147 LC_SRC_INODE_TIMESPEC64
4148 LC_SRC_ALLOC_FILE_PSEUDO
4151 LC_SRC_RADIX_TREE_TAG_SET
4152 LC_SRC_UAPI_LINUX_MOUNT_H
4153 LC_SRC_HAVE_SUNRPC_CACHE_HASH_LOCK_IS_A_SPINLOCK
4156 LC_SRC_GENL_FAMILY_HAS_RESV_START_OP
4159 LC_SRC_HAVE_BVEC_ITER_ALL
4162 LC_SRC_KEYRING_SEARCH_4ARGS
4165 LC_SRC_BIO_BI_PHYS_SEGMENTS
4166 LC_SRC_LM_COMPARE_OWNER_EXISTS
4169 LC_SRC_FSCRYPT_DIGESTED_NAME
4172 LC_SRC_FSCRYPT_DUMMY_CONTEXT_ENABLED
4175 LC_SRC_HAVE_KTHREAD_USE_MM
4178 LC_SRC_FSCRYPT_FNAME_ALLOC_BUFFER
4179 LC_SRC_FSCRYPT_SET_CONTEXT
4180 LC_SRC_FSCRYPT_NOKEY_NAME
4181 LC_SRC_FSCRYPT_SET_TEST_DUMMY_ENC_CHAR_ARG
4182 LC_SRC_FSCRYPT_DUMMY_POLICY
4183 LC_SRC_HAVE_ITER_FILE_SPLICE_WRITE
4186 LC_SRC_HAVE_BDI_DEBUG_STATS
4187 LC_SRC_FSCRYPT_IS_NOKEY_NAME
4188 LC_SRC_FSCRYPT_PREPARE_READDIR
4194 LC_SRC_HAVE_USER_NAMESPACE_ARG
4197 LC_SRC_HAVE_COPY_PAGE_FROM_ITER_ATOMIC
4198 LC_SRC_HAVE_FILEATTR_GET
4201 LC_SRC_HAVE_GET_ACL_RCU_ARG
4202 LC_SRC_HAVE_FAULT_IN_IOV_ITER_READABLE
4205 LC_SRC_HAVE_SECURITY_DENTRY_INIT_WITH_XATTR_NAME_ARG
4206 LC_SRC_HAVE_KIOCB_COMPLETE_2ARGS
4209 LC_SRC_HAVE_INVALIDATE_FOLIO
4210 LC_SRC_HAVE_DIRTY_FOLIO
4213 LC_SRC_HAVE_ALLOC_INODE_SB
4216 LC_SRC_GRAB_CACHE_PAGE_WRITE_BEGIN_WITH_FLAGS
4217 LC_SRC_HAVE_ADDRESS_SPACE_OPERATIONS_READ_FOLIO
4218 LC_SRC_HAVE_READ_CACHE_PAGE_FILLER_WITH_FILE
4219 LC_SRC_HAVE_ADDRESS_SPACE_OPERATIONS_RELEASE_FOLIO
4220 LC_SRC_HAVE_LSMCONTEXT_INIT
4221 LC_SRC_SECURITY_DENTRY_INIT_SECURTY_WITH_CTX
4224 LC_SRC_HAVE_NO_LLSEEK
4225 LC_SRC_DQUOT_TRANSFER_WITH_USER_NS
4226 LC_SRC_HAVE_ADDRESS_SPACE_OPERATIONS_MIGRATE_FOLIO
4227 LC_SRC_REGISTER_SHRINKER_FORMAT_NAMED
4228 LC_SRC_HAVE_VFS_SETXATTR_NON_CONST_VALUE
4229 LC_SRC_HAVE_IOV_ITER_GET_PAGES_ALLOC2
4232 LC_SRC_HAVE_GET_RANDOM_U32_AND_U64
4233 LC_SRC_NFS_FILLDIR_USE_CTX_RETURN_BOOL
4234 LC_SRC_HAVE_FILEMAP_GET_FOLIOS_CONTIG
4237 LC_SRC_HAVE_GET_RANDOM_U32_BELOW
4238 LC_SRC_HAVE_ACL_WITH_DENTRY
4241 LC_SRC_HAVE_MNT_IDMAP_ARG
4242 LC_SRC_HAVE_LOCKS_LOCK_FILE_WAIT_IN_FILELOCK
4243 LC_SRC_HAVE_U64_CAPABILITY
4245 # kernel patch to extend integrity interface
4246 LC_SRC_BIO_INTEGRITY_PREP_FN
4249 AC_DEFUN([LC_PROG_LINUX_RESULTS], [
4250 AS_IF([test "x$enable_gss" != xno], [
4251 LC_KEY_TYPE_INSTANTIATE_2ARGS
4253 LB2_TEST_CHECK_CONFIG_IM([CRYPTO_MD5], [],
4255 [kernel MD5 support is recommended by using GSS.])])
4256 LB2_TEST_CHECK_CONFIG_IM([CRYPTO_SHA1], [],
4258 [kernel SHA1 support is recommended by using GSS.])])
4259 LB2_TEST_CHECK_CONFIG_IM([CRYPTO_SHA256], [],
4261 [kernel SHA256 support is recommended by using GSS.])])
4262 LB2_TEST_CHECK_CONFIG_IM([CRYPTO_SHA512], [],
4264 [kernel SHA512 support is recommended by using GSS.])])
4266 AS_IF([test "x$enable_server" != xno], [
4272 LC_HAVE_PROJECT_QUOTA
4279 LC_HAVE_DENTRY_D_U_D_ALIAS_LIST
4280 LC_HAVE_DENTRY_D_U_D_ALIAS_HLIST
4281 LC_HAVE_DENTRY_D_CHILD
4282 LC_PID_NS_FOR_CHILDREN
4285 LC_OLDSIZE_TRUNCATE_PAGECACHE
4286 LC_PTR_ERR_OR_ZERO_MISSING
4288 LC_REGISTER_SHRINKER_RET
4293 LC_HAVE_D_IS_POSITIVE
4297 LC_HAVE_TRUNCATE_IPAGES_FINAL
4298 LC_IOPS_RENAME_WITH_FLAGS
4305 LC_DIRECTIO_USE_ITER
4306 LC_HAVE_IOV_ITER_INIT_DIRECTION
4307 LC_HAVE_IOV_ITER_TRUNCATE
4308 LC_HAVE_FILE_OPERATIONS_READ_WRITE_ITER
4309 LC_PAGECACHE_GET_PAGE
4312 LC_HAVE_INTERVAL_BLK_INTEGRITY
4314 LC_HAVE_BLK_INTEGRITY_ITER
4317 LC_PERCPU_COUNTER_INIT
4318 LC_NFS_FILLDIR_USE_CTX
4322 LC_HAVE_DQUOT_QC_DQBLK
4323 LC_HAVE_AIO_COMPLETE
4324 LC_HAVE_IS_ROOT_INODE
4327 LC_BACKING_DEV_INFO_REMOVAL
4334 LC_BIO_ENDIO_USES_ONE_ARG
4335 LC_SYMLINK_OPS_USE_NAMEIDATA
4336 LC_ACCOUNT_PAGE_DIRTIED_3ARGS
4337 LC_HAVE_CRYPTO_ALLOC_SKCIPHER
4340 LC_HAVE_INTERVAL_EXP_BLK_INTEGRITY
4341 LC_HAVE_BIP_ITER_BIO_INTEGRITY_PAYLOAD
4342 LC_HAVE_CACHE_HEAD_HLIST
4343 LC_HAVE_XATTR_HANDLER_SIMPLIFIED
4346 LC_HAVE_LOCKS_LOCK_FILE_WAIT
4347 LC_HAVE_KEY_PAYLOAD_DATA_ARRAY
4348 LC_HAVE_XATTR_HANDLER_NAME
4350 LC_HAVE_SUBMIT_BIO_2ARGS
4351 LC_HAVE_CLEAN_BDEV_ALIASES
4358 LC_HAVE_IOP_GET_LINK
4361 LC_HAVE_IN_COMPAT_SYSCALL
4362 LC_HAVE_XATTR_HANDLER_INODE_PARAM
4364 LC_HAVE_DOWN_WRITE_KILLABLE
4370 LC_GENERIC_WRITE_SYNC_2ARGS
4371 LC_FOP_ITERATE_SHARED
4374 LC_HAVE_POSIX_ACL_VALID_USER_NS
4376 LC_FULL_NAME_HASH_3ARGS
4377 LC_STRUCT_POSIX_ACL_XATTR
4383 LC_POSIX_ACL_UPDATE_MODE
4384 LC_HAVE_BDI_IO_PAGES
4387 LC_IOP_GENERIC_READLINK
4388 LC_HAVE_VM_FAULT_ADDRESS
4391 LC_INODEOPS_ENHANCED_GETATTR
4392 LC_VM_OPERATIONS_REMOVE_VMF_ARG
4393 LC_HAVE_KEY_USAGE_REFCOUNT
4394 LC_HAVE_CRYPTO_MAX_ALG_NAME_128
4398 LC_SUPER_SETUP_BDI_NAME
4402 LC_BIO_INTEGRITY_PREP_FN_RETURNS_BOOL
4403 LC_HAVE_GET_INODE_USAGE
4406 LC_PAGEVEC_INIT_ONE_PARAM
4408 LC_INTERVAL_TREE_CACHED
4416 LC_ALLOC_FILE_PSEUDO
4420 LC_RADIX_TREE_TAG_SET
4421 LC_UAPI_LINUX_MOUNT_H
4422 LC_HAVE_SUNRPC_CACHE_HASH_LOCK_IS_A_SPINLOCK
4425 LC_GENL_FAMILY_HAS_RESV_START_OP
4428 LC_HAVE_BVEC_ITER_ALL
4431 LC_KEYRING_SEARCH_4ARGS
4434 LC_BIO_BI_PHYS_SEGMENTS
4435 LC_HAVE_FLUSH_DELAYED_FPUT
4436 LC_LM_COMPARE_OWNER_EXISTS
4439 LC_FSCRYPT_DIGESTED_NAME
4442 LC_FSCRYPT_DUMMY_CONTEXT_ENABLED
4445 LC_HAVE_KTHREAD_USE_MM
4448 LC_HAVE_ITER_FILE_SPLICE_WRITE
4451 LC_FSCRYPT_FNAME_ALLOC_BUFFER
4452 LC_FSCRYPT_SET_CONTEXT
4453 LC_FSCRYPT_D_REVALIDATE
4454 LC_FSCRYPT_NOKEY_NAME
4455 LC_FSCRYPT_SET_TEST_DUMMY_ENC_CHAR_ARG
4456 LC_FSCRYPT_DUMMY_POLICY
4459 LC_HAVE_BDI_DEBUG_STATS
4460 LC_FSCRYPT_IS_NOKEY_NAME
4461 LC_FSCRYPT_PREPARE_READDIR
4467 LC_HAVE_USER_NAMESPACE_ARG
4470 LC_HAVE_FILEATTR_GET
4471 LC_HAVE_COPY_PAGE_FROM_ITER_ATOMIC
4474 LC_HAVE_GET_ACL_RCU_ARG
4477 LC_HAVE_GET_ACL_RCU_ARG
4478 LC_HAVE_INVALIDATE_LOCK
4479 LC_HAVE_FAULT_IN_IOV_ITER_READABLE
4482 LC_HAVE_SECURITY_DENTRY_INIT_WITH_XATTR_NAME_ARG
4483 LC_HAVE_KIOCB_COMPLETE_2ARGS
4484 LC_EXPORTS_DELETE_FROM_PAGE_CACHE
4488 LC_HAVE_INVALIDATE_FOLIO
4492 LC_HAVE_ALLOC_INODE_SB
4495 LC_GRAB_CACHE_PAGE_WRITE_BEGIN_WITH_FLAGS
4496 LC_HAVE_ADDRESS_SPACE_OPERATIONS_READ_FOLIO
4497 LC_HAVE_READ_CACHE_PAGE_FILLER_WITH_FILE
4498 LC_HAVE_ADDRESS_SPACE_OPERATIONS_RELEASE_FOLIO
4499 LC_HAVE_LSMCONTEXT_INIT
4500 LC_SECURITY_DENTRY_INIT_SECURTY_WITH_CTX
4504 LC_DQUOT_TRANSFER_WITH_USER_NS
4505 LC_HAVE_ADDRESS_SPACE_OPERATIONS_MIGRATE_FOLIO
4506 LC_REGISTER_SHRINKER_FORMAT_NAMED
4507 LC_HAVE_VFS_SETXATTR_NON_CONST_VALUE
4508 LC_HAVE_IOV_ITER_GET_PAGES_ALLOC2
4511 LC_HAVE_GET_RANDOM_U32_AND_U64
4512 LC_NFS_FILLDIR_USE_CTX_RETURN_BOOL
4513 LC_HAVE_FILEMAP_GET_FOLIOS_CONTIG
4516 LC_HAVE_GET_RANDOM_U32_BELOW
4517 LC_HAVE_ACL_WITH_DENTRY
4520 LC_HAVE_MNT_IDMAP_ARG
4521 LC_HAVE_LOCKS_LOCK_FILE_WAIT_IN_FILELOCK
4522 LC_HAVE_U64_CAPABILITY
4524 # kernel patch to extend integrity interface
4525 LC_BIO_INTEGRITY_PREP_FN
4531 # Lustre linux kernel checks
4533 AC_DEFUN([LC_PROG_LINUX], [
4534 AC_MSG_NOTICE([Lustre kernel checks
4535 ==============================================================================])
4540 LC_CONFIG_HEALTH_CHECK_WRITE
4541 LC_CONFIG_LRU_RESIZE
4544 LC_GLIBC_SUPPORT_FHANDLES
4545 LC_GLIBC_SUPPORT_COPY_FILE_RANGE
4549 # 4.1.0 - Check export
4550 LC_HAVE_SYNC_READ_WRITE
4552 # 4.8 - Check export
4553 LC_EXPORT_DEFAULT_FILE_SPLICE_READ
4555 # 5.2 - Check export
4556 LC_ACCOUNT_PAGE_DIRTIED
4563 # Check whether to build the client side of Lustre
4565 AC_DEFUN([LC_CONFIG_CLIENT], [
4566 AC_MSG_CHECKING([whether to build Lustre client support])
4567 AC_ARG_ENABLE([client],
4568 AS_HELP_STRING([--disable-client],
4569 [disable Lustre client support]),
4570 [], [enable_client="yes"])
4571 AC_MSG_RESULT([$enable_client])
4572 ]) # LC_CONFIG_CLIENT
4577 AC_DEFUN([LB_CONFIG_MPITESTS], [
4578 AC_ARG_ENABLE([mpitests],
4579 AS_HELP_STRING([--enable-mpitests=<yes|no|mpicc wrapper>],
4580 [include mpi tests]), [
4581 enable_mpitests="yes"
4584 MPICC_WRAPPER="mpicc"
4585 MPI_BIN=$(eval which $MPICC_WRAPPER | xargs dirname)
4588 enable_mpitests="no"
4592 MPICC_WRAPPER=$enableval
4593 MPI_BIN=$(eval echo $MPICC_WRAPPER | xargs dirname)
4597 enable_mpitests="yes"
4598 MPICC_WRAPPER="mpicc"
4599 MPI_BIN=$(eval which $MPICC_WRAPPER | xargs dirname)
4602 if test "x$enable_mpitests" != "xno"; then
4605 AC_CACHE_CHECK([whether mpitests can be built],
4606 lb_cv_mpi_tests, [AC_COMPILE_IFELSE([AC_LANG_SOURCE([
4610 MPI_Initialized(&flag);
4613 ])], [lb_cv_mpi_tests="yes"], [lb_cv_mpi_tests="no"])
4615 enable_mpitests=$lb_cv_mpi_tests
4619 AC_SUBST(MPICC_WRAPPER)
4620 ]) # LB_CONFIG_MPITESTS
4625 # whether to enable quota support global control
4627 AC_DEFUN([LC_ENABLE_QUOTA], [
4628 AC_MSG_CHECKING([whether to enable quota support global control])
4629 AC_ARG_ENABLE([quota],
4630 AS_HELP_STRING([--enable-quota],
4631 [enable quota support]),
4632 [], [enable_quota="yes"])
4633 AS_IF([test "x$enable_quota" = xyes],
4634 [AC_MSG_RESULT([yes])],
4635 [AC_MSG_RESULT([no])])
4636 ]) # LC_ENABLE_QUOTA
4641 AC_DEFUN([LC_QUOTA], [
4645 AS_IF([test "x$enable_quota" != xno -a "x$enable_utils" != xno], [
4646 AC_CHECK_HEADER([sys/quota.h],
4647 [AC_DEFINE(HAVE_SYS_QUOTA_H, 1,
4648 [Define to 1 if you have <sys/quota.h>.])],
4649 [AC_MSG_ERROR([did not find <sys/quota.h> on your system])])
4656 # configure support for optional OSD implementation
4658 AC_DEFUN([LC_OSD_ADDON], [
4659 AC_MSG_CHECKING([whether to use OSD addon])
4661 AS_HELP_STRING([--with-osd=path],
4662 [set path to optional osd]),
4669 OSDADDON="$with_osd"
4676 AS_IF([test $ENABLEOSDADDON -eq 0], [
4680 OSDMODNAME=$(basename $OSDADDON)
4681 AS_IF([test -e $LUSTRE/$OSDMODNAME], [
4682 AC_MSG_RESULT([cannot link])
4684 ], [ln -s $OSDADDON $LUSTRE/$OSDMODNAME], [
4685 AC_MSG_RESULT([$OSDMODNAME])
4686 OSDADDON="obj-m += $OSDMODNAME/"
4688 AC_MSG_RESULT([cannot link])
4698 # Check whether to enable Lustre client crypto
4700 AC_DEFUN([LC_CONFIG_CRYPTO], [
4701 AC_MSG_CHECKING([whether to enable Lustre client crypto])
4702 AC_ARG_ENABLE([crypto],
4703 AS_HELP_STRING([--enable-crypto=yes|no|in-kernel],
4704 [enable Lustre client crypto (default is yes), use 'in-kernel' to force use of in-kernel fscrypt instead of embedded llcrypt]),
4705 [], [enable_crypto="auto"])
4706 AS_IF([test "x$enable_crypto" != xno -a "x$enable_dist" = xno], [
4710 LC_FSCRYPT_SUPPORT])
4711 AS_IF([test "x$enable_crypto" = xin-kernel], [
4712 AS_IF([test "x$has_fscrypt_support" = xyes], [
4713 AC_DEFINE(HAVE_LUSTRE_CRYPTO, 1, [Enable Lustre client crypto via in-kernel fscrypt])], [
4714 AC_MSG_ERROR([Lustre client crypto cannot be enabled via in-kernel fscrypt.])
4715 enable_crypto=no])],
4716 [AS_IF([test "x$has_is_encrypted" = xyes], [
4717 AC_DEFINE(HAVE_LUSTRE_CRYPTO, 1, [Enable Lustre client crypto via embedded llcrypt])
4718 AC_DEFINE(CONFIG_LL_ENCRYPTION, 1, [embedded llcrypt])
4719 AC_DEFINE(HAVE_FSCRYPT_DUMMY_CONTEXT_ENABLED, 1, [embedded llcrypt uses llcrypt_dummy_context_enabled()])
4720 enable_crypto="embedded-llcrypt"
4721 enable_llcrypt=yes], [
4722 AS_IF([test "x$enable_crypto" = xyes],
4723 [AC_MSG_ERROR([Lustre client crypto cannot be enabled because of lack of encryption support in your kernel.])])
4724 AS_IF([test "x$enable_crypto" != xno -a "x$enable_dist" = xno],
4725 [AC_MSG_WARN(Lustre client crypto cannot be enabled because of lack of encryption support in your kernel.)])
4726 enable_crypto=no])])
4727 AS_IF([test "x$enable_dist" != xno], [
4729 enable_llcrypt=yes])
4730 AC_MSG_RESULT([$enable_crypto])
4731 ]) # LC_CONFIG_CRYPTO
4736 # other configure checks
4738 AC_DEFUN([LC_CONFIGURE], [
4739 AC_MSG_NOTICE([Lustre core checks
4740 ==============================================================================])
4742 # maximum MDS thread count
4745 # lustre/utils/gss/gss_util.c
4746 # lustre/utils/llog_reader.c
4747 # lustre/utils/create_iam.c
4748 # lustre/utils/libiam.c
4749 AC_CHECK_HEADERS([netdb.h endian.h])
4750 AC_CHECK_FUNCS([gethostbyname])
4752 # lustre/utils/llverfs.c lustre/utils/libmount_utils_ldiskfs.c
4753 AC_CHECK_HEADERS([ext2fs/ext2fs.h], [], [
4754 AS_IF([test "x$enable_utils" = xyes -a "x$enable_ldiskfs" = xyes], [
4756 ext2fs.h not found. Please install e2fsprogs development package.
4761 # lustre/tests/statx_test.c
4762 AC_CHECK_FUNCS([statx])
4764 # lustre/utils/lfs.c
4765 AS_IF([test "$enable_dist" = "no"], [
4766 AC_CHECK_LIB([z], [crc32], [
4767 AC_CHECK_HEADER([zlib.h], [], [
4768 AC_MSG_ERROR([zlib.h not found.])])
4771 zlib library not found. Please install zlib development package.])
4777 AC_CHECK_LIB([selinux], [is_selinux_enabled],
4778 [AC_CHECK_HEADERS([selinux/selinux.h],
4779 [SELINUX="-lselinux"
4780 AC_DEFINE([HAVE_SELINUX], 1,
4781 [support for selinux ])],
4784 No libselinux-devel package found, unable to build selinux enabled tools
4789 No selinux package found, unable to build selinux enabled tools
4794 AC_CHECK_LIB([keyutils], [add_key])
4797 AC_MSG_CHECKING([whether to report minimum OST free space])
4798 AC_ARG_ENABLE([mindf],
4799 AS_HELP_STRING([--enable-mindf],
4800 [Make statfs report the minimum available space on any single OST instead of the sum of free space on all OSTs]),
4801 [], [enable_mindf="no"])
4802 AC_MSG_RESULT([$enable_mindf])
4803 AS_IF([test "$enable_mindf" = "yes"], [
4804 AC_DEFINE([MIN_DF], 1, [Report minimum OST free space])
4805 AC_SUBST(ENABLE_MINDF, yes)
4807 AC_SUBST(ENABLE_MINDF, no)
4810 AC_MSG_CHECKING([whether to randomly failing memory alloc])
4811 AC_ARG_ENABLE([fail_alloc],
4812 AS_HELP_STRING([--disable-fail-alloc],
4813 [disable randomly alloc failure]),
4814 [], [enable_fail_alloc="yes"])
4815 AC_MSG_RESULT([$enable_fail_alloc])
4816 AS_IF([test "x$enable_fail_alloc" != xno], [
4817 AC_DEFINE([RANDOM_FAIL_ALLOC], 1, [enable randomly alloc failure])
4818 AC_SUBST(ENABLE_FAIL_ALLOC, yes)
4820 AC_SUBST(ENABLE_FAIL_ALLOC, no)
4823 AC_MSG_CHECKING([whether to check invariants (expensive cpu-wise)])
4824 AC_ARG_ENABLE([invariants],
4825 AS_HELP_STRING([--enable-invariants],
4826 [enable invariant checking (cpu intensive)]),
4827 [], [enable_invariants="no"])
4828 AC_MSG_RESULT([$enable_invariants])
4829 AS_IF([test "x$enable_invariants" = xyes], [
4830 AC_DEFINE([CONFIG_LUSTRE_DEBUG_EXPENSIVE_CHECK], 1,
4831 [enable invariant checking])
4832 AC_SUBST(ENABLE_INVARIANTS, yes)
4834 AC_SUBST(ENABLE_INVARIANTS, no)
4837 AC_MSG_CHECKING([whether to track references with lu_ref])
4838 AC_ARG_ENABLE([lu_ref],
4839 AS_HELP_STRING([--enable-lu_ref],
4840 [enable lu_ref reference tracking code]),
4841 [], [enable_lu_ref="no"])
4842 AC_MSG_RESULT([$enable_lu_ref])
4843 AS_IF([test "x$enable_lu_ref" = xyes], [
4844 AC_DEFINE([CONFIG_LUSTRE_DEBUG_LU_REF], 1,
4845 [enable lu_ref reference tracking code])
4846 AC_SUBST(ENABLE_LU_REF, yes)
4848 AC_SUBST(ENABLE_LU_REF, no)
4851 AC_MSG_CHECKING([whether to enable page state tracking])
4852 AC_ARG_ENABLE([pgstate-track],
4853 AS_HELP_STRING([--enable-pgstate-track],
4854 [enable page state tracking]),
4855 [], [enable_pgstat_track="no"])
4856 AC_MSG_RESULT([$enable_pgstat_track])
4857 AS_IF([test "x$enable_pgstat_track" = xyes], [
4858 AC_DEFINE([CONFIG_DEBUG_PAGESTATE_TRACKING], 1,
4859 [enable page state tracking code])
4860 AC_SUBST(ENABLE_PGSTAT_TRACK, yes)
4862 AC_SUBST(ENABLE_PGSTAT_TRACK, no)
4866 AC_MSG_CHECKING([systemd unit file directory])
4867 AC_ARG_WITH([systemdsystemunitdir],
4868 [AS_HELP_STRING([--with-systemdsystemunitdir=DIR],
4869 [Directory for systemd service files])],
4870 [], [with_systemdsystemunitdir=auto])
4871 AS_IF([test "x$with_systemdsystemunitdir" = "xyes" -o "x$with_systemdsystemunitdir" = "xauto"],
4872 [def_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)
4873 AS_IF([test "x$def_systemdsystemunitdir" = "x"],
4874 [AS_IF([test "x$with_systemdsystemunitdir" = "xyes"],
4875 [AC_MSG_ERROR([systemd support requested but pkg-config unable to query systemd package])])
4876 with_systemdsystemunitdir=no],
4877 [with_systemdsystemunitdir="$def_systemdsystemunitdir"])])
4878 AS_IF([test "x$with_systemdsystemunitdir" != "xno"],
4879 [AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])])
4880 AC_MSG_RESULT([$with_systemdsystemunitdir])
4882 AC_MSG_CHECKING([bash-completion directory])
4883 AC_ARG_WITH([bash-completion-dir],
4884 AS_HELP_STRING([--with-bash-completion-dir[=PATH]],
4885 [Install the bash auto-completion script in this directory.]),
4887 [with_bash_completion_dir=yes])
4888 AS_IF([test "x$with_bash_completion_dir" = "xyes"], [
4889 BASH_COMPLETION_DIR="`pkg-config --variable=completionsdir bash-completion`"
4890 AS_IF([test "x$BASH_COMPLETION_DIR" = "x"], [
4891 [BASH_COMPLETION_DIR="/usr/share/bash-completion/completions"]
4894 BASH_COMPLETION_DIR="$with_bash_completion_dir"
4896 AC_SUBST([BASH_COMPLETION_DIR])
4897 AC_MSG_RESULT([$BASH_COMPLETION_DIR])
4903 # AM_CONDITIONALS for lustre
4905 AC_DEFUN([LC_CONDITIONALS], [
4906 AM_CONDITIONAL(MPITESTS, test x$enable_mpitests = xyes, Build MPI Tests)
4907 AM_CONDITIONAL(CLIENT, test x$enable_client = xyes)
4908 AM_CONDITIONAL(SERVER, test x$enable_server = xyes)
4909 AM_CONDITIONAL(SPLIT, test x$enable_split = xyes)
4910 AM_CONDITIONAL(EXT2FS_DEVEL, test x$ac_cv_header_ext2fs_ext2fs_h = xyes)
4911 AM_CONDITIONAL(GSS, test x$enable_gss = xyes)
4912 AM_CONDITIONAL(GSS_KEYRING, test x$enable_gss_keyring = xyes)
4913 AM_CONDITIONAL(GSS_SSK, test x$enable_ssk = xyes)
4914 AM_CONDITIONAL(LIBPTHREAD, test x$enable_libpthread = xyes)
4915 AM_CONDITIONAL(HAVE_SYSTEMD, test "x$with_systemdsystemunitdir" != "xno")
4916 AM_CONDITIONAL(ENABLE_BASH_COMPLETION, test "x$with_bash_completion_dir" != "xno")
4917 AM_CONDITIONAL(XATTR_HANDLER, test "x$lb_cv_compile_xattr_handler_flags" = xyes)
4918 AM_CONDITIONAL(SELINUX, test "$SELINUX" = "-lselinux")
4919 AM_CONDITIONAL(GETSEPOL, test x$enable_getsepol = xyes)
4920 AM_CONDITIONAL(LLCRYPT, test x$enable_llcrypt = xyes)
4921 AM_CONDITIONAL(LIBAIO, test x$enable_libaio = xyes)
4922 ]) # LC_CONDITIONALS
4927 # files that should be generated with AC_OUTPUT
4929 AC_DEFUN([LC_CONFIG_FILES],
4933 lustre/autoconf/Makefile
4934 lustre/conf/Makefile
4935 lustre/conf/resource/Makefile
4937 lustre/include/Makefile
4938 lustre/include/lustre/Makefile
4939 lustre/include/uapi/linux/lustre/Makefile
4940 lustre/kernel_patches/targets/5.14-rhel9.2.target
4941 lustre/kernel_patches/targets/5.14-rhel9.1.target
4942 lustre/kernel_patches/targets/5.14-rhel9.0.target
4943 lustre/kernel_patches/targets/4.18-rhel8.8.target
4944 lustre/kernel_patches/targets/4.18-rhel8.7.target
4945 lustre/kernel_patches/targets/4.18-rhel8.6.target
4946 lustre/kernel_patches/targets/4.18-rhel8.5.target
4947 lustre/kernel_patches/targets/4.18-rhel8.4.target
4948 lustre/kernel_patches/targets/4.18-rhel8.3.target
4949 lustre/kernel_patches/targets/4.18-rhel8.2.target
4950 lustre/kernel_patches/targets/4.18-rhel8.1.target
4951 lustre/kernel_patches/targets/4.18-rhel8.target
4952 lustre/kernel_patches/targets/3.10-rhel7.9.target
4953 lustre/kernel_patches/targets/3.10-rhel7.8.target
4954 lustre/kernel_patches/targets/3.10-rhel7.7.target
4955 lustre/kernel_patches/targets/3.10-rhel7.6.target
4956 lustre/kernel_patches/targets/3.10-rhel7.5.target
4957 lustre/kernel_patches/targets/4.14-rhel7.5.target
4958 lustre/kernel_patches/targets/4.14-rhel7.6.target
4959 lustre/kernel_patches/targets/4.12-sles12sp4.target
4960 lustre/kernel_patches/targets/4.12-sles12sp5.target
4961 lustre/kernel_patches/targets/4.12-sles15sp1.target
4962 lustre/kernel_patches/targets/5.3-sles15sp2.target
4963 lustre/kernel_patches/targets/5.3-sles15sp3.target
4964 lustre/kernel_patches/targets/5.14-sles15sp4.target
4965 lustre/kernel_patches/targets/5.14-sles15sp5.target
4966 lustre/kernel_patches/targets/3.x-fc18.target
4967 lustre/kernel_patches/targets/5.10-oe2203.target
4968 lustre/kernel_patches/targets/5.10-oe2203sp1.target
4969 lustre/kernel_patches/targets/5.10-oe2203sp2.target
4970 lustre/ldlm/Makefile
4971 lustre/ldlm/autoMakefile
4972 lustre/ec/autoMakefile
4975 lustre/fid/autoMakefile
4976 lustre/llite/Makefile
4977 lustre/llite/autoMakefile
4979 lustre/lov/autoMakefile
4981 lustre/mdc/autoMakefile
4983 lustre/lmv/autoMakefile
4984 lustre/lfsck/Makefile
4985 lustre/lfsck/autoMakefile
4987 lustre/mdt/autoMakefile
4989 lustre/mdd/autoMakefile
4991 lustre/fld/autoMakefile
4992 lustre/obdclass/Makefile
4993 lustre/obdclass/autoMakefile
4994 lustre/obdecho/Makefile
4995 lustre/obdecho/autoMakefile
4997 lustre/ofd/autoMakefile
4999 lustre/osc/autoMakefile
5001 lustre/ost/autoMakefile
5002 lustre/osd-ldiskfs/Makefile
5003 lustre/osd-ldiskfs/autoMakefile
5004 lustre/osd-zfs/Makefile
5005 lustre/osd-zfs/autoMakefile
5007 lustre/mgc/autoMakefile
5009 lustre/mgs/autoMakefile
5010 lustre/target/Makefile
5011 lustre/target/autoMakefile
5012 lustre/ptlrpc/Makefile
5013 lustre/ptlrpc/autoMakefile
5014 lustre/ptlrpc/gss/Makefile
5015 lustre/ptlrpc/gss/autoMakefile
5016 lustre/quota/Makefile
5017 lustre/quota/autoMakefile
5018 lustre/scripts/Makefile
5019 lustre/scripts/systemd/Makefile
5020 lustre/tests/Makefile
5021 lustre/tests/mpi/Makefile
5022 lustre/tests/iabf/Makefile
5023 lustre/tests/lutf/Makefile
5024 lustre/tests/lutf/src/Makefile
5025 lustre/tests/kernel/Makefile
5026 lustre/tests/kernel/autoMakefile
5027 lustre/utils/Makefile
5028 lustre/utils/gss/Makefile
5030 lustre/osp/autoMakefile
5032 lustre/lod/autoMakefile
5034 ]) # LC_CONFIG_FILES