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_LRU_RESIZE
194 AC_DEFUN([LC_CONFIG_LRU_RESIZE], [
195 AC_MSG_CHECKING([whether to enable lru self-adjusting])
196 AC_ARG_ENABLE([lru_resize],
197 AS_HELP_STRING([--enable-lru-resize],
198 [enable lru resize support]),
199 [], [enable_lru_resize="yes"])
200 AC_MSG_RESULT([$enable_lru_resize])
201 AS_IF([test "x$enable_lru_resize" != xno], [
202 AC_DEFINE(HAVE_LRU_RESIZE_SUPPORT, 1, [Enable lru resize support])
203 AC_SUBST(ENABLE_LRU_RESIZE, yes)
205 AC_SUBST(ENABLE_LRU_RESIZE, no)
207 ]) # LC_CONFIG_LRU_RESIZE
212 # Quota support. The kernel must support CONFIG_QUOTA.
214 AC_DEFUN([LC_SRC_CONFIG_QUOTA], [
215 LB2_SRC_CHECK_CONFIG_IM([QUOTA])
217 AC_DEFUN([LC_CONFIG_QUOTA], [
218 LB2_TEST_CHECK_CONFIG_IM([QUOTA],[],[AC_MSG_ERROR(
219 [Lustre quota requires that CONFIG_QUOTA is enabled in your kernel.])])
225 # fhandle kernel support for open_by_handle_at() and name_to_handle_at()
226 # system calls. The kernel must support CONFIG_FHANDLE.
228 AC_DEFUN([LC_SRC_CONFIG_FHANDLE], [
229 LB2_SRC_CHECK_CONFIG_IM([FHANDLE])
231 AC_DEFUN([LC_CONFIG_FHANDLE], [
232 LB2_TEST_CHECK_CONFIG_IM([FHANDLE],[],[AC_MSG_ERROR(
233 [Lustre fid handling requires that CONFIG_FHANDLE is enabled in your kernel.])])
234 ]) # LC_CONFIG_FHANDLE
237 # LC_POSIX_ACL_CONFIG
241 AC_DEFUN([LC_SRC_POSIX_ACL_CONFIG], [
242 LB2_SRC_CHECK_CONFIG_IM([FS_POSIX_ACL])
244 AC_DEFUN([LC_POSIX_ACL_CONFIG], [
245 LB2_TEST_CHECK_CONFIG_IM([FS_POSIX_ACL],
246 [AC_DEFINE(CONFIG_LUSTRE_FS_POSIX_ACL, 1, [Enable POSIX acl])],
248 ]) # LC_POSIX_ACL_CONFIG
250 # CRYPTO_MD5 check and warn only if GSS is not disabled.
253 # LC_CONFIG_GSS_KEYRING
255 # default 'auto', tests for dependencies, if found, enables;
256 # only called if gss is enabled
258 AC_DEFUN([LC_CONFIG_GSS_KEYRING], [
259 AC_MSG_CHECKING([whether to enable gss keyring backend])
260 AC_ARG_ENABLE([gss_keyring],
261 [AS_HELP_STRING([--disable-gss-keyring],
262 [disable gss keyring backend])],
263 [], [AS_IF([test "x$enable_gss" != xno], [
264 enable_gss_keyring="yes"], [
265 enable_gss_keyring="auto"])])
266 AC_MSG_RESULT([$enable_gss_keyring])
267 AS_IF([test "x$enable_gss_keyring" != xno], [
268 LB_CHECK_CONFIG_IM([KEYS], [], [
269 gss_keyring_conf_test="fail"
270 AC_MSG_WARN([GSS keyring backend requires that CONFIG_KEYS be enabled in your kernel.])])
272 AC_CHECK_LIB([keyutils], [keyctl_search], [], [
273 gss_keyring_conf_test="fail"
274 AC_MSG_WARN([GSS keyring backend requires libkeyutils])])
276 AS_IF([test "x$gss_keyring_conf_test" != xfail], [
277 AC_DEFINE([HAVE_GSS_KEYRING], [1],
278 [Define this if you enable gss keyring backend])
279 enable_gss_keyring="yes"
281 AS_IF([test "x$enable_gss_keyring" = xyes], [
282 AC_MSG_ERROR([Cannot enable gss_keyring. See above for details.])
289 ]) # LC_CONFIG_GSS_KEYRING
292 # LC_KEY_TYPE_INSTANTIATE_2ARGS
294 # rhel7 key_type->instantiate takes 2 args (struct key, struct key_preparsed_payload)
296 AC_DEFUN([LC_SRC_KEY_TYPE_INSTANTIATE_2ARGS], [
297 LB2_LINUX_TEST_SRC([key_type_instantiate_2args], [
298 #include <linux/key-type.h>
300 ((struct key_type *)0)->instantiate(0, NULL);
303 AC_DEFUN([LC_KEY_TYPE_INSTANTIATE_2ARGS], [
304 LB2_MSG_LINUX_TEST_RESULT([if 'key_type->instantiate' has two args],
305 [key_type_instantiate_2args], [
306 AC_DEFINE(HAVE_KEY_TYPE_INSTANTIATE_2ARGS, 1,
307 [key_type->instantiate has two args])
309 ]) # LC_KEY_TYPE_INSTANTIATE_2ARGS
314 AC_DEFUN([LC_CONFIG_SUNRPC], [
315 LB_CHECK_CONFIG_IM([SUNRPC], [], [
316 AS_IF([test "x$sunrpc_required" = xyes], [
319 kernel SUNRPC support is required by using GSS.
322 ]) # LC_CONFIG_SUNRPC
325 # LC_CONFIG_GSS (default 'auto' (tests for dependencies, if found, enables))
327 # Build gss and related tools of Lustre. Currently both kernel and user space
328 # parts are depend on linux platform.
330 AC_DEFUN([LC_CONFIG_GSS], [
331 AC_MSG_CHECKING([whether to enable gss support])
333 [AS_HELP_STRING([--enable-gss], [enable gss support])],
334 [], [enable_gss="auto"])
335 AC_MSG_RESULT([$enable_gss])
337 AC_ARG_VAR([TEST_JOBS],
338 [simultaneous jobs during configure (defaults to $(nproc))])
339 if test "x$ac_cv_env_TEST_JOBS_set" != "xset"; then
340 TEST_JOBS=${TEST_JOBS:-$(nproc)}
344 AC_ARG_VAR([TEST_DIR],
345 [location of temporary parallel configure tests (defaults to $PWD/lb2)])
346 TEST_DIR=${TEST_DIR:-${ac_pwd}/_lpb}
349 AS_IF([test "x$enable_gss" != xno], [
350 LC_CONFIG_GSS_KEYRING
352 sunrpc_required=$enable_gss
356 require_krb5=$enable_gss
360 AS_IF([test -n "$KRBDIR"], [
361 gss_conf_test="success"
363 gss_conf_test="failure"
366 AS_IF([test "x$gss_conf_test" = xsuccess && test "x$enable_gss" != xno], [
367 AC_DEFINE([HAVE_GSS], [1], [Define this is if you enable gss])
370 enable_gss_keyring="no"
374 AS_IF([test "x$enable_ssk" != xno], [
375 enable_ssk=$enable_gss
378 enable_gss_keyring="no"
384 # OpenSSL 1.0+ return int for HMAC functions but older SLES11 versions do not
385 AC_DEFUN([LC_OPENSSL_HMAC], [
386 has_hmac_functions="no"
387 saved_flags="$CFLAGS"
389 AC_MSG_CHECKING([whether OpenSSL has HMAC_Init_ex])
390 AS_IF([test "x$enable_ssk" != xno], [
391 AC_COMPILE_IFELSE([AC_LANG_SOURCE([
392 #include <openssl/hmac.h>
393 #include <openssl/evp.h>
397 rc = HMAC_Init_ex(NULL, "test", 4, EVP_md_null(), NULL);
401 has_hmac_functions="yes"
404 AC_MSG_RESULT([$has_hmac_functions])
405 CFLAGS="$saved_flags"
408 # LC_OPENSSL_EVP_PKEY
410 # OpenSSL 3.0 introduces EVP_PKEY_get_params
411 AC_DEFUN([LC_OPENSSL_EVP_PKEY], [
413 saved_flags="$CFLAGS"
415 AC_MSG_CHECKING([whether OpenSSL has EVP_PKEY_get_params])
416 AS_IF([test "x$enable_ssk" != xno], [
417 AC_COMPILE_IFELSE([AC_LANG_SOURCE([
418 #include <openssl/evp.h>
423 int rc = EVP_PKEY_get_params(NULL, params);
427 AC_DEFINE(HAVE_OPENSSL_EVP_PKEY, 1, [OpenSSL EVP_PKEY_get_params])
431 CFLAGS="$saved_flags"
432 AC_MSG_RESULT([$has_evp_pkey])
433 ]) # LC_OPENSSL_EVP_PKEY
438 # Check whether to enable Lustre client crypto
440 AC_DEFUN([LC_OPENSSL_SSK], [
441 AS_IF([test "x$enable_ssk" != xno], [
445 AS_IF([test "x$has_hmac_functions" = xyes -o "x$has_evp_pkey" = xyes], [
446 AC_DEFINE(HAVE_OPENSSL_SSK, 1, [OpenSSL HMAC functions needed for SSK])
450 AC_MSG_CHECKING([whether OpenSSL has functions needed for SSK])
451 AC_MSG_RESULT([$enable_ssk])
454 # LC_OPENSSL_GETSEPOL
456 # OpenSSL is needed for l_getsepol
457 AC_DEFUN([LC_OPENSSL_GETSEPOL], [
458 saved_flags="$CFLAGS"
460 AC_MSG_CHECKING([whether openssl-devel is present])
461 AC_COMPILE_IFELSE([AC_LANG_SOURCE([
462 #include <openssl/evp.h>
465 EVP_MD_CTX *mdctx = EVP_MD_CTX_create();
469 AC_DEFINE(HAVE_OPENSSL_GETSEPOL, 1, [openssl-devel is present])
470 enable_getsepol="yes"
476 No openssl-devel headers found, unable to build l_getsepol and SELinux status checking
479 AC_MSG_RESULT([$enable_getsepol])
480 CFLAGS="$saved_flags"
481 ]) # LC_OPENSSL_GETSEPOL
483 # LC_GCONFIG_GETSEPOL
484 AC_DEFUN([LC_CONFIG_GETSEPOL], [
485 AC_ARG_ENABLE([l_getsepol], [AS_HELP_STRING([--disable-l_getsepol],
486 [build the l_getsepol utility])], [config_getsepol="no"],
487 [config_getsepol="yes"])
488 AC_MSG_CHECKING([whether to build l_getsepol])
489 AC_MSG_RESULT([$config_getsepol])
493 AC_DEFUN([LC_HAVE_LIBAIO], [
494 AC_CHECK_HEADER([libaio.h],
496 AC_MSG_WARN([libaio is not installed on the system]))
500 # LC_INVALIDATE_RANGE
502 # 3.11 invalidatepage requires the length of the range to invalidate
504 AC_DEFUN([LC_SRC_INVALIDATE_RANGE], [
505 LB2_LINUX_TEST_SRC([address_space_ops_invalidatepage_3args], [
506 #include <linux/fs.h>
508 struct address_space_operations a_ops;
509 a_ops.invalidatepage(NULL, 0, 0);
512 AC_DEFUN([LC_INVALIDATE_RANGE], [
513 LB2_MSG_LINUX_TEST_RESULT(
514 [if 'address_space_operations.invalidatepage' requires 3 arguments],
515 [address_space_ops_invalidatepage_3args], [
516 AC_DEFINE(HAVE_INVALIDATE_RANGE, 1,
517 [address_space_operations.invalidatepage needs 3 arguments])
519 ]) # LC_INVALIDATE_RANGE
522 # LC_HAVE_DIR_CONTEXT
524 # 3.11 readdir now takes the new struct dir_context
526 AC_DEFUN([LC_SRC_HAVE_DIR_CONTEXT], [
527 LB2_LINUX_TEST_SRC([dir_context], [
528 #include <linux/fs.h>
530 #ifdef FMODE_KABI_ITERATE
531 #error "back to use readdir in kabi_extand mode"
533 struct dir_context ctx;
539 AC_DEFUN([LC_HAVE_DIR_CONTEXT], [
540 LB2_MSG_LINUX_TEST_RESULT([if 'dir_context' exist],
542 AC_DEFINE(HAVE_DIR_CONTEXT, 1, [dir_context exist])
544 ]) # LC_HAVE_DIR_CONTEXT
549 # 3.11 dentry_operations.d_compare() taken 5 arguments.
551 AC_DEFUN([LC_SRC_D_COMPARE_5ARGS], [
552 LB2_LINUX_TEST_SRC([d_compare_5args], [
553 #include <linux/dcache.h>
555 ((struct dentry_operations*)0)->d_compare(NULL,NULL,0,NULL,NULL);
558 AC_DEFUN([LC_D_COMPARE_5ARGS], [
559 LB2_MSG_LINUX_TEST_RESULT([if 'd_compare' taken 5 arguments],
561 AC_DEFINE(HAVE_D_COMPARE_5ARGS, 1,
562 [d_compare need 5 arguments])
564 ]) # LC_D_COMPARE_5ARGS
569 # 3.11 need to access d_count to get dentry reference count
571 AC_DEFUN([LC_SRC_HAVE_DCOUNT], [
572 LB2_LINUX_TEST_SRC([d_count], [
573 #include <linux/dcache.h>
575 struct dentry de = { };
578 count = d_count(&de);
581 AC_DEFUN([LC_HAVE_DCOUNT], [
582 LB2_MSG_LINUX_TEST_RESULT([if 'd_count' exists],
584 AC_DEFINE(HAVE_D_COUNT, 1, [d_count exist])
589 # LC_PID_NS_FOR_CHILDREN
591 # 3.11 replaces pid_ns by pid_ns_for_children in struct nsproxy
593 AC_DEFUN([LC_SRC_PID_NS_FOR_CHILDREN], [
594 LB2_LINUX_TEST_SRC([pid_ns_for_children], [
595 #include <linux/nsproxy.h>
598 ns.pid_ns_for_children = NULL;
601 AC_DEFUN([LC_PID_NS_FOR_CHILDREN], [
602 LB2_MSG_LINUX_TEST_RESULT([if 'struct nsproxy' has 'pid_ns_for_children'],
603 [pid_ns_for_children], [
604 AC_DEFINE(HAVE_PID_NS_FOR_CHILDREN, 1,
605 ['struct nsproxy' has 'pid_ns_for_children'])
607 ]) # LC_PID_NS_FOR_CHILDREN
610 # LC_OLDSIZE_TRUNCATE_PAGECACHE
612 # 3.12 truncate_pagecache without oldsize parameter
614 AC_DEFUN([LC_SRC_OLDSIZE_TRUNCATE_PAGECACHE], [
615 LB2_LINUX_TEST_SRC([truncate_pagecache_old_size], [
616 #include <linux/mm.h>
618 truncate_pagecache(NULL, 0, 0);
621 AC_DEFUN([LC_OLDSIZE_TRUNCATE_PAGECACHE], [
622 LB2_MSG_LINUX_TEST_RESULT([if 'truncate_pagecache' with 'old_size' parameter],
623 [truncate_pagecache_old_size], [
624 AC_DEFINE(HAVE_OLDSIZE_TRUNCATE_PAGECACHE, 1,
627 ]) # LC_OLDSIZE_TRUNCATE_PAGECACHE
632 # For some reason SLES11SP4 is missing the PTR_ERR_OR_ZERO macro
633 # It was added to linux kernel 3.12
635 AC_DEFUN([LC_SRC_PTR_ERR_OR_ZERO_MISSING], [
636 LB2_LINUX_TEST_SRC([is_err_or_null], [
637 #include <linux/err.h>
639 if (PTR_ERR_OR_ZERO(NULL)) return 0;
642 AC_DEFUN([LC_PTR_ERR_OR_ZERO_MISSING], [
643 LB2_MSG_LINUX_TEST_RESULT([if 'PTR_ERR_OR_ZERO' is missing],
645 AC_DEFINE(HAVE_PTR_ERR_OR_ZERO, 1,
646 ['PTR_ERR_OR_ZERO' exist])
648 ]) # LC_PTR_ERR_OR_ZERO_MISSING
651 # LC_HAVE_DENTRY_D_U_D_ALIAS
653 # 3.11 kernel moved d_alias to the union d_u in struct dentry
655 # Some distros move d_alias to d_u but it is still a struct list
657 AC_DEFUN([LC_SRC_HAVE_DENTRY_D_U_D_ALIAS_LIST], [
658 LB2_LINUX_TEST_SRC([d_alias_list], [
659 #include <linux/list.h>
660 #include <linux/dcache.h>
663 INIT_LIST_HEAD(&de.d_u.d_alias);
666 AC_DEFUN([LC_HAVE_DENTRY_D_U_D_ALIAS_LIST], [
667 LB2_MSG_LINUX_TEST_RESULT([if list 'dentry.d_u.d_alias' exist],
669 AC_DEFINE(HAVE_DENTRY_D_U_D_ALIAS, 1,
670 [list dentry.d_u.d_alias exist])
672 ]) # LC_HAVE_DENTRY_D_U_D_ALIAS_LIST
675 # LC_HAVE_DENTRY_D_U_D_ALIAS_HLIST
677 # Some distros move d_alias to d_u and it is an hlist
679 AC_DEFUN([LC_SRC_HAVE_DENTRY_D_U_D_ALIAS_HLIST], [
680 LB2_LINUX_TEST_SRC([d_alias_hlist], [
681 #include <linux/list.h>
682 #include <linux/dcache.h>
685 INIT_HLIST_NODE(&de.d_u.d_alias);
688 AC_DEFUN([LC_HAVE_DENTRY_D_U_D_ALIAS_HLIST], [
689 LB2_MSG_LINUX_TEST_RESULT([if hlist 'dentry.d_u.d_alias' exist],
691 AC_DEFINE(HAVE_DENTRY_D_U_D_ALIAS, 1,
692 [list dentry.d_u.d_alias exist])
694 ]) # LC_HAVE_DENTRY_D_U_D_ALIAS_HLIST
698 # LC_HAVE_DENTRY_D_CHILD
700 # 3.11 kernel d_child has been moved out of the union d_u
703 AC_DEFUN([LC_SRC_HAVE_DENTRY_D_CHILD], [
704 LB2_LINUX_TEST_SRC([d_child], [
705 #include <linux/list.h>
706 #include <linux/dcache.h>
709 INIT_LIST_HEAD(&de.d_child);
712 AC_DEFUN([LC_HAVE_DENTRY_D_CHILD], [
713 LB2_MSG_LINUX_TEST_RESULT([if 'dentry.d_child' exist],
715 AC_DEFINE(HAVE_DENTRY_D_CHILD, 1, [dentry.d_child exist])
717 ]) # LC_HAVE_DENTRY_D_CHILD
722 # 3.12 ki_left removed from struct kiocb
724 AC_DEFUN([LC_SRC_KIOCB_KI_LEFT], [
725 LB2_LINUX_TEST_SRC([kiocb_ki_left], [
726 #include <linux/aio.h>
728 ((struct kiocb*)0)->ki_left = 0;
731 AC_DEFUN([LC_KIOCB_KI_LEFT], [
732 LB2_MSG_LINUX_TEST_RESULT([if 'struct kiocb' with 'ki_left' member],
734 AC_DEFINE(HAVE_KIOCB_KI_LEFT, 1,
737 ]) # LC_KIOCB_KI_LEFT
740 # LC_REGISTER_SHRINKER_RET
742 # v3.11-8748-g1d3d4437eae1 register_shrinker returns a status
744 AC_DEFUN([LC_SRC_REGISTER_SHRINKER_RET], [
745 LB2_LINUX_TEST_SRC([register_shrinker_ret], [
746 #include <linux/mm.h>
748 if (register_shrinker(NULL))
749 unregister_shrinker(NULL);
752 AC_DEFUN([LC_REGISTER_SHRINKER_RET], [
753 LB2_MSG_LINUX_TEST_RESULT([if register_shrinker() returns status],
754 [register_shrinker_ret], [
755 AC_DEFINE(HAVE_REGISTER_SHRINKER_RET, 1,
756 [register_shrinker() returns status])
758 ]) # LC_REGISTER_SHRINKER_RET
761 # LC_VFS_RENAME_5ARGS
763 # 3.13 has vfs_rename with 5 args
765 AC_DEFUN([LC_SRC_VFS_RENAME_5ARGS], [
766 LB2_LINUX_TEST_SRC([vfs_rename_5args], [
767 #include <linux/fs.h>
769 vfs_rename(NULL, NULL, NULL, NULL, NULL);
772 AC_DEFUN([LC_VFS_RENAME_5ARGS], [
773 LB2_MSG_LINUX_TEST_RESULT([if Linux kernel has 'vfs_rename' with 5 args],
774 [vfs_rename_5args], [
775 AC_DEFINE(HAVE_VFS_RENAME_5ARGS, 1,
776 [kernel has vfs_rename with 5 args])
778 ]) # LC_VFS_RENAME_5ARGS
781 # LC_VFS_UNLINK_3ARGS
783 # 3.13 has vfs_unlink with 3 args
785 AC_DEFUN([LC_SRC_VFS_UNLINK_3ARGS], [
786 LB2_LINUX_TEST_SRC([vfs_unlink_3args], [
787 #include <linux/fs.h>
789 vfs_unlink(NULL, NULL, NULL);
792 AC_DEFUN([LC_VFS_UNLINK_3ARGS], [
793 LB2_MSG_LINUX_TEST_RESULT([if Linux kernel has 'vfs_unlink' with 3 args],
794 [vfs_unlink_3args], [
795 AC_DEFINE(HAVE_VFS_UNLINK_3ARGS, 1,
796 [kernel has vfs_unlink with 3 args])
798 ]) # LC_VFS_UNLINK_3ARGS
800 # LC_HAVE_D_IS_POSITIVE
802 # Kernel version 3.13 b18825a7c8e37a7cf6abb97a12a6ad71af160de7
803 # d_is_positive is added
805 AC_DEFUN([LC_SRC_HAVE_D_IS_POSITIVE], [
806 LB2_LINUX_TEST_SRC([d_is_positive], [
807 #include <linux/dcache.h>
812 AC_DEFUN([LC_HAVE_D_IS_POSITIVE], [
813 LB2_MSG_LINUX_TEST_RESULT([if 'd_is_positive' exist],
815 AC_DEFINE(HAVE_D_IS_POSITIVE, 1,
816 ['d_is_positive' is available])
818 ]) # LC_HAVE_D_IS_POSITIVE
823 # 3.14 move some of its data in struct bio into the new
826 AC_DEFUN([LC_SRC_HAVE_BVEC_ITER], [
827 LB2_LINUX_TEST_SRC([have_bvec_iter], [
828 #include <linux/bio.h>
830 struct bvec_iter iter;
832 iter.bi_bvec_done = 0;
835 AC_DEFUN([LC_HAVE_BVEC_ITER], [
836 LB2_MSG_LINUX_TEST_RESULT([if Linux kernel has struct bvec_iter],
838 AC_DEFINE(HAVE_BVEC_ITER, 1,
839 [kernel has struct bvec_iter])
841 ]) # LC_HAVE_BVEC_ITER
846 # 3.14 adds set_acl method to inode_operations
847 # see kernel commit 893d46e443346370cd4ea81d9d35f72952c62a37
849 AC_DEFUN([LC_SRC_IOP_SET_ACL], [
850 LB2_LINUX_TEST_SRC([inode_ops_set_acl], [
851 #include <linux/fs.h>
853 struct inode_operations iop;
857 AC_DEFUN([LC_IOP_SET_ACL], [
858 LB2_MSG_LINUX_TEST_RESULT([if 'inode_operations' has '.set_acl' member function],
859 [inode_ops_set_acl], [
860 AC_DEFINE(HAVE_IOP_SET_ACL, 1,
861 [inode_operations has .set_acl member function])
866 # LC_HAVE_TRUNCATE_IPAGE_FINAL
868 # 3.14 bring truncate_inode_pages_final for evict_inode
870 AC_DEFUN([LC_SRC_HAVE_TRUNCATE_IPAGES_FINAL], [
871 LB2_LINUX_TEST_SRC([truncate_ipages_final], [
872 #include <linux/mm.h>
874 truncate_inode_pages_final(NULL);
877 AC_DEFUN([LC_HAVE_TRUNCATE_IPAGES_FINAL], [
878 LB2_MSG_LINUX_TEST_RESULT([if Linux kernel has truncate_inode_pages_final],
879 [truncate_ipages_final], [
880 AC_DEFINE(HAVE_TRUNCATE_INODE_PAGES_FINAL, 1,
881 [kernel has truncate_inode_pages_final])
883 ]) # LC_HAVE_TRUNCATE_IPAGES_FINAL
886 # LC_IOPS_RENAME_WITH_FLAGS
888 # 3.14 has inode_operations->rename with 5 args
889 # commit 520c8b16505236fc82daa352e6c5e73cd9870cff
891 AC_DEFUN([LC_SRC_IOPS_RENAME_WITH_FLAGS], [
892 LB2_LINUX_TEST_SRC([iops_rename_with_flags], [
893 #include <linux/fs.h>
895 struct inode *i1 = NULL, *i2 = NULL;
896 struct dentry *d1 = NULL, *d2 = NULL;
898 rc = ((struct inode_operations *)0)->rename(i1, d1, i2, d2, 0);
900 ]) # LC_IOPS_RENAME_WITH_FLAGS
901 AC_DEFUN([LC_IOPS_RENAME_WITH_FLAGS], [
902 LB2_MSG_LINUX_TEST_RESULT([if 'inode_operations->rename' taken flags as argument],
903 [iops_rename_with_flags], [
904 AC_DEFINE(HAVE_IOPS_RENAME_WITH_FLAGS, 1,
905 [inode_operations->rename need flags as argument])
907 ]) # LC_IOPS_RENAME_WITH_FLAGS
910 # LC_VFS_RENAME_6ARGS
912 # 3.15 has vfs_rename with 6 args
914 AC_DEFUN([LC_SRC_VFS_RENAME_6ARGS], [
915 LB2_LINUX_TEST_SRC([vfs_rename_6args], [
916 #include <linux/fs.h>
918 vfs_rename(NULL, NULL, NULL, NULL, NULL, NULL);
921 AC_DEFUN([LC_VFS_RENAME_6ARGS], [
922 LB2_MSG_LINUX_TEST_RESULT([if Linux kernel has 'vfs_rename' with 6 args],
923 [vfs_rename_6args], [
924 AC_DEFINE(HAVE_VFS_RENAME_6ARGS, 1,
925 [kernel has vfs_rename with 6 args])
927 ]) # LC_VFS_RENAME_6ARGS
930 # LC_DIRECTIO_USE_ITER
932 # 3.16 kernel changes direct IO to use iov_iter
934 AC_DEFUN([LC_SRC_DIRECTIO_USE_ITER], [
935 LB2_LINUX_TEST_SRC([direct_io_iter], [
936 #include <linux/fs.h>
938 struct address_space_operations ops = { };
939 struct iov_iter *iter = NULL;
942 ops.direct_IO(0, NULL, iter, offset);
945 AC_DEFUN([LC_DIRECTIO_USE_ITER], [
946 LB2_MSG_LINUX_TEST_RESULT([if direct IO uses iov_iter],
948 AC_DEFINE(HAVE_DIRECTIO_ITER, 1, [direct IO uses iov_iter])
950 ]) # LC_DIRECTIO_USE_ITER
953 # LC_HAVE_IOV_ITER_INIT_DIRECTION
956 # 3.16 linux commit 71d8e532b1549a478e6a6a8a44f309d050294d00
957 # changed iov_iter_init api to start accepting a tag
958 # that defines if its a read or write operation
960 AC_DEFUN([LC_SRC_HAVE_IOV_ITER_INIT_DIRECTION], [
961 LB2_LINUX_TEST_SRC([iter_init], [
962 #include <linux/uio.h>
963 #include <linux/fs.h>
965 const struct iovec *iov = NULL;
967 iov_iter_init(NULL, READ, iov, 1, 0);
970 AC_DEFUN([LC_HAVE_IOV_ITER_INIT_DIRECTION], [
971 LB2_MSG_LINUX_TEST_RESULT([if 'iov_iter_init' takes a tag],
973 AC_DEFINE(HAVE_IOV_ITER_INIT_DIRECTION, 1,
974 [iov_iter_init handles directional tag])
976 ]) # LC_HAVE_IOV_ITER_INIT_DIRECTION
979 # LC_HAVE_IOV_ITER_TRUNCATE
982 # 3.16 introduces a new API iov_iter_truncate()
984 AC_DEFUN([LC_SRC_HAVE_IOV_ITER_TRUNCATE], [
985 LB2_LINUX_TEST_SRC([iter_truncate], [
986 #include <linux/uio.h>
987 #include <linux/fs.h>
989 struct iov_iter *i = NULL;
991 iov_iter_truncate(i, 0);
994 AC_DEFUN([LC_HAVE_IOV_ITER_TRUNCATE], [
995 LB2_MSG_LINUX_TEST_RESULT([if 'iov_iter_truncate' exists],
997 AC_DEFINE(HAVE_IOV_ITER_TRUNCATE, 1, [iov_iter_truncate exists])
999 ]) # LC_HAVE_IOV_ITER_TRUNCATE
1002 # LC_HAVE_FILE_OPERATIONS_READ_WRITE_ITER
1004 # 3.16 introduces [read|write]_iter to struct file_operations
1006 AC_DEFUN([LC_SRC_HAVE_FILE_OPERATIONS_READ_WRITE_ITER], [
1007 LB2_LINUX_TEST_SRC([file_function_iter], [
1008 #include <linux/fs.h>
1010 ((struct file_operations *)NULL)->read_iter(NULL, NULL);
1011 ((struct file_operations *)NULL)->write_iter(NULL, NULL);
1014 AC_DEFUN([LC_HAVE_FILE_OPERATIONS_READ_WRITE_ITER], [
1015 LB2_MSG_LINUX_TEST_RESULT([if 'file_operations.[read|write]_iter' exist],
1016 [file_function_iter], [
1017 AC_DEFINE(HAVE_FILE_OPERATIONS_READ_WRITE_ITER, 1,
1018 [file_operations.[read|write]_iter functions exist])
1020 ]) # LC_HAVE_FILE_OPERATIONS_READ_WRITE_ITER
1023 # LC_PAGECACHE_GET_PAGE
1025 # Kernel version 3.16 commit 2457aec63745e235bcafb7ef312b182d8682f0fc
1026 # @pagecache_get_page was introduced since Linux 3.16
1028 AC_DEFUN([LC_SRC_PAGECACHE_GET_PAGE], [
1029 LB2_LINUX_TEST_SRC([pagecache_get_page], [
1030 #include <linux/pagemap.h>
1032 pagecache_get_page(NULL, 0, 0, 0);
1035 AC_DEFUN([LC_PAGECACHE_GET_PAGE], [
1036 LB2_MSG_LINUX_TEST_RESULT([if 'pagecache_get_page' exists],
1037 [pagecache_get_page], [
1038 AC_DEFINE(HAVE_PAGECACHE_GET_PAGE, 1,
1039 ['pagecache_get_page' is available])
1041 ]) # LC_PAGECACHE_GET_PAGE
1044 # LC_HAVE_INTERVAL_BLK_INTEGRITY
1046 # 3.17 replace sector_size with interval in struct blk_integrity
1048 AC_DEFUN([LC_SRC_HAVE_INTERVAL_BLK_INTEGRITY], [
1049 LB2_LINUX_TEST_SRC([interval_blk_integrity], [
1050 #include <linux/blkdev.h>
1052 ((struct blk_integrity *)0)->interval = 0;
1055 AC_DEFUN([LC_HAVE_INTERVAL_BLK_INTEGRITY], [
1056 LB2_MSG_LINUX_TEST_RESULT([if 'blk_integrity.interval' exist],
1057 [interval_blk_integrity], [
1058 AC_DEFINE(HAVE_INTERVAL_BLK_INTEGRITY, 1,
1059 [blk_integrity.interval exist])
1061 ]) # LC_HAVE_INTERVAL_BLK_INTEGRITY
1066 # 3.17 replaces key_type::match with match_preparse
1067 # and has new struct key_match_data
1069 AC_DEFUN([LC_SRC_KEY_MATCH_DATA], [
1070 LB2_LINUX_TEST_SRC([key_match], [
1071 #include <linux/key-type.h>
1073 struct key_match_data data;
1075 data.raw_data = NULL;
1078 AC_DEFUN([LC_KEY_MATCH_DATA], [
1079 LB2_MSG_LINUX_TEST_RESULT([if struct key_match field exist],
1081 AC_DEFINE(HAVE_KEY_MATCH_DATA, 1, [struct key_match_data exist])
1083 ]) # LC_KEY_MATCH_DATA
1086 # LC_HAVE_BLK_INTEGRITY_ITER
1088 # Linux commit v3.17-rc5-69-g1859308853b1 replaces
1089 # struct blk_integrity_exchg with struct blk_integrity_iter
1091 # LB_CHECK_LINUX_HEADER has already run so we can rely on
1092 # HAVE_LINUX_BLK_INTEGRITY_HEADER being set correctly before
1095 AC_DEFUN([LC_SRC_HAVE_BLK_INTEGRITY_ITER], [
1096 LB2_LINUX_TEST_SRC([blk_integrity_iter], [
1097 #ifdef HAVE_LINUX_BLK_INTEGRITY_HEADER
1098 # include <linux/blk-integrity.h>
1100 # include <linux/blkdev.h>
1103 struct blk_integrity_iter iter;
1105 iter.prot_buf = NULL;
1108 AC_DEFUN([LC_HAVE_BLK_INTEGRITY_ITER], [
1109 LB2_MSG_LINUX_TEST_RESULT([if struct blk_integrity_iter exist],
1110 [blk_integrity_iter], [
1111 AC_DEFINE(HAVE_BLK_INTEGRITY_ITER, 1,
1112 [kernel has struct blk_integrity_iter])
1114 ]) # LC_HAVE_BLK_INTEGRITY_ITER
1117 # LC_NFS_FILLDIR_USE_CTX
1119 # 3.18 kernel moved from void cookie to struct dir_context
1121 AC_DEFUN([LC_SRC_NFS_FILLDIR_USE_CTX], [
1122 LB2_LINUX_TEST_SRC([filldir_ctx], [
1123 #include <linux/fs.h>
1125 int filldir(struct dir_context *ctx, const char* name,
1126 int i, loff_t off, u64 tmp, unsigned temp)
1131 struct dir_context ctx = {
1135 ctx.actor(NULL, "test", 0, (loff_t) 0, 0, 0);
1138 AC_DEFUN([LC_NFS_FILLDIR_USE_CTX], [
1139 LB2_MSG_LINUX_TEST_RESULT([if filldir_t uses struct dir_context],
1141 AC_DEFINE(HAVE_FILLDIR_USE_CTX, 1,
1142 [filldir_t needs struct dir_context as argument])
1144 ]) # LC_NFS_FILLDIR_USE_CTX
1147 # LC_PERCPU_COUNTER_INIT
1149 # 3.18 For kernels 3.18 and after percpu_counter_init starts
1150 # to pass a GFP_* memory allocation flag for internal
1151 # memory allocation purposes.
1153 AC_DEFUN([LC_SRC_PERCPU_COUNTER_INIT], [
1154 LB2_LINUX_TEST_SRC([percpu_counter_init], [
1155 #include <linux/percpu_counter.h>
1157 percpu_counter_init(NULL, 0, GFP_KERNEL);
1160 AC_DEFUN([LC_PERCPU_COUNTER_INIT], [
1161 LB2_MSG_LINUX_TEST_RESULT([if percpu_counter_init uses GFP_* flag as argument],
1162 [percpu_counter_init], [
1163 AC_DEFINE(HAVE_PERCPU_COUNTER_INIT_GFP_FLAG, 1,
1164 [percpu_counter_init uses GFP_* flag])
1166 ]) # LC_PERCPU_COUNTER_INIT
1169 # LC_KIOCB_HAS_NBYTES
1171 # 3.19 kernel removed ki_nbytes from struct kiocb
1173 AC_DEFUN([LC_SRC_KIOCB_HAS_NBYTES], [
1174 LB2_LINUX_TEST_SRC([ki_nbytes], [
1175 #include <linux/fs.h>
1177 struct kiocb iocb = { };
1182 AC_DEFUN([LC_KIOCB_HAS_NBYTES], [
1183 LB2_MSG_LINUX_TEST_RESULT([if struct kiocb has ki_nbytes field],
1185 AC_DEFINE(HAVE_KI_NBYTES, 1, [ki_nbytes field exist])
1187 ]) # LC_KIOCB_HAS_NBYTES
1190 # LC_HAVE_DQUOT_QC_DQBLK
1192 # 3.19 has quotactl_ops->[sg]et_dqblk that take struct kqid and qc_dqblk
1193 # Added in commit 14bf61ffe
1195 AC_DEFUN([LC_SRC_HAVE_DQUOT_QC_DQBLK], [
1196 LB2_LINUX_TEST_SRC([qc_dqblk], [
1197 #include <linux/fs.h>
1198 #include <linux/quota.h>
1200 ((struct quotactl_ops *)0)->set_dqblk(NULL, *((struct kqid*)0), (struct qc_dqblk*)0);
1203 AC_DEFUN([LC_HAVE_DQUOT_QC_DQBLK], [
1204 LB2_MSG_LINUX_TEST_RESULT([if 'quotactl_ops.set_dqblk' takes struct qc_dqblk],
1206 AC_DEFINE(HAVE_DQUOT_QC_DQBLK, 1,
1207 [quotactl_ops.set_dqblk takes struct qc_dqblk])
1208 AC_DEFINE(HAVE_DQUOT_KQID, 1,
1209 [quotactl_ops.set_dqblk takes struct kqid])
1211 ]) # LC_HAVE_DQUOT_QC_DQBLK
1214 # LC_HAVE_AIO_COMPLETE
1216 # 3.19 kernel makes aio_complete() static
1218 AC_DEFUN([LC_SRC_HAVE_AIO_COMPLETE], [
1219 LB2_LINUX_TEST_SRC([aio_complete], [
1220 #include <linux/aio.h>
1222 aio_complete(NULL, 0, 0);
1225 AC_DEFUN([LC_HAVE_AIO_COMPLETE], [
1226 LB2_MSG_LINUX_TEST_RESULT([if kernel has exported aio_complete()],
1228 AC_DEFINE(HAVE_AIO_COMPLETE, 1, [aio_complete defined])
1230 ]) # LC_HAVE_AIO_COMPLETE
1233 # LC_HAVE_IS_ROOT_INODE
1235 # 3.19 kernel adds is_root_inode()
1236 # Commit a7400222e3eb ("new helper: is_root_inode()")
1238 AC_DEFUN([LC_SRC_HAVE_IS_ROOT_INODE], [
1239 LB2_LINUX_TEST_SRC([is_root_inode], [
1240 #include <linux/fs.h>
1242 is_root_inode(NULL);
1245 AC_DEFUN([LC_HAVE_IS_ROOT_INODE], [
1246 LB2_MSG_LINUX_TEST_RESULT([if kernel has is_root_inode()],
1248 AC_DEFINE(HAVE_IS_ROOT_INODE, 1, [is_root_inode defined])
1250 ]) # LC_HAVE_IS_ROOT_INODE
1253 # LC_BACKING_DEV_INFO_REMOVAL
1255 # 3.20 kernel removed backing_dev_info from address_space
1257 AC_DEFUN([LC_SRC_BACKING_DEV_INFO_REMOVAL], [
1258 LB2_LINUX_TEST_SRC([backing_dev_info], [
1259 #include <linux/fs.h>
1261 struct address_space mapping;
1263 mapping.backing_dev_info = NULL;
1266 AC_DEFUN([LC_BACKING_DEV_INFO_REMOVAL], [
1267 LB2_MSG_LINUX_TEST_RESULT([if struct address_space has backing_dev_info],
1268 [backing_dev_info], [
1269 AC_DEFINE(HAVE_BACKING_DEV_INFO, 1, [backing_dev_info exist])
1271 ]) # LC_BACKING_DEV_INFO_REMOVAL
1274 # LC_HAVE_PROJECT_QUOTA
1276 # Kernel version v4.0-rc1-197-g847aac644e92
1278 AC_DEFUN([LC_SRC_HAVE_PROJECT_QUOTA], [
1279 LB2_LINUX_TEST_SRC([get_projid], [
1281 #include <linux/quota.h>
1283 struct dquot_operations ops = { };
1285 ops.get_projid(NULL, NULL);
1288 AC_DEFUN([LC_HAVE_PROJECT_QUOTA], [
1289 LB2_MSG_LINUX_TEST_RESULT([if get_projid exists],
1291 AC_DEFINE(HAVE_PROJECT_QUOTA, 1,
1292 [get_projid function exists])
1294 ]) # LC_HAVE_PROJECT_QUOTA
1299 # 4.1 kernel has iov_iter_rw
1301 AC_DEFUN([LC_SRC_IOV_ITER_RW], [
1302 LB2_LINUX_TEST_SRC([iov_iter_rw], [
1303 #include <linux/fs.h>
1304 #include <linux/uio.h>
1306 struct iov_iter *iter = NULL;
1311 AC_DEFUN([LC_IOV_ITER_RW], [
1312 LB2_MSG_LINUX_TEST_RESULT([if iov_iter_rw exist],
1314 AC_DEFINE(HAVE_IOV_ITER_RW, 1, [iov_iter_rw exist])
1319 # LC_HAVE_SYNC_READ_WRITE
1321 # 4.1 new_sync_[read|write] no longer exported
1323 AC_DEFUN([LC_HAVE_SYNC_READ_WRITE], [
1324 LB_CHECK_EXPORT([new_sync_read], [fs/read_write.c],
1325 [AC_DEFINE(HAVE_SYNC_READ_WRITE, 1,
1326 [new_sync_[read|write] is exported by the kernel])])
1327 ]) # LC_HAVE_SYNC_READ_WRITE
1332 # 4.1 redefined bi_cnt as __bi_cnt in commit dac56212e8127dbc0
1334 AC_DEFUN([LC_SRC_HAVE___BI_CNT], [
1335 LB2_LINUX_TEST_SRC([have___bi_cnt], [
1336 #include <asm/atomic.h>
1337 #include <linux/bio.h>
1338 #include <linux/blk_types.h>
1340 struct bio bio = { };
1342 cnt = atomic_read(&bio.__bi_cnt);
1345 AC_DEFUN([LC_HAVE___BI_CNT], [
1346 LB2_MSG_LINUX_TEST_RESULT([if Linux kernel has __bi_cnt in struct bio],
1348 AC_DEFINE(HAVE___BI_CNT, 1, [struct bio has __bi_cnt])
1350 ]) # LC_HAVE___BI_CNT
1353 # LC_SYMLINK_OPS_USE_NAMEIDATA
1355 # For the 4.2+ kernels the file system internal symlink api no
1356 # longer uses struct nameidata as a argument
1358 AC_DEFUN([LC_SRC_SYMLINK_OPS_USE_NAMEIDATA], [
1359 LB2_LINUX_TEST_SRC([symlink_use_nameidata], [
1360 #include <linux/namei.h>
1361 #include <linux/fs.h>
1363 struct nameidata *nd = NULL;
1365 ((struct inode_operations *)0)->follow_link(NULL, nd);
1366 ((struct inode_operations *)0)->put_link(NULL, nd, NULL);
1369 AC_DEFUN([LC_SYMLINK_OPS_USE_NAMEIDATA], [
1370 LB2_MSG_LINUX_TEST_RESULT([if symlink inode operations have struct nameidata argument],
1371 [symlink_use_nameidata], [
1372 AC_DEFINE(HAVE_SYMLINK_OPS_USE_NAMEIDATA, 1,
1373 [symlink inode operations need struct nameidata argument])
1375 ]) # LC_SYMLINK_OPS_USE_NAMEIDATA
1378 # LC_BIO_ENDIO_USES_ONE_ARG
1380 # 4.2 kernel bio_endio now only takes one argument
1382 AC_DEFUN([LC_SRC_BIO_ENDIO_USES_ONE_ARG], [
1383 LB2_LINUX_TEST_SRC([bio_endio], [
1384 #include <linux/bio.h>
1389 AC_DEFUN([LC_BIO_ENDIO_USES_ONE_ARG], [
1390 LB2_MSG_LINUX_TEST_RESULT([if 'bio_endio' with one argument exist],
1392 AC_DEFINE(HAVE_BIO_ENDIO_USES_ONE_ARG, 1,
1393 [bio_endio takes only one argument])
1395 ]) # LC_BIO_ENDIO_USES_ONE_ARG
1398 # LC_ACCOUNT_PAGE_DIRTIED_3ARGS
1400 # 4.2 [to 4.5] kernel page dirtied takes 3 arguments
1402 AC_DEFUN([LC_SRC_ACCOUNT_PAGE_DIRTIED_3ARGS], [
1403 LB2_LINUX_TEST_SRC([account_page_dirtied_3a], [
1404 #include <linux/mm.h>
1406 account_page_dirtied(NULL, NULL, NULL);
1409 AC_DEFUN([LC_ACCOUNT_PAGE_DIRTIED_3ARGS], [
1410 LB2_MSG_LINUX_TEST_RESULT([if 'account_page_dirtied' with 3 args exists],
1411 [account_page_dirtied_3a], [
1412 AC_DEFINE(HAVE_ACCOUNT_PAGE_DIRTIED_3ARGS, 1,
1413 [account_page_dirtied takes three arguments])
1415 ]) # LC_ACCOUNT_PAGE_DIRTIED_3ARGS
1418 # LC_HAVE_CRYPTO_ALLOC_SKCIPHER
1420 # Kernel version 4.12 commit 7a7ffe65c8c5
1421 # introduced crypto_alloc_skcipher().
1423 AC_DEFUN([LC_SRC_HAVE_CRYPTO_ALLOC_SKCIPHER], [
1424 LB2_LINUX_TEST_SRC([crypto_alloc_skcipher], [
1425 #include <crypto/skcipher.h>
1427 crypto_alloc_skcipher(NULL, 0, 0);
1430 AC_DEFUN([LC_HAVE_CRYPTO_ALLOC_SKCIPHER], [
1431 LB2_MSG_LINUX_TEST_RESULT([if crypto_alloc_skcipher is defined],
1432 [crypto_alloc_skcipher], [
1433 AC_DEFINE(HAVE_CRYPTO_ALLOC_SKCIPHER, 1,
1434 [crypto_alloc_skcipher is defined])
1436 ]) # LC_HAVE_CRYPTO_ALLOC_SKCIPHER
1439 # LC_HAVE_INTERVAL_EXP_BLK_INTEGRITY
1441 # 4.3 replace interval with interval_exp in 'struct blk_integrity'
1442 # 'struct blk_integrity_profile' is also added in this version,
1443 # thus use this to determine whether 'struct blk_integrity' has profile
1445 AC_DEFUN([LC_SRC_HAVE_INTERVAL_EXP_BLK_INTEGRITY], [
1446 LB2_LINUX_TEST_SRC([blk_integrity_interval_exp], [
1447 #include <linux/blkdev.h>
1449 ((struct blk_integrity *)0)->interval_exp = 0;
1452 AC_DEFUN([LC_HAVE_INTERVAL_EXP_BLK_INTEGRITY], [
1453 LB2_MSG_LINUX_TEST_RESULT([if 'blk_integrity.interval_exp' exist],
1454 [blk_integrity_interval_exp], [
1455 AC_DEFINE(HAVE_INTERVAL_EXP_BLK_INTEGRITY, 1,
1456 [blk_integrity.interval_exp exist])
1458 ]) # LC_HAVE_INTERVAL_EXP_BLK_INTEGRITY
1461 # LC_HAVE_CACHE_HEAD_HLIST
1463 # 4.3 kernel swiched to hlist for cache_head
1465 AC_DEFUN([LC_SRC_HAVE_CACHE_HEAD_HLIST], [
1466 LB2_LINUX_TEST_SRC([cache_head_has_hlist], [
1467 #include <linux/sunrpc/cache.h>
1469 do {} while(sizeof(((struct cache_head *)0)->cache_list));
1472 AC_DEFUN([LC_HAVE_CACHE_HEAD_HLIST], [
1473 LB2_MSG_LINUX_TEST_RESULT([if 'struct cache_head' has 'cache_list' field],
1474 [cache_head_has_hlist], [
1475 AC_DEFINE(HAVE_CACHE_HEAD_HLIST, 1,
1476 [cache_head has hlist cache_list])
1478 ]) # LC_HAVE_CACHE_HEAD_HLIST
1481 # LC_HAVE_XATTR_HANDLER_SIMPLIFIED
1483 # Kernel version 4.3 commit e409de992e3ea3674393465f07cc71c948edd87a
1484 # simplified xattr_handler handling by passing in the handler pointer
1486 AC_DEFUN([LC_SRC_HAVE_XATTR_HANDLER_SIMPLIFIED], [
1487 LB2_LINUX_TEST_SRC([xattr_handler_simplified], [
1488 #include <linux/xattr.h>
1490 struct xattr_handler handler;
1492 ((struct xattr_handler *)0)->get(&handler, NULL, NULL, NULL, 0);
1493 ((struct xattr_handler *)0)->set(&handler, NULL, NULL, NULL, 0, 0);
1496 AC_DEFUN([LC_HAVE_XATTR_HANDLER_SIMPLIFIED], [
1497 LB2_MSG_LINUX_TEST_RESULT([if 'struct xattr_handler' functions pass in handler pointer],
1498 [xattr_handler_simplified], [
1499 AC_DEFINE(HAVE_XATTR_HANDLER_SIMPLIFIED, 1,
1500 [handler pointer is parameter])
1502 ]) # LC_HAVE_XATTR_HANDLER_SIMPLIFIED
1505 # LC_HAVE_BIP_ITER_BIO_INTEGRITY_PAYLOAD
1507 # 4.3 replace interval with interval_exp in 'struct blk_integrity'.
1509 AC_DEFUN([LC_SRC_HAVE_BIP_ITER_BIO_INTEGRITY_PAYLOAD], [
1510 LB2_LINUX_TEST_SRC([bio_integrity_payload_bip_iter], [
1511 #include <linux/bio.h>
1513 ((struct bio_integrity_payload *)0)->bip_iter.bi_size = 0;
1516 AC_DEFUN([LC_HAVE_BIP_ITER_BIO_INTEGRITY_PAYLOAD], [
1517 LB2_MSG_LINUX_TEST_RESULT([if 'bio_integrity_payload.bip_iter' exist],
1518 [bio_integrity_payload_bip_iter], [
1519 AC_DEFINE(HAVE_BIP_ITER_BIO_INTEGRITY_PAYLOAD, 1,
1520 [bio_integrity_payload.bip_iter exist])
1522 ]) # LC_HAVE_BIP_ITER_BIO_INTEGRITY_PAYLOAD
1525 # LC_BIO_INTEGRITY_PREP_FN
1527 # Lustre kernel patch extents bio_integrity_prep to accept optional
1528 # generate/verify_fn as extra args.
1530 AC_DEFUN([LC_SRC_BIO_INTEGRITY_PREP_FN], [
1531 LB2_LINUX_TEST_SRC([bio_integrity_prep_fn], [
1532 #include <linux/bio.h>
1534 bio_integrity_prep_fn(NULL, NULL, NULL);
1537 AC_DEFUN([LC_BIO_INTEGRITY_PREP_FN], [
1538 LB2_MSG_LINUX_TEST_RESULT([if 'bio_integrity_prep_fn' exists],
1539 [bio_integrity_prep_fn], [
1540 AC_DEFINE(HAVE_BIO_INTEGRITY_PREP_FN, 1,
1541 [kernel has bio_integrity_prep_fn])
1542 AC_SUBST(PATCHED_INTEGRITY_INTF)
1544 AC_SUBST(PATCHED_INTEGRITY_INTF, [#])
1546 ]) # LC_BIO_INTEGRITY_PREP_FN
1548 # LC_BIO_INTEGRITY_PREP_FN_RETURNS_BOOL
1550 # 13 kernel integrity API has changed and in 4.13+
1551 # (as well as in rhel 8.4) bio_integrity_prep() returns boolean true
1554 AC_DEFUN([LC_SRC_BIO_INTEGRITY_PREP_FN_RETURNS_BOOL], [
1555 LB2_LINUX_TEST_SRC([bio_integrity_prep_ret_bool], [
1556 #include <linux/bio.h>
1557 #include <linux/typecheck.h>
1559 #pragma GCC diagnostic warning "-Werror"
1560 typedef bool (*bio_integrity_prep_type)(struct bio *bio) ;
1562 typecheck_fn(bio_integrity_prep_type, bio_integrity_prep);
1565 AC_DEFUN([LC_BIO_INTEGRITY_PREP_FN_RETURNS_BOOL], [
1566 LB2_MSG_LINUX_TEST_RESULT([if 'bio_integrity_prep_fn' returns bool],
1567 [bio_integrity_prep_ret_bool], [
1568 AC_DEFINE(HAVE_BIO_INTEGRITY_PREP_FN_RETURNS_BOOL, 1,
1569 [bio_integrity_prep_fn returns bool])
1571 ]) # LC_BIO_INTEGRITY_PREP_FN_RETURNS_BOOL
1576 # 4.4/4.8 redefined bi_rw as bi_opf (SLES12/kernel commit 4382e33ad37486)
1578 AC_DEFUN([LC_SRC_HAVE_BI_OPF], [
1579 LB2_LINUX_TEST_SRC([have_bi_opf], [
1580 #include <linux/bio.h>
1587 AC_DEFUN([LC_HAVE_BI_OPF], [
1588 LB2_MSG_LINUX_TEST_RESULT([if Linux kernel has bi_opf in struct bio],
1590 AC_DEFINE(HAVE_BI_OPF, 1, [struct bio has bi_opf])
1595 # LC_HAVE_SUBMIT_BIO_2ARGS
1597 # 4.4 removed an argument from submit_bio
1599 AC_DEFUN([LC_SRC_HAVE_SUBMIT_BIO_2ARGS], [
1600 LB2_LINUX_TEST_SRC([have_submit_bio_2args], [
1601 #include <linux/bio.h>
1604 submit_bio(READ, &bio);
1607 AC_DEFUN([LC_HAVE_SUBMIT_BIO_2ARGS], [
1608 LB2_MSG_LINUX_TEST_RESULT([if submit_bio takes two arguments],
1609 [have_submit_bio_2args], [
1610 AC_DEFINE(HAVE_SUBMIT_BIO_2ARGS, 1,
1611 [submit_bio takes two arguments])
1613 ]) # LC_HAVE_SUBMIT_BIO_2_ARGS
1616 # LC_HAVE_CLEAN_BDEV_ALIASES
1618 # 4.4/4.9 unmap_underlying_metadata was replaced by clean_bdev_aliases
1619 # (SLES12/kernel commit 29f3ad7d8380364c)
1621 AC_DEFUN([LC_SRC_HAVE_CLEAN_BDEV_ALIASES], [
1622 LB2_LINUX_TEST_SRC([have_clean_bdev_aliases], [
1623 #include <linux/buffer_head.h>
1625 clean_bdev_aliases(NULL,1,1);
1628 AC_DEFUN([LC_HAVE_CLEAN_BDEV_ALIASES], [
1629 LB2_MSG_LINUX_TEST_RESULT([if kernel has clean_bdev_aliases],
1630 [have_clean_bdev_aliases], [
1631 AC_DEFINE(HAVE_CLEAN_BDEV_ALIASES, 1,
1632 [kernel has clean_bdev_aliases])
1634 ]) # LC_HAVE_CLEAN_BDEV_ALIASES
1637 # LC_HAVE_LOCKS_LOCK_FILE_WAIT
1639 # 4.4 kernel have moved locks API users to
1640 # locks_lock_inode_wait()
1642 AC_DEFUN([LC_SRC_HAVE_LOCKS_LOCK_FILE_WAIT], [
1643 LB2_LINUX_TEST_SRC([locks_lock_file_wait], [
1644 #include <linux/fs.h>
1646 locks_lock_file_wait(NULL, NULL);
1649 AC_DEFUN([LC_HAVE_LOCKS_LOCK_FILE_WAIT], [
1650 LB2_MSG_LINUX_TEST_RESULT([if 'locks_lock_file_wait' exists],
1651 [locks_lock_file_wait], [
1652 AC_DEFINE(HAVE_LOCKS_LOCK_FILE_WAIT, 1,
1653 [kernel has locks_lock_file_wait])
1655 ]) # LC_HAVE_LOCKS_LOCK_FILE_WAIT
1658 # LC_HAVE_KEY_PAYLOAD_DATA_ARRAY
1660 # 4.4 kernel merged type-specific data with the payload data for keys
1662 AC_DEFUN([LC_SRC_HAVE_KEY_PAYLOAD_DATA_ARRAY], [
1663 LB2_LINUX_TEST_SRC([key_payload_data_array], [
1664 #include <linux/key.h>
1666 struct key key = { };
1668 key.payload.data[0] = NULL;
1671 AC_DEFUN([LC_HAVE_KEY_PAYLOAD_DATA_ARRAY], [
1672 LB2_MSG_LINUX_TEST_RESULT([if 'struct key' has 'payload.data' as an array],
1673 [key_payload_data_array], [
1674 AC_DEFINE(HAVE_KEY_PAYLOAD_DATA_ARRAY, 1, [payload.data is an array])
1676 ]) # LC_HAVE_KEY_PAYLOAD_DATA_ARRAY
1679 # LC_HAVE_XATTR_HANDLER_NAME
1681 # Kernel version 4.4 commit 98e9cb5711c68223f0e4d5201b9a6add255ec550
1682 # add a name member to struct xattr_handler
1684 AC_DEFUN([LC_SRC_HAVE_XATTR_HANDLER_NAME], [
1685 LB2_LINUX_TEST_SRC([xattr_handler_name], [
1686 #include <linux/xattr.h>
1688 ((struct xattr_handler *)NULL)->name = NULL;
1691 AC_DEFUN([LC_HAVE_XATTR_HANDLER_NAME], [
1692 LB2_MSG_LINUX_TEST_RESULT([if 'struct xattr_handler' has a name member],
1693 [xattr_handler_name], [
1694 AC_DEFINE(HAVE_XATTR_HANDLER_NAME, 1,
1695 [xattr_handler has a name member])
1697 ]) # LC_HAVE_XATTR_HANDLER_NAME
1700 # LC_HAVE_FILE_DENTRY
1702 # 4.5 adds wrapper file_dentry
1704 AC_DEFUN([LC_SRC_HAVE_FILE_DENTRY], [
1705 LB2_LINUX_TEST_SRC([file_dentry], [
1706 #include <linux/fs.h>
1711 AC_DEFUN([LC_HAVE_FILE_DENTRY], [
1712 LB2_MSG_LINUX_TEST_RESULT([if Linux kernel has 'file_dentry'],
1714 AC_DEFINE(HAVE_FILE_DENTRY, 1, [kernel has file_dentry])
1716 ]) # LC_HAVE_FILE_DENTRY
1719 # LC_HAVE_INODE_LOCK
1721 # 4.5 introduced inode_lock
1723 AC_DEFUN([LC_SRC_HAVE_INODE_LOCK], [
1724 LB2_LINUX_TEST_SRC([inode_lock], [
1725 #include <linux/fs.h>
1730 AC_DEFUN([LC_HAVE_INODE_LOCK], [
1731 LB2_MSG_LINUX_TEST_RESULT([if 'inode_lock' is defined],
1733 AC_DEFINE(HAVE_INODE_LOCK, 1, [inode_lock is defined])
1735 ]) # LC_HAVE_INODE_LOCK
1738 # LC_HAVE_IOP_GET_LINK
1740 # 4.5 vfs replaced iop->follow_link with
1743 AC_DEFUN([LC_SRC_HAVE_IOP_GET_LINK], [
1744 LB2_LINUX_TEST_SRC([inode_ops_get_link], [
1745 #include <linux/fs.h>
1747 struct inode_operations iop;
1748 iop.get_link = NULL;
1751 AC_DEFUN([LC_HAVE_IOP_GET_LINK], [
1752 LB2_MSG_LINUX_TEST_RESULT([if 'iop' has 'get_link'],
1753 [inode_ops_get_link], [
1754 AC_DEFINE(HAVE_IOP_GET_LINK, 1, [have iop get_link])
1756 ]) # LC_HAVE_IOP_GET_LINK
1759 # LC_HAVE_IN_COMPAT_SYSCALL
1761 # 4.6 renamed is_compat_task to in_compat_syscall
1763 AC_DEFUN([LC_SRC_HAVE_IN_COMPAT_SYSCALL], [
1764 LB2_LINUX_TEST_SRC([in_compat_syscall], [
1765 #include <linux/compat.h>
1767 in_compat_syscall();
1770 AC_DEFUN([LC_HAVE_IN_COMPAT_SYSCALL], [
1771 LB2_MSG_LINUX_TEST_RESULT([if 'in_compat_syscall' is defined],
1772 [in_compat_syscall], [
1773 AC_DEFINE(HAVE_IN_COMPAT_SYSCALL, 1, [have in_compat_syscall])
1775 ]) # LC_HAVE_IN_COMPAT_SYSCALL
1778 # LC_HAVE_XATTR_HANDLER_INODE_PARAM
1780 # Kernel version 4.6 commit b296821a7c42fa58baa17513b2b7b30ae66f3336
1781 # and commit 5930122683dff58f0846b0f0405b4bd598a3ba6a added inode parameter
1782 # to xattr_handler functions
1784 AC_DEFUN([LC_SRC_HAVE_XATTR_HANDLER_INODE_PARAM], [
1785 LB2_LINUX_TEST_SRC([xattr_handler_inode_param], [
1786 #include <linux/xattr.h>
1788 const struct xattr_handler handler;
1790 ((struct xattr_handler *)0)->get(&handler, NULL, NULL, NULL, NULL, 0);
1791 ((struct xattr_handler *)0)->set(&handler, NULL, NULL, NULL, NULL, 0, 0);
1794 AC_DEFUN([LC_HAVE_XATTR_HANDLER_INODE_PARAM], [
1795 LB2_MSG_LINUX_TEST_RESULT([if 'struct xattr_handler' functions have inode parameter],
1796 [xattr_handler_inode_param], [
1797 AC_DEFINE(HAVE_XATTR_HANDLER_INODE_PARAM, 1, [needs inode parameter])
1799 ]) # LC_HAVE_XATTR_HANDLER_INODE_PARAM
1804 # Kernel version 4.6 commit 85c7f81041d57cfe9dc97f4680d5586b54534a39
1805 # introduced parallel lookups in the VFS layer. The inline function
1806 # d_in_lookup was added to notify when the same item was being queried
1809 AC_DEFUN([LC_SRC_D_IN_LOOKUP], [
1810 LB2_LINUX_TEST_SRC([d_in_lookup], [
1811 #include <linux/dcache.h>
1816 AC_DEFUN([LC_D_IN_LOOKUP], [
1817 LB2_MSG_LINUX_TEST_RESULT([if 'd_in_lookup' is defined],
1819 AC_DEFINE(HAVE_D_IN_LOOKUP, 1, [d_in_lookup is defined])
1824 # LC_LOCK_PAGE_MEMCG
1826 # Kernel version 4.6 adds lock_page_memcg(page)
1827 # Linux commit v5.15-12273-gab2f9d2d3626
1828 # mm: unexport {,un}lock_page_memcg
1830 AC_DEFUN([LC_SRC_LOCK_PAGE_MEMCG], [
1831 LB2_LINUX_TEST_SRC([lock_page_memcg], [
1832 #include <linux/memcontrol.h>
1834 lock_page_memcg(NULL);
1837 AC_DEFUN([LC_LOCK_PAGE_MEMCG], [
1838 LB2_MSG_LINUX_TEST_RESULT([if 'lock_page_memcg' is defined],
1839 [lock_page_memcg], [
1840 AC_DEFINE(HAVE_LOCK_PAGE_MEMCG, 1, [lock_page_memcg is defined])
1842 ]) # LC_LOCK_PAGE_MEMCG
1845 # LC_HAVE_DOWN_WRITE_KILLABLE
1847 # Kernel version v4.6-rc3-28-g916633a40370
1849 AC_DEFUN([LC_SRC_HAVE_DOWN_WRITE_KILLABLE], [
1850 LB2_LINUX_TEST_SRC([down_write_killable], [
1851 #include <linux/rwsem.h>
1853 struct rw_semaphore sem;
1857 rc = down_write_killable(&sem);
1861 AC_DEFUN([LC_HAVE_DOWN_WRITE_KILLABLE], [
1862 LB2_MSG_LINUX_TEST_RESULT([if down_write_killable exists],
1863 [down_write_killable], [
1864 AC_DEFINE(HAVE_DOWN_WRITE_KILLABLE, 1,
1865 [down_write_killable function exists])
1867 ]) # LC_HAVE_DOWN_WRITE_KILLABLE
1872 # Kernel version 4.7-rc5 commit 285b102d3b745f3c2c110c9c327741d87e64aacc
1873 # add new d_init to initialize dentry at allocation time
1875 AC_DEFUN([LC_SRC_D_INIT], [
1876 LB2_LINUX_TEST_SRC([d_init], [
1877 #include <linux/dcache.h>
1879 struct dentry_operations ops = { };
1882 rc = ops.d_init(NULL);
1885 AC_DEFUN([LC_D_INIT], [
1886 LB2_MSG_LINUX_TEST_RESULT([if dentry operations supports 'd_init'],
1888 AC_DEFINE(HAVE_D_INIT, 1, ['d_init' exists])
1895 # Kernel version 4.7 commit c8b8e32d700fe943a935e435ae251364d016c497
1896 # direct-io: eliminate the offset argument to ->direct_IO
1898 AC_DEFUN([LC_SRC_DIRECTIO_2ARGS], [
1899 LB2_LINUX_TEST_SRC([direct_io_2args], [
1900 #include <linux/fs.h>
1902 struct address_space_operations ops = { };
1903 struct iov_iter *iter = NULL;
1904 struct kiocb *iocb = NULL;
1907 rc = ops.direct_IO(iocb, iter);
1910 AC_DEFUN([LC_DIRECTIO_2ARGS], [
1911 LB2_MSG_LINUX_TEST_RESULT([if '->direct_IO()' takes 2 arguments],
1912 [direct_io_2args], [
1913 AC_DEFINE(HAVE_DIRECTIO_2ARGS, 1, [direct_IO has 2 arguments])
1915 ]) # LC_DIRECTIO_2ARGS
1918 # LC_GENERIC_WRITE_SYNC_2ARGS
1920 # Kernel version 4.7 commit dde0c2e79848298cc25621ad080d47f94dbd7cce
1921 # fs: add IOCB_SYNC and IOCB_DSYNC
1923 AC_DEFUN([LC_SRC_GENERIC_WRITE_SYNC_2ARGS], [
1924 LB2_LINUX_TEST_SRC([generic_write_sync_2args], [
1925 #include <linux/fs.h>
1927 struct kiocb *iocb = NULL;
1930 rc = generic_write_sync(iocb, 0);
1933 AC_DEFUN([LC_GENERIC_WRITE_SYNC_2ARGS], [
1934 LB2_MSG_LINUX_TEST_RESULT([if 'generic_write_sync()' takes 2 arguments],
1935 [generic_write_sync_2args], [
1936 AC_DEFINE(HAVE_GENERIC_WRITE_SYNC_2ARGS, 1,
1937 [generic_write_sync has 2 arguments])
1939 ]) # LC_GENERIC_WRITE_SYNC_2ARGS
1942 # LC_FOP_ITERATE_SHARED
1944 # Kernel v4.6-rc3-29-g6192269 adds iterate_shared method to file_operations
1946 AC_DEFUN([LC_SRC_FOP_ITERATE_SHARED], [
1947 LB2_LINUX_TEST_SRC([fop_iterate_shared], [
1948 #include <linux/fs.h>
1950 struct file_operations fop;
1951 fop.iterate_shared = NULL;
1954 AC_DEFUN([LC_FOP_ITERATE_SHARED], [
1955 LB2_MSG_LINUX_TEST_RESULT([if 'file_operations' has 'iterate_shared'],
1956 [fop_iterate_shared], [
1957 AC_DEFINE(HAVE_FOP_ITERATE_SHARED, 1,
1958 [file_operations has iterate_shared])
1960 ]) # LC_FOP_ITERATE_SHARED
1963 # LC_EXPORT_DEFAULT_FILE_SPLICE_READ
1965 # 4.8-rc8 commit 82c156f853840645604acd7c2cebcb75ed1b6652 switched
1966 # generic_file_splice_read() to using ->read_iter. We can test this
1967 # change since default_file_splice_read() is no longer exported.
1969 AC_DEFUN([LC_EXPORT_DEFAULT_FILE_SPLICE_READ], [
1970 LB_CHECK_EXPORT([default_file_splice_read], [fs/splice.c],
1971 [AC_DEFINE(HAVE_DEFAULT_FILE_SPLICE_READ_EXPORT, 1,
1972 [default_file_splice_read is exported])])
1973 ]) # LC_EXPORT_DEFAULT_FILE_SPLCE_READ
1976 # LC_HAVE_POSIX_ACL_VALID_USER_NS
1978 # 4.8 posix_acl_valid takes struct user_namespace
1980 AC_DEFUN([LC_SRC_HAVE_POSIX_ACL_VALID_USER_NS], [
1981 LB2_LINUX_TEST_SRC([posix_acl_valid], [
1982 #include <linux/fs.h>
1983 #include <linux/posix_acl.h>
1985 posix_acl_valid((struct user_namespace*)NULL, (const struct posix_acl*)NULL);
1988 AC_DEFUN([LC_HAVE_POSIX_ACL_VALID_USER_NS], [
1989 LB2_MSG_LINUX_TEST_RESULT([if 'posix_acl_valid' takes 'struct user_namespace'],
1990 [posix_acl_valid], [
1991 AC_DEFINE(HAVE_POSIX_ACL_VALID_USER_NS, 1,
1992 [posix_acl_valid takes struct user_namespace])
1994 ]) # LC_HAVE_POSIX_ACL_VALID_USER_NS
1997 # LC_D_COMPARE_4ARGS
1999 # Kernel version 4.8 commit 6fa67e707559303e086303aeecc9e8b91ef497d5
2000 # get rid of 'parent' argument of ->d_compare()
2002 AC_DEFUN([LC_SRC_D_COMPARE_4ARGS], [
2003 LB2_LINUX_TEST_SRC([d_compare_4args], [
2004 #include <linux/dcache.h>
2006 ((struct dentry_operations*)0)->d_compare(NULL,0,NULL,NULL);
2009 AC_DEFUN([LC_D_COMPARE_4ARGS], [
2010 LB2_MSG_LINUX_TEST_RESULT([if 'd_compare' taken 4 arguments],
2011 [d_compare_4args], [
2012 AC_DEFINE(HAVE_D_COMPARE_4ARGS, 1,
2013 [d_compare need 4 arguments])
2015 ]) # LC_D_COMPARE_4ARGS
2018 # LC_FULL_NAME_HASH_3ARGS
2020 # Kernel version 4.8 commit 8387ff2577eb9ed245df9a39947f66976c6bcd02
2021 # vfs: make the string hashes salt the hash
2023 AC_DEFUN([LC_SRC_FULL_NAME_HASH_3ARGS], [
2024 LB2_LINUX_TEST_SRC([full_name_hash_3args], [
2025 #include <linux/stringhash.h>
2028 hash = full_name_hash(NULL,NULL,0);
2031 AC_DEFUN([LC_FULL_NAME_HASH_3ARGS], [
2032 LB2_MSG_LINUX_TEST_RESULT([if 'full_name_hash' taken 3 arguments],
2033 [full_name_hash_3args], [
2034 AC_DEFINE(HAVE_FULL_NAME_HASH_3ARGS, 1,
2035 [full_name_hash need 3 arguments])
2037 ]) # LC_FULL_NAME_HASH_3ARGS
2040 # LC_STRUCT_POSIX_ACL_XATTR
2042 # Kernel version 4.8 commit 2211d5ba5c6c4e972ba6dbc912b2897425ea6621
2043 # posix_acl: xattr representation cleanups
2045 AC_DEFUN([LC_SRC_STRUCT_POSIX_ACL_XATTR], [
2046 LB2_LINUX_TEST_SRC([struct_posix_acl_xattr], [
2047 #include <linux/fs.h>
2048 #include <linux/posix_acl_xattr.h>
2050 struct posix_acl_xattr_header *h = NULL;
2051 struct posix_acl_xattr_entry *e;
2052 e = (void *)(h + 1);
2055 AC_DEFUN([LC_STRUCT_POSIX_ACL_XATTR], [
2056 LB2_MSG_LINUX_TEST_RESULT([if 'struct posix_acl_xattr_{header,entry}' defined],
2057 [struct_posix_acl_xattr], [
2058 AC_DEFINE(HAVE_STRUCT_POSIX_ACL_XATTR, 1,
2059 [struct posix_acl_xattr_{header,entry} defined])
2061 ]) # LC_STRUCT_POSIX_ACL_XATTR
2066 # Kernel version 4.8 commit fd50ecaddf8372a1d96e0daeaac0f93cf04e4d42
2067 # removed {get,set,remove}xattr inode operations
2069 AC_DEFUN([LC_SRC_IOP_XATTR], [
2070 LB2_LINUX_TEST_SRC([inode_ops_xattr], [
2071 #include <linux/fs.h>
2073 struct inode_operations iop;
2074 iop.setxattr = NULL;
2075 iop.getxattr = NULL;
2076 iop.removexattr = NULL;
2079 AC_DEFUN([LC_IOP_XATTR], [
2080 LB2_MSG_LINUX_TEST_RESULT([if 'inode_operations' has {get,set,remove}xattr members],
2081 [inode_ops_xattr], [
2082 AC_DEFINE(HAVE_IOP_XATTR, 1,
2083 [inode_operations has {get,set,remove}xattr members])
2090 # Kernel version 4.9 commit 81243eacfa400f5f7b89f4c2323d0de9982bb0fb
2091 # cred: simpler, 1D supplementary groups
2093 AC_DEFUN([LC_SRC_GROUP_INFO_GID], [
2094 LB2_LINUX_TEST_SRC([group_info_gid], [
2095 #include <linux/cred.h>
2098 p = ((struct group_info *)0)->gid;
2101 AC_DEFUN([LC_GROUP_INFO_GID], [
2102 LB2_MSG_LINUX_TEST_RESULT([if 'struct group_info' has member 'gid'],
2104 AC_DEFINE(HAVE_GROUP_INFO_GID, 1,
2105 [struct group_info has member gid])
2107 ]) # LC_GROUP_INFO_GID
2112 # Kernel version 4.9 commit 5d6c31910bc0713e37628dc0ce677dcb13c8ccf4
2113 # added __vfs_{get,set,remove}xattr helpers
2115 AC_DEFUN([LC_SRC_VFS_SETXATTR], [
2116 LB2_LINUX_TEST_SRC([vfs_setxattr], [
2117 #include <linux/xattr.h>
2119 __vfs_setxattr(NULL, NULL, NULL, NULL, 0, 0);
2122 AC_DEFUN([LC_VFS_SETXATTR], [
2123 LB2_MSG_LINUX_TEST_RESULT([if '__vfs_setxattr' helper is available],
2125 AC_DEFINE(HAVE_VFS_SETXATTR, 1, ['__vfs_setxattr' is available])
2127 ]) # LC_VFS_SETXATTR
2130 # LC_POSIX_ACL_UPDATE_MODE
2132 # Kernel version 4.9 commit 073931017b49d9458aa351605b43a7e34598caef
2133 # posix_acl: Clear SGID bit when setting file permissions
2135 AC_DEFUN([LC_SRC_POSIX_ACL_UPDATE_MODE], [
2136 LB2_LINUX_TEST_SRC([posix_acl_update_mode], [
2137 #include <linux/fs.h>
2138 #include <linux/posix_acl.h>
2140 posix_acl_update_mode(NULL, NULL, NULL);
2143 AC_DEFUN([LC_POSIX_ACL_UPDATE_MODE], [
2144 LB2_MSG_LINUX_TEST_RESULT([if 'posix_acl_update_mode' exists],
2145 [posix_acl_update_mode], [
2146 AC_DEFINE(HAVE_POSIX_ACL_UPDATE_MODE, 1,
2147 ['posix_acl_update_mode' is available])
2149 ]) # LC_POSIX_ACL_UPDATE_MODE
2152 # LC_HAVE_BDI_IO_PAGES
2154 # Kernel version 4.9 commit 9491ae4aade6814afcfa67f4eb3e3342c2b39750
2155 # mm: don't cap request size based on read-ahead setting
2156 # This patch introduces a bdi hint, io_pages.
2158 AC_DEFUN([LC_SRC_HAVE_BDI_IO_PAGES], [
2159 LB2_LINUX_TEST_SRC([bdi_has_io_pages], [
2160 #include <linux/backing-dev.h>
2162 struct backing_dev_info info;
2167 AC_DEFUN([LC_HAVE_BDI_IO_PAGES], [
2168 LB2_MSG_LINUX_TEST_RESULT([if 'struct backing_dev_info' has 'io_pages' field],
2169 [bdi_has_io_pages], [
2170 AC_DEFINE(HAVE_BDI_IO_PAGES, 1,
2171 [backing_dev_info has io_pages])
2173 ]) # LC_HAVE_BDI_IO_PAGES
2176 # LC_IOP_GENERIC_READLINK
2178 # Kernel version 4.10 commit dfeef68862edd7d4bafe68ef7aeb5f658ef24bb5
2179 # removed generic_readlink from individual file systems
2181 AC_DEFUN([LC_SRC_IOP_GENERIC_READLINK], [
2182 LB2_LINUX_TEST_SRC([inode_ops_readlink], [
2183 #include <linux/fs.h>
2185 struct inode_operations iop;
2186 iop.readlink = generic_readlink;
2189 AC_DEFUN([LC_IOP_GENERIC_READLINK], [
2190 LB2_MSG_LINUX_TEST_RESULT([if 'generic_readlink' still exist],
2191 [inode_ops_readlink], [
2192 AC_DEFINE(HAVE_IOP_GENERIC_READLINK, 1,
2193 [generic_readlink has been removed])
2195 ]) # LC_IOP_GENERIC_READLINK
2198 # LC_HAVE_VM_FAULT_ADDRESS
2200 # Kernel version 4.10 commit 1a29d85eb0f19b7d8271923d8917d7b4f5540b3e
2201 # removed virtual_address field. Need to use address field instead
2203 AC_DEFUN([LC_SRC_HAVE_VM_FAULT_ADDRESS], [
2204 LB2_LINUX_TEST_SRC([vm_fault_address], [
2205 #include <linux/mm.h>
2207 struct vm_fault vmf = { 0 };
2208 unsigned long addr = (unsigned long)vmf.address;
2212 AC_DEFUN([LC_HAVE_VM_FAULT_ADDRESS], [
2213 LB2_MSG_LINUX_TEST_RESULT([if 'struct vm_fault' replaced virtual_address with address field],
2214 [vm_fault_address], [
2215 AC_DEFINE(HAVE_VM_FAULT_ADDRESS, 1,
2216 [virtual_address has been replaced by address field])
2218 ]) # LC_HAVE_VM_FAULT_ADDRESS
2221 # LC_INODEOPS_ENHANCED_GETATTR
2223 # Kernel version 4.11 commit a528d35e8bfcc521d7cb70aaf03e1bd296c8493f
2224 # expanded getattr to be able to get more stat information.
2226 AC_DEFUN([LC_SRC_INODEOPS_ENHANCED_GETATTR], [
2227 LB2_LINUX_TEST_SRC([getattr_path], [
2228 #include <linux/fs.h>
2232 ((struct inode_operations *)1)->getattr(&path, NULL, 0, 0);
2235 AC_DEFUN([LC_INODEOPS_ENHANCED_GETATTR], [
2236 LB2_MSG_LINUX_TEST_RESULT([if 'inode_operations' getattr member can gather advance stats],
2238 AC_DEFINE(HAVE_INODEOPS_ENHANCED_GETATTR, 1,
2239 [inode_operations .getattr member function can gather advance stats])
2241 ]) # LC_INODEOPS_ENHANCED_GETATTR
2244 # LC_VM_OPERATIONS_REMOVE_VMF_ARG
2246 # Kernel version 4.11 commit 11bac80004499ea59f361ef2a5516c84b6eab675
2247 # removed struct vm_area_struct as an argument for vm_operations since
2248 # in the same kernel version struct vma_area_struct was folded into
2251 AC_DEFUN([LC_SRC_VM_OPERATIONS_REMOVE_VMF_ARG], [
2252 LB2_LINUX_TEST_SRC([vm_operations_no_vm_area_struct], [
2253 #include <linux/mm.h>
2255 struct vm_fault vmf;
2257 ((struct vm_operations_struct *)0)->fault(&vmf);
2258 ((struct vm_operations_struct *)0)->page_mkwrite(&vmf);
2261 AC_DEFUN([LC_VM_OPERATIONS_REMOVE_VMF_ARG], [
2262 LB2_MSG_LINUX_TEST_RESULT([if 'struct vm_operations' removed struct vm_area_struct],
2263 [vm_operations_no_vm_area_struct], [
2264 AC_DEFINE(HAVE_VM_OPS_USE_VM_FAULT_ONLY, 1,
2265 ['struct vm_operations' remove struct vm_area_struct argument])
2267 ]) # LC_VM_OPERATIONS_REMOVE_VMF_ARG
2270 # LC_HAVE_KEY_USAGE_REFCOUNT
2272 # Kernel version 4.11 commit fff292914d3a2f1efd05ca71c2ba72a3c663201e
2273 # converted key.usage from atomic_t to refcount_t.
2275 AC_DEFUN([LC_SRC_HAVE_KEY_USAGE_REFCOUNT], [
2276 LB2_LINUX_TEST_SRC([key_usage_refcount], [
2277 #include <linux/key.h>
2279 struct key key = { };
2281 refcount_read(&key.usage);
2284 AC_DEFUN([LC_HAVE_KEY_USAGE_REFCOUNT], [
2285 LB2_MSG_LINUX_TEST_RESULT([if 'key.usage' is refcount_t],
2286 [key_usage_refcount], [
2287 AC_DEFINE(HAVE_KEY_USAGE_REFCOUNT, 1,
2288 [key.usage is of type refcount_t])
2290 ]) #LC_HAVE_KEY_USAGE_REFCOUNT
2293 # LC_HAVE_CRYPTO_MAX_ALG_NAME_128
2295 # Kernel version 4.11 commit f437a3f477cce402dbec6537b29e9e33962c9f73
2296 # switched CRYPTO_MAX_ALG_NAME from 64 to 128.
2298 AC_DEFUN([LC_SRC_HAVE_CRYPTO_MAX_ALG_NAME_128], [
2299 LB2_LINUX_TEST_SRC([crypto_max_alg_name], [
2300 #include <linux/crypto.h>
2302 #if CRYPTO_MAX_ALG_NAME != 128
2307 AC_DEFUN([LC_HAVE_CRYPTO_MAX_ALG_NAME_128], [
2308 LB2_MSG_LINUX_TEST_RESULT([if 'CRYPTO_MAX_ALG_NAME' is 128],
2309 [crypto_max_alg_name], [
2310 AC_DEFINE(HAVE_CRYPTO_MAX_ALG_NAME_128, 1,
2311 ['CRYPTO_MAX_ALG_NAME' is 128])
2313 ]) # LC_HAVE_CRYPTO_MAX_ALG_NAME_128
2316 # LC_HAVE_FSMAP_HEADER
2318 # Kernel version 4.11-rc4 commit 80c9f490f344be7999f57fc31a8ed956f8c65f3b
2319 # vfs: add common GETFSMAP ioctl definitions
2321 AC_DEFUN([LC_SRC_HAVE_FSMAP_HEADER], [
2322 LB2_CHECK_LINUX_HEADER_SRC([linux/fsmap.h], [-Werror])
2324 AC_DEFUN([LC_HAVE_FSMAP_HEADER], [
2325 LB2_CHECK_LINUX_HEADER_RESULT([linux/fsmap.h], [
2326 AC_DEFINE(HAVE_FSMAP_H, 1,
2327 [fsmap.h is present])
2329 ]) # LC_HAVE_FSMAP_HEADER
2332 # Kernel version 4.12 commit 47f38c539e9a42344ff5a664942075bd4df93876
2333 # CURRENT_TIME is not 64 bit time safe so it was replaced with
2336 AC_DEFUN([LC_SRC_CURRENT_TIME], [
2337 LB2_LINUX_TEST_SRC([current_time], [
2338 #include <linux/fs.h>
2342 attr.ia_atime = current_time(NULL);
2345 AC_DEFUN([LC_CURRENT_TIME], [
2346 LB2_MSG_LINUX_TEST_RESULT([if CURRENT_TIME has been replaced with current_time],
2348 AC_DEFINE(HAVE_CURRENT_TIME, 1,
2349 [current_time() has replaced CURRENT_TIME])
2351 ]) # LC_CURRENT_TIME
2354 # LC_HAVE_GET_INODE_USAGE
2356 # Kernel version v4.12-rc2-43-g7a9ca53aea10
2358 AC_DEFUN([LC_SRC_HAVE_GET_INODE_USAGE], [
2359 LB2_LINUX_TEST_SRC([get_inode_usage], [
2361 #include <linux/quota.h>
2363 struct dquot_operations ops = { };
2365 ops.get_inode_usage(NULL, NULL);
2368 AC_DEFUN([LC_HAVE_GET_INODE_USAGE], [
2369 LB2_MSG_LINUX_TEST_RESULT([if get_inode_usage exists],
2370 [get_inode_usage], [
2371 AC_DEFINE(HAVE_GET_INODE_USAGE, 1,
2372 [get_inode_usage function exists])
2374 ]) # LC_HAVE_GET_INODE_USAGE
2377 # LC_SUPER_SETUP_BDI_NAME
2379 # Kernel version 4.12 commit 9594caf216dc0fe3e318b34af0127276db661241
2380 # unified bdi handling
2382 AC_DEFUN([LC_SRC_SUPER_SETUP_BDI_NAME], [
2383 LB2_LINUX_TEST_SRC([super_setup_bdi_name], [
2384 #include <linux/fs.h>
2386 super_setup_bdi_name(NULL, "lustre");
2389 AC_DEFUN([LC_SUPER_SETUP_BDI_NAME], [
2390 LB2_MSG_LINUX_TEST_RESULT([if 'super_setup_bdi_name' exist],
2391 [super_setup_bdi_name], [
2392 AC_DEFINE(HAVE_SUPER_SETUP_BDI_NAME, 1,
2393 ['super_setup_bdi_name' is available])
2395 ]) # LC_SUPER_SETUP_BDI_NAME
2400 # 4.12 replace bi_error to bi_status
2402 AC_DEFUN([LC_SRC_BI_STATUS], [
2403 LB2_LINUX_TEST_SRC([bi_status], [
2404 #include <linux/blk_types.h>
2406 ((struct bio *)0)->bi_status = 0;
2409 AC_DEFUN([LC_BI_STATUS], [
2410 LB2_MSG_LINUX_TEST_RESULT([if 'bi_status' exist],
2412 AC_DEFINE(HAVE_BI_STATUS, 1, ['bi_status' is available])
2417 # LC_PAGEVEC_INIT_ONE_PARAM
2419 # 4.14 pagevec_init takes one parameter
2421 AC_DEFUN([LC_SRC_PAGEVEC_INIT_ONE_PARAM], [
2422 LB2_LINUX_TEST_SRC([pagevec_init], [
2423 #include <linux/pagevec.h>
2428 AC_DEFUN([LC_PAGEVEC_INIT_ONE_PARAM], [
2429 LB2_MSG_LINUX_TEST_RESULT([if 'pagevec_init' takes one parameter],
2431 AC_DEFINE(HAVE_PAGEVEC_INIT_ONE_PARAM, 1,
2432 ['pagevec_init' takes one parameter])
2434 ]) # LC_PAGEVEC_INIT_ONE_PARAM
2439 # 4.14 replaced bi_bdev to bi_disk
2441 AC_DEFUN([LC_SRC_BI_BDEV], [
2442 LB2_LINUX_TEST_SRC([bi_bdev], [
2443 #include <linux/bio.h>
2445 ((struct bio *)0)->bi_bdev = NULL;
2448 AC_DEFUN([LC_BI_BDEV], [
2449 LB2_MSG_LINUX_TEST_RESULT([if 'bi_bdev' exist],
2451 AC_DEFINE(HAVE_BI_BDEV, 1, ['bi_bdev' is available])
2456 # LC_INTERVAL_TREE_CACHED
2458 # 4.14 f808c13fd3738948e10196496959871130612b61
2459 # switched INTERVAL_TREE_DEFINE to use cached RB_Trees.
2461 AC_DEFUN([LC_SRC_INTERVAL_TREE_CACHED], [
2462 LB2_LINUX_TEST_SRC([itree_cached], [
2463 #include <linux/interval_tree_generic.h>
2464 struct foo { struct rb_node rb; int last; int a,b;};
2465 #define START(n) ((n)->a)
2466 #define LAST(n) ((n)->b)
2467 struct rb_root_cached tree;
2468 INTERVAL_TREE_DEFINE(struct foo, rb, int, last,
2469 START, LAST, , foo);
2471 foo_insert(NULL, &tree);
2474 AC_DEFUN([LC_INTERVAL_TREE_CACHED], [
2475 LB2_MSG_LINUX_TEST_RESULT([if interval_trees use rb_tree_cached],
2477 AC_DEFINE(HAVE_INTERVAL_TREE_CACHED, 1,
2478 [interval trees use rb_tree_cached])
2480 ]) # LC_INTERVAL_TREE_CACHED
2485 # 4.14 introduced IS_ENCRYPTED and S_ENCRYPTED
2487 AC_DEFUN([LC_IS_ENCRYPTED], [
2488 LB_CHECK_COMPILE([if IS_ENCRYPTED is defined],
2490 #include <linux/fs.h>
2492 (void)IS_ENCRYPTED((struct inode *)1);
2494 has_is_encrypted="yes"
2496 ]) # LC_IS_ENCRYPTED used by LC_CONFIG_CRYPTO
2501 # kernel 4.17 commit b93b016313b3ba8003c3b8bb71f569af91f19fc7
2503 AC_DEFUN([LC_SRC_I_PAGES], [
2504 LB2_LINUX_TEST_SRC([i_pages], [
2505 #include <linux/fs.h>
2507 struct address_space mapping = {};
2510 i_pages = &mapping.i_pages;
2513 AC_DEFUN([LC_I_PAGES], [
2514 LB2_MSG_LINUX_TEST_RESULT([if struct address_space has i_pages],
2516 AC_DEFINE(HAVE_I_PAGES, 1, [struct address_space has i_pages])
2523 # kernel 4.17 commit 3d3539018d2cbd12e5af4a132636ee7fd8d43ef0
2524 # mm: create the new vm_fault_t type
2526 AC_DEFUN([LC_SRC_VM_FAULT_T], [
2527 LB2_LINUX_TEST_SRC([vm_fault_t], [
2528 #include <linux/mm_types.h>
2530 vm_fault_t x = VM_FAULT_SIGBUS;
2534 AC_DEFUN([LC_VM_FAULT_T], [
2535 LB2_MSG_LINUX_TEST_RESULT([if vm_fault_t type exists],
2537 AC_DEFINE(HAVE_VM_FAULT_T, 1, [if vm_fault_t type exists])
2544 # kernel 4.17 commit 3d3539018d2cbd12e5af4a132636ee7fd8d43ef0
2545 # mm: VM_FAULT_RETRY is defined in enum vm_fault_reason
2547 AC_DEFUN([LC_SRC_VM_FAULT_RETRY], [
2548 LB2_LINUX_TEST_SRC([VM_FAULT_RETRY], [
2549 #include <linux/mm.h>
2551 #ifndef VM_FAULT_RETRY
2557 AC_DEFUN([LC_VM_FAULT_RETRY], [
2558 LB2_MSG_LINUX_TEST_RESULT([if VM_FAULT_RETRY is defined],
2560 AC_DEFINE(HAVE_VM_FAULT_RETRY, 1,
2561 [if VM_FAULT_RETRY is defined])
2563 ]) # LC_VM_FAULT_RETRY
2566 # LC_ALLOC_FILE_PSEUDO
2568 # kernel 4.18-rc1 commit d93aa9d82aea80b80f225dbf9c7986df444d8106
2569 # new wrapper: alloc_file_pseudo()
2571 AC_DEFUN([LC_SRC_ALLOC_FILE_PSEUDO], [
2572 LB2_LINUX_TEST_SRC([alloc_file_pseudo], [
2573 #include <linux/file.h>
2576 file = alloc_file_pseudo(NULL, NULL, "[test]",
2580 AC_DEFUN([LC_ALLOC_FILE_PSEUDO], [
2581 LB2_MSG_LINUX_TEST_RESULT([if 'alloc_file_pseudo' is defined],
2582 [alloc_file_pseudo], [
2583 AC_DEFINE(HAVE_ALLOC_FILE_PSEUDO, 1,
2584 ['alloc_file_pseudo' exist])
2586 ]) # LC_ALLOC_FILE_PSEUDO
2589 # LC_INODE_TIMESPEC64
2591 # kernel 4.17-rc7 commit 8efd6894ff089adeeac7cb9f32125b85d963d1bc
2592 # fs: add timespec64_truncate()
2593 # kernel 4.18 commit 95582b00838837fc07e042979320caf917ce3fe6
2594 # inode timestamps switched to timespec64
2595 # kernel 4.19-rc2 commit 976516404ff3fab2a8caa8bd6f5efc1437fed0b8
2596 # y2038: remove unused time interfaces
2600 # When inode times are timespec64 stop using the deprecated
2603 # kernel v5.5-rc1-6-gba70609d5ec6 ba70609d5ec664a8f36ba1c857fcd97a478adf79
2604 # fs: Delete timespec64_trunc()
2606 AC_DEFUN([LC_SRC_INODE_TIMESPEC64], [
2607 LB2_LINUX_TEST_SRC([inode_timespec64], [
2608 #include <linux/fs.h>
2610 struct inode *inode = NULL;
2611 struct timespec64 ts = {0, 1};
2613 inode->i_atime = ts;
2617 AC_DEFUN([LC_INODE_TIMESPEC64], [
2618 LB2_MSG_LINUX_TEST_RESULT([if inode timestamps are struct timespec64],
2619 [inode_timespec64], [
2620 AC_DEFINE(HAVE_INODE_TIMESPEC64, 1,
2621 [inode times are using timespec64])
2623 ]) # LC_INODE_TIMESPEC64
2626 # LC_RADIX_TREE_TAG_SET
2628 # kernel 4.20 commit v4.19-rc5-248-g9b89a0355144
2629 # xarray: Add XArray marks - replaced radix_tree_tag_set
2631 AC_DEFUN([LC_SRC_RADIX_TREE_TAG_SET], [
2632 LB2_LINUX_TEST_SRC([radix_tree_tag_set], [
2633 #include <linux/fs.h>
2634 #include <linux/radix-tree.h>
2636 radix_tree_tag_set(NULL, 0, PAGECACHE_TAG_DIRTY);
2639 AC_DEFUN([LC_RADIX_TREE_TAG_SET], [
2640 LB2_MSG_LINUX_TEST_RESULT([if 'radix_tree_tag_set' exists],
2641 [radix_tree_tag_set], [
2642 AC_DEFINE(HAVE_RADIX_TREE_TAG_SET, 1,
2643 [radix_tree_tag_set exists])
2645 ]) # LC_RADIX_TREE_TAG_SET
2648 # LC_UAPI_LINUX_MOUNT_H
2650 # kernel 4.20 commit e262e32d6bde0f77fb0c95d977482fc872c51996
2651 # vfs: Suppress MS_* flag defs within the kernel ...
2653 AC_DEFUN([LC_SRC_UAPI_LINUX_MOUNT_H], [
2654 LB2_LINUX_TEST_SRC([uapi_linux_mount], [
2655 #include <uapi/linux/mount.h>
2661 AC_DEFUN([LC_UAPI_LINUX_MOUNT_H], [
2662 LB2_MSG_LINUX_TEST_RESULT([if MS_RDONLY was moved to uapi/linux/mount.h],
2663 [uapi_linux_mount], [
2664 AC_DEFINE(HAVE_UAPI_LINUX_MOUNT_H, 1,
2665 [if MS_RDONLY was moved to uapi/linux/mount.h])
2667 ]) # LC_UAPI_LINUX_MOUNT_H
2670 # LC_HAVE_SUNRPC_CACHE_HASH_LOCK_IS_A_SPINLOCK
2672 # kernel 4.20 commit 1863d77f15da0addcd293a1719fa5d3ef8cde3ca
2673 # SUNRPC: Replace the cache_detail->hash_lock with a regular spinlock
2675 # Now that the reader functions are all RCU protected, use a regular
2676 # spinlock rather than a reader/writer lock.
2678 AC_DEFUN([LC_SRC_HAVE_SUNRPC_CACHE_HASH_LOCK_IS_A_SPINLOCK], [
2679 LB2_LINUX_TEST_SRC([hash_lock_isa_spinlock_t], [
2680 #include <linux/sunrpc/cache.h>
2682 spinlock_t *lock = &(((struct cache_detail *)0)->hash_lock);
2686 AC_DEFUN([LC_HAVE_SUNRPC_CACHE_HASH_LOCK_IS_A_SPINLOCK], [
2687 LB2_MSG_LINUX_TEST_RESULT([if cache_detail->hash_lock is a spinlock],
2688 [hash_lock_isa_spinlock_t], [
2689 AC_DEFINE(HAVE_CACHE_HASH_SPINLOCK, 1,
2690 [if cache_detail->hash_lock is a spinlock])
2692 ]) # LC_HAVE_SUNRPC_CACHE_HASH_LOCK_IS_A_SPINLOCK
2695 # LC_GENL_FAMILY_HAS_RESV_START_OP
2697 # Linux v5.0-11693-g3b0f31f2b8c9
2698 # genetlink: make policy common to family
2700 AC_DEFUN([LC_SRC_GENL_FAMILY_HAS_RESV_START_OP], [
2701 LB2_LINUX_TEST_SRC([genl_family_has_resv_start_op], [
2702 #include <net/genetlink.h>
2704 static const struct genl_family family = {
2705 .resv_start_op = 42,
2710 AC_DEFUN([LC_GENL_FAMILY_HAS_RESV_START_OP], [
2711 LB2_MSG_LINUX_TEST_RESULT([if struct genl_family has resv_start_op member],
2712 [genl_family_has_resv_start_op], [
2713 AC_DEFINE(GENL_FAMILY_HAS_RESV_START_OP, 1,
2714 [struct genl_family has resv_start_op member])
2716 ]) # LC_GENL_FAMILY_HAS_RESV_START_OP
2719 # LC_HAVE_BVEC_ITER_ALL
2721 # kernel 5.1 commit 6dc4f100c175dd0511ae8674786e7c9006cdfbfa
2722 # block: allow bio_for_each_segment_all() to iterate over multi-page bvec
2724 AC_DEFUN([LC_SRC_HAVE_BVEC_ITER_ALL], [
2725 LB2_LINUX_TEST_SRC([struct_bvec_iter_all], [
2726 #include <linux/bvec.h>
2728 struct bvec_iter_all iter;
2732 AC_DEFUN([LC_HAVE_BVEC_ITER_ALL], [
2733 LB2_MSG_LINUX_TEST_RESULT([if bvec_iter_all exists for multi-page bvec iternation],
2734 [struct_bvec_iter_all], [
2735 AC_DEFINE(HAVE_BVEC_ITER_ALL, 1,
2736 [if bvec_iter_all exists for multi-page bvec iternation])
2738 ]) # LC_HAVE_BVEC_ITER_ALL
2741 # LC_ACCOUNT_PAGE_DIRTIED
2743 # After 5.2 kernel page dirtied is not exported
2745 AC_DEFUN([LC_ACCOUNT_PAGE_DIRTIED], [
2746 LB_CHECK_EXPORT([account_page_dirtied], [mm/page-writeback.c],
2747 [AC_DEFINE(HAVE_ACCOUNT_PAGE_DIRTIED_EXPORT, 1,
2748 [account_page_dirtied is exported])])
2749 ]) # LC_ACCOUNT_PAGE_DIRTIED
2752 # LC_KEYRING_SEARCH_4ARGS
2754 # Kernel 5.2 commit dcf49dbc8077
2755 # keys: Add a 'recurse' flag for keyring searches
2757 AC_DEFUN([LC_SRC_KEYRING_SEARCH_4ARGS], [
2758 LB2_LINUX_TEST_SRC([keyring_search_4args], [
2759 #include <linux/key.h>
2762 keyring_search(keyring, NULL, NULL, false);
2765 AC_DEFUN([LC_KEYRING_SEARCH_4ARGS], [
2766 LB2_MSG_LINUX_TEST_RESULT([if 'keyring_search' has 4 args],
2767 [keyring_search_4args], [
2768 AC_DEFINE(HAVE_KEYRING_SEARCH_4ARGS, 1,
2769 [keyring_search has 4 args])
2771 ]) # LC_KEYRING_SEARCH_4ARGS
2774 # LC_BIO_BI_PHYS_SEGMENTS
2776 # kernel 5.3-rc1 commit 14ccb66b3f585b2bc21e7256c96090abed5a512c
2777 # block: remove the bi_phys_segments field in struct bio
2779 AC_DEFUN([LC_SRC_BIO_BI_PHYS_SEGMENTS], [
2780 LB2_LINUX_TEST_SRC([bye_bio_bi_phys_segments], [
2781 #include <linux/bio.h>
2783 struct bio *bio = NULL;
2784 bio->bi_phys_segments++;
2787 AC_DEFUN([LC_BIO_BI_PHYS_SEGMENTS], [
2788 LB2_MSG_LINUX_TEST_RESULT([if struct bio has bi_phys_segments member],
2789 [bye_bio_bi_phys_segments], [
2790 AC_DEFINE(HAVE_BIO_BI_PHYS_SEGMENTS, 1,
2791 [struct bio has bi_phys_segments member])
2793 ]) # LC_BIO_BI_PHYS_SEGMENTS
2796 # LC_HAVE_FLUSH_DELAYED_FPUT
2798 # kernel commit v3.5-rc6-284-g4a9d4b024a31 adds flush_delayed_fput()
2799 # kernel commit v5.3-rc2-13-g7239a40ca8bf exports flush_delayed_fput()
2801 AC_DEFUN([LC_HAVE_FLUSH_DELAYED_FPUT], [
2802 LB_CHECK_EXPORT([flush_delayed_fput], [fs/file_table.c],
2803 [AC_DEFINE(HAVE_FLUSH_DELAYED_FPUT, 1,
2804 [flush_delayed_fput() is exported by the kernel])])
2805 ]) # LC_FLUSH_DELAYED_FPUT
2808 # LC_LM_COMPARE_OWNER_EXISTS
2810 # kernel 5.3-rc3 commit f85d93385e9fe6886a751f647f6812a89bf6bee3
2811 # locks: Cleanup lm_compare_owner and lm_owner_key
2812 # removed lm_compare_owner
2814 AC_DEFUN([LC_SRC_LM_COMPARE_OWNER_EXISTS], [
2815 LB2_LINUX_TEST_SRC([lock_manager_ops_lm_compare_owner], [
2816 #include <linux/fs.h>
2818 struct lock_manager_operations lm_ops;
2819 lm_ops.lm_compare_owner = NULL;
2822 AC_DEFUN([LC_LM_COMPARE_OWNER_EXISTS], [
2823 LB2_MSG_LINUX_TEST_RESULT([if lock_manager_operations has lm_compare_owner],
2824 [lock_manager_ops_lm_compare_owner], [
2825 AC_DEFINE(HAVE_LM_COMPARE_OWNER, 1,
2826 [lock_manager_operations has lm_compare_owner])
2828 ]) # LC_LM_COMPARE_OWNER_EXISTS
2831 # LC_FSCRYPT_SUPPORT
2833 # 5.4 introduced fscrypt encryption policies v2
2835 AC_DEFUN([LC_FSCRYPT_SUPPORT], [
2836 LB_CHECK_COMPILE([for fscrypt in-kernel support],
2838 #define __FS_HAS_ENCRYPTION 0
2839 #include <linux/fscrypt.h>
2841 fscrypt_ioctl_get_policy_ex(NULL, NULL);
2843 has_fscrypt_support="yes"
2845 ]) # LC_FSCRYPT_SUPPORT used by LC_CONFIG_CRYPTO
2848 # LC_FSCRYPT_DIGESTED_NAME
2850 # Kernel 5.5-rc4 edc440e3d27fb31e6f9663cf413fad97d714c060
2851 # improved the format of no-key names. This results in the
2852 # removal of FSCRYPT_FNAME_DIGEST and FSCRYPT_FNAME_DIGEST_SIZE.
2854 AC_DEFUN([LC_SRC_FSCRYPT_DIGESTED_NAME], [
2855 LB2_LINUX_TEST_SRC([fscrypt_digested_name], [
2856 #include <linux/fscrypt.h>
2858 struct fscrypt_digested_name fname;
2863 AC_DEFUN([LC_FSCRYPT_DIGESTED_NAME], [
2864 LB2_MSG_LINUX_TEST_RESULT([if fscrypt has 'struct fscrypt_digested_name'],
2865 [fscrypt_digested_name], [
2866 AC_DEFINE(HAVE_FSCRYPT_DIGESTED_NAME, 1,
2867 ['struct fscrypt_digested_name' exists])
2869 ]) # LC_FSCRYPT_DIGESTED_NAME
2872 # LC_FSCRYPT_DUMMY_CONTEXT_ENABLED
2874 # Kernel 5.7-rc7 ed318a6cc0b620440e65f48eb527dc3df7269ce4
2875 # replaces fscrypt_dummy_context_enabled() with
2876 # fscrypt_get_dummy_context(). Later kernels rename
2877 # fscrypt_get_dummy_context() to fscrypt_get_dummy_policy()
2878 # which is why we test fscrypt_dummy_context_enabled().
2880 AC_DEFUN([LC_SRC_FSCRYPT_DUMMY_CONTEXT_ENABLED], [
2881 LB2_LINUX_TEST_SRC([fscrypt_dummy_context_enabled], [
2882 #include <linux/fscrypt.h>
2884 fscrypt_dummy_context_enabled(NULL);
2887 AC_DEFUN([LC_FSCRYPT_DUMMY_CONTEXT_ENABLED], [
2888 LB2_MSG_LINUX_TEST_RESULT([if fscrypt_dummy_context_enabled() exists],
2889 [fscrypt_dummy_context_enabled], [
2890 AC_DEFINE(HAVE_FSCRYPT_DUMMY_CONTEXT_ENABLED, 1,
2891 [fscrypt_dummy_context_enabled() exists])
2893 ]) # LC_FSCRYPT_DUMMY_CONTEXT_ENABLED
2896 # LC_HAVE_KTHREAD_USE_MM
2898 # kernel 5.8 commit f5678e7f2ac31c270334b936352f0ef2fe7dd2b3
2899 # kernel: better document the use_mm/unuse_mm API contract
2901 AC_DEFUN([LC_SRC_HAVE_KTHREAD_USE_MM], [
2902 LB2_LINUX_TEST_SRC([kthread_use_mm], [
2903 #include <linux/kthread.h>
2905 kthread_use_mm(NULL);
2908 AC_DEFUN([LC_HAVE_KTHREAD_USE_MM], [
2909 LB2_MSG_LINUX_TEST_RESULT([if have kthread_use_mm], [kthread_use_mm], [
2910 AC_DEFINE(HAVE_KTHREAD_USE_MM, 1, ['kthread_use_mm' exists])
2912 ]) # LC_HAVE_KTHREAD_USE_MM
2915 # LC_FSCRYPT_FNAME_ALLOC_BUFFER
2917 # Kernel 5.9-rc4 8b10fe68985278de4926daa56ad6af701839e40a
2918 # removed the inode parameter for the fscrypt function
2919 # fscrypt_fname_alloc_buffer()
2921 AC_DEFUN([LC_SRC_FSCRYPT_FNAME_ALLOC_BUFFER], [
2922 LB2_LINUX_TEST_SRC([fscrypt_fname_alloc_buffer], [
2923 #include <linux/fscrypt.h>
2925 fscrypt_fname_alloc_buffer(0, NULL);
2928 AC_DEFUN([LC_FSCRYPT_FNAME_ALLOC_BUFFER], [
2929 LB2_MSG_LINUX_TEST_RESULT([if fscrypt_fname_alloc_buffer() removed inode parameter],
2930 [fscrypt_fname_alloc_buffer], [
2931 AC_DEFINE(HAVE_FSCRYPT_FNAME_ALLOC_BUFFER_NO_INODE, 1,
2932 [fscrypt_fname_alloc_buffer() does not have inode parameter])
2934 ]) # LC_FSCRYPT_FNAME_ALLOC_BUFFER
2937 # LC_FSCRYPT_SET_CONTEXT
2939 # Kernel 5.9-rc4 a992b20cd4ee360dbbe6f69339cb07146e4304d6
2940 # fscrypt_get_encryption_info() is not GFP_NOFS safe which
2941 # is used by fscrypt_inherit_context. Replace fscrypt_inherit_context,
2942 # with two new functions, fscrypt_prepare_new_inode() and
2943 # fscrypt_set_context()
2945 AC_DEFUN([LC_SRC_FSCRYPT_SET_CONTEXT], [
2946 LB2_LINUX_TEST_SRC([fscrypt_set_context], [
2947 #include <linux/fscrypt.h>
2949 fscrypt_set_context(NULL, NULL);
2950 fscrypt_prepare_new_inode(NULL, NULL, NULL);
2953 AC_DEFUN([LC_FSCRYPT_SET_CONTEXT], [
2954 LB2_MSG_LINUX_TEST_RESULT([if 'fscrypt_set_context()' exists],
2955 [fscrypt_set_context], [
2956 AC_DEFINE(HAVE_FSCRYPT_SET_CONTEXT, 1,
2957 [fscrypt_set_context() does exist])
2959 ]) # LC_FSCRYPT_SET_CONTEXT
2962 # LC_FSCRYPT_D_REVALIDATE
2964 # kernel 5.9-rc4 5b2a828b98ec1872799b1b4d82113c76a12d594f
2965 # exported fscrypt_d_revalidate()
2967 AC_DEFUN([LC_FSCRYPT_D_REVALIDATE], [
2968 LB_CHECK_EXPORT([fscrypt_d_revalidate], [fs/crypto/fname.c],
2969 [AC_DEFINE(HAVE_FSCRYPT_D_REVALIDATE, 1,
2970 [fscrypt_d_revalidate() is exported by the kernel])])
2971 ]) # LC_FSCRYPT_D_REVALIDATE
2974 # LC_FSCRYPT_NOKEY_NAME
2976 # kernel 5.9-rc4 70fb2612aab62d47e03f82eaa7384a8d30ca175d
2977 # renamed is_ciphertext_name to is_nokey_name
2979 AC_DEFUN([LC_SRC_FSCRYPT_NOKEY_NAME], [
2980 LB2_LINUX_TEST_SRC([fname_is_nokey_name], [
2981 #include <linux/fscrypt.h>
2983 struct fscrypt_name fname;
2985 fname.is_nokey_name = true;
2988 AC_DEFUN([LC_FSCRYPT_NOKEY_NAME], [
2989 LB2_MSG_LINUX_TEST_RESULT([if struct fscrypt_name has is_nokey_name field],
2990 [fname_is_nokey_name], [
2991 AC_DEFINE(HAVE_FSCRYPT_NOKEY_NAME, 1,
2992 [struct fscrypt_name has is_nokey_name field])
2994 ]) # LC_FSCRYPT_NOKEY_NAME
2997 # LC_FSCRYPT_SET_TEST_DUMMY_ENC_CHAR_ARG
2998 # Kernel 5.9-rc4 c8c868abc91ff23f6f5c4444c419de7c277d77e1
2999 # changed fscrypt_set_test_dummy_encryption() take a 'const char *
3001 AC_DEFUN([LC_SRC_FSCRYPT_SET_TEST_DUMMY_ENC_CHAR_ARG], [
3002 LB2_LINUX_TEST_SRC([fscrypt_set_test_dummy_encryption], [
3003 #include <linux/fscrypt.h>
3006 fscrypt_set_test_dummy_encryption(NULL, arg, NULL);
3009 AC_DEFUN([LC_FSCRYPT_SET_TEST_DUMMY_ENC_CHAR_ARG], [
3010 LB2_MSG_LINUX_TEST_RESULT([if fscrypt_set_test_dummy_encryption() take 'const char' parameter],
3011 [fscrypt_set_test_dummy_encryption], [
3012 AC_DEFINE(HAVE_FSCRYPT_SET_TEST_DUMMY_ENC_CHAR_ARG, 1,
3013 [fscrypt_set_test_dummy_encryption() take 'const char' parameter])
3015 ]) # LC_FSCRYPT_SET_TEST_DUMMY_ENC_CHAR_ARG
3018 # LC_FSCRYPT_DUMMY_POLICY
3020 # Kernel 5.9-rc4 ac4acb1f4b2b6b7e8d913537cccec8789903e164
3021 # move the test dummy context for fscrypt_policy which is
3022 # also used by the user land interface.
3024 AC_DEFUN([LC_SRC_FSCRYPT_DUMMY_POLICY], [
3025 LB2_LINUX_TEST_SRC([fscrypt_free_dummy_policy], [
3026 #include <linux/fscrypt.h>
3028 fscrypt_free_dummy_policy(NULL);
3031 AC_DEFUN([LC_FSCRYPT_DUMMY_POLICY], [
3032 LB2_MSG_LINUX_TEST_RESULT([if fscrypt_free_dummy_policy() exists],
3033 [fscrypt_free_dummy_policy], [
3034 AC_DEFINE(HAVE_FSCRYPT_DUMMY_POLICY, 1,
3035 [fscrypt_free_dummy_policy() exists])
3037 ]) # LC_FSCRYPT_DUMMY_POLICY
3040 # LC_HAVE_ITER_FILE_SPLICE_WRITE
3042 # Linux commit v5.9-rc1-6-g36e2c7421f02
3043 # fs: don't allow splice read/write without explicit ops
3045 AC_DEFUN([LC_SRC_HAVE_ITER_FILE_SPLICE_WRITE], [
3046 LB2_LINUX_TEST_SRC([iter_file_splice_write], [
3047 #include <linux/fs.h>
3049 (void)iter_file_splice_write(NULL, NULL, NULL, 1, 0);
3052 AC_DEFUN([LC_HAVE_ITER_FILE_SPLICE_WRITE], [
3053 LB2_MSG_LINUX_TEST_RESULT([if iter_file_splice_write() exists],
3054 [iter_file_splice_write], [
3055 AC_DEFINE(HAVE_ITER_FILE_SPLICE_WRITE, 1,
3056 ['iter_file_splice_write' exists])
3058 ]) # LC_HAVE_ITER_FILE_SPLICE_WRITE
3061 # LC_HAVE_BDI_DEBUG_STATS
3063 # Linux kernel v5.10 commit 2d146b924ec3c0873f06308d149684dc1105d9a3
3064 # backing-dev: no need to check return value of debugfs_create functions
3065 # backing_dev_info.debug_stats was remove.
3067 AC_DEFUN([LC_SRC_HAVE_BDI_DEBUG_STATS], [
3068 LB2_LINUX_TEST_SRC([bdi_has_debug_stats], [
3069 #include <linux/backing-dev-defs.h>
3071 struct backing_dev_info info;
3073 info.debug_stats = NULL;
3076 AC_DEFUN([LC_HAVE_BDI_DEBUG_STATS], [
3077 LB2_MSG_LINUX_TEST_RESULT(
3078 [if 'struct backing_dev_info' has 'debug_stats' field],
3079 [bdi_has_debug_stats], [
3080 AC_DEFINE(HAVE_BDI_DEBUG_STATS, 1,
3081 [backing_dev_info has debug_stats])
3083 ]) # LC_HAVE_BDI_DEBUG_STATS
3086 # LC_FSCRYPT_IS_NOKEY_NAME
3088 # Kernel 5.10-rc4 159e1de201b6fca10bfec50405a3b53a561096a8
3089 # introduced fscrypt_is_nokey_name() inline macro. While
3090 # introduced for 5.10 kernels it was backported to earlier
3091 # Ubuntu kernels. Also it hides the change introduced due
3092 # to git commit 501e43fbe for kernel 5.9 which also was
3093 # backported to earlier Ubuntu kernels.
3095 AC_DEFUN([LC_SRC_FSCRYPT_IS_NOKEY_NAME], [
3096 LB2_LINUX_TEST_SRC([fscrypt_is_no_key_name], [
3097 #include <linux/fscrypt.h>
3099 fscrypt_is_nokey_name(NULL);
3102 AC_DEFUN([LC_FSCRYPT_IS_NOKEY_NAME], [
3103 LB2_MSG_LINUX_TEST_RESULT([if fscrypt_is_no_key_name() exists],
3104 [fscrypt_is_no_key_name], [
3105 AC_DEFINE(HAVE_FSCRYPT_IS_NOKEY_NAME, 1,
3106 [fscrypt_is_nokey_name() exists])
3108 ]) # LC_FSCRYPT_IS_NOKEY_NAME
3111 # LC_FSCRYPT_PREPARE_READDIR
3113 # Kernel 5.10-rc4 ec0caa974cd092549ab282deb8ec7ea73b36eba0
3114 # replaced fscrypt_get_encryption_info() with
3115 # fscrypt_prepare_readdir()
3117 AC_DEFUN([LC_SRC_FSCRYPT_PREPARE_READDIR], [
3118 LB2_LINUX_TEST_SRC([fscrypt_prepare_readdir], [
3119 #include <linux/fscrypt.h>
3121 fscrypt_prepare_readdir(NULL);
3124 AC_DEFUN([LC_FSCRYPT_PREPARE_READDIR], [
3125 LB2_MSG_LINUX_TEST_RESULT([if fscrypt_prepare_readdir() exists],
3126 [fscrypt_prepare_readdir], [
3127 AC_DEFINE(HAVE_FSCRYPT_PREPARE_READDIR, 1,
3128 [fscrypt_prepare_readdir() exists])
3130 ]) # LC_FSCRYPT_PREPARE_READDIR
3135 # Linux: v5.11-rc5-9-g309dca309fc3
3136 # block: store a block_device pointer in struct bio
3137 # created bio_set_dev macro
3138 # Linux: v5.15-rc6-127-gcf6d6238cdd3
3139 # block: turn macro helpers into inline functions
3140 # created inline function(s).
3142 # Only provide a bio_set_dev it is is not proveded by the kernel
3144 AC_DEFUN([LC_SRC_BIO_SET_DEV], [
3145 LB2_LINUX_TEST_SRC([bio_set_dev], [
3146 #include <linux/bio.h>
3148 struct bio *bio = NULL;
3149 struct block_device *bdev = NULL;
3151 bio_set_dev(bio, bdev);
3154 AC_DEFUN([LC_BIO_SET_DEV], [
3155 LB2_MSG_LINUX_TEST_RESULT([if 'bio_set_dev' is available],
3157 AC_DEFINE(HAVE_BIO_SET_DEV, 1, ['bio_set_dev' is available])
3162 # LC_HAVE_USER_NAMESPACE_ARG
3164 # kernel 5.12 commit 549c7297717c32ee53f156cd949e055e601f67bb
3165 # fs: make helpers idmap mount aware
3166 # Extend some inode methods with an additional user namespace argument.
3168 AC_DEFUN([LC_SRC_HAVE_USER_NAMESPACE_ARG], [
3169 LB2_LINUX_TEST_SRC([inode_ops_has_user_namespace_argument], [
3170 #include <linux/fs.h>
3172 struct inode_operations *iops = NULL;
3173 struct user_namespace *user_ns = NULL;
3175 iops->getattr(user_ns, NULL, NULL, 0, 0);
3178 AC_DEFUN([LC_HAVE_USER_NAMESPACE_ARG], [
3179 LB2_MSG_LINUX_TEST_RESULT([if 'inode_operations' members have user namespace argument],
3180 [inode_ops_has_user_namespace_argument], [
3181 AC_DEFINE(HAVE_USER_NAMESPACE_ARG, 1,
3182 ['inode_operations' members have user namespace argument])
3184 ]) # LC_HAVE_USER_NAMESPACE_ARG
3187 # LC_HAVE_FILEATTR_GET
3189 # kernel 5.13 4c5b479975212065ef39786e115fde42847e95a9
3190 # vfs: add fileattr ops
3191 # Add inode operations to replace FS_IOC_[SG]ETFLAGS ioctl
3192 # The type signature of ->fileattr_set is not stable for the
3193 # first few iterations, so don't commit to a particular signature
3194 # here. Hopefully we will only want to support the final version.
3196 AC_DEFUN([LC_SRC_HAVE_FILEATTR_GET], [
3197 LB2_LINUX_TEST_SRC([fileattr_set], [
3198 #include <linux/fs.h>
3200 struct inode_operations *iops = NULL;
3201 iops->fileattr_get(NULL, NULL);
3204 AC_DEFUN([LC_HAVE_FILEATTR_GET], [
3205 LB2_MSG_LINUX_TEST_RESULT(
3206 [if 'inode_operations' has fileattr_get (and fileattr_set)],
3208 AC_DEFINE(HAVE_FILEATTR_GET, 1,
3209 ['inode_operations' has fileattr_get and fileattr_set])
3212 ]) # LC_HAVE_FILEATTR_GET
3214 # LC_HAVE_COPY_PAGE_FROM_ITER_ATOMIC
3216 # Kernel 5.13 commit f0b65f39ac505e8f1dcdaa165aa7b8c0bd6fd454
3217 # iov_iter: replace iov_iter_copy_from_user_atomic() with iterator-advancing variant
3219 AC_DEFUN([LC_SRC_HAVE_COPY_PAGE_FROM_ITER_ATOMIC], [
3220 LB2_LINUX_TEST_SRC([copy_page_from_iter_atomic], [
3221 #include <linux/uio.h>
3223 copy_page_from_iter_atomic(NULL, 0, 0, NULL);
3226 AC_DEFUN([LC_HAVE_COPY_PAGE_FROM_ITER_ATOMIC], [
3227 LB2_MSG_LINUX_TEST_RESULT([if have copy_page_from_iter_atomic],
3228 [copy_page_from_iter_atomic], [
3229 AC_DEFINE(HAVE_COPY_PAGE_FROM_ITER_ATOMIC, 1,
3230 ['copy_page_from_iter_atomic' exists])
3232 ]) # LC_HAVE_COPY_PAGE_FROM_ITER_ATOMIC
3235 # LC_HAVE_GET_ACL_RCU_ARG
3237 # kernel 5.15 commit 0cad6246621b5887d5b33fea84219d2a71f2f99a
3238 # vfs: add rcu argument to ->get_acl() callback
3239 # Add a rcu argument to the ->get_acl() callback to allow
3240 # get_cached_acl_rcu() to call the ->get_acl() method.
3242 AC_DEFUN([LC_SRC_HAVE_GET_ACL_RCU_ARG], [
3243 LB2_LINUX_TEST_SRC([get_acl_rcu_argument], [
3244 #include <linux/fs.h>
3246 ((struct inode_operations *)1)->get_acl((struct inode *)NULL, 0, false);
3249 AC_DEFUN([LC_HAVE_GET_ACL_RCU_ARG], [
3250 LB2_MSG_LINUX_TEST_RESULT([if 'get_acl' has a rcu argument],
3251 [get_acl_rcu_argument], [
3252 AC_DEFINE(HAVE_GET_ACL_RCU_ARG, 1,
3253 ['get_acl' has a rcu argument])
3255 ]) # LC_HAVE_GET_ACL_RCU_ARG
3257 # LC_HAVE_FAULT_IN_IOV_ITER_READABLE
3259 # Kernel 5.15 commit a6294593e8a1290091d0b078d5d33da5e0cd3dfe
3260 # iov_iter: Turn iov_iter_fault_in_readable into fault_in_iov_iter_readable
3262 AC_DEFUN([LC_SRC_HAVE_FAULT_IN_IOV_ITER_READABLE], [
3263 LB2_LINUX_TEST_SRC([fault_in_iov_iter_readable], [
3264 #include <linux/uio.h>
3266 fault_in_iov_iter_readable(NULL, 0);
3269 AC_DEFUN([LC_HAVE_FAULT_IN_IOV_ITER_READABLE], [
3270 LB2_MSG_LINUX_TEST_RESULT([if have fault_in_iov_iter_readable],
3271 [fault_in_iov_iter_readable], [
3272 AC_DEFINE(HAVE_FAULT_IN_IOV_ITER_READABLE, 1,
3273 ['fault_in_iov_iter_readable' exists])
3275 ]) # LC_HAVE_FAULT_IN_IOV_ITER_READABLE
3278 # LC_HAVE_INVALIDATE_LOCK
3280 # Kernel version v5.15-rc1 commit 730633f0b7f951726e87f912a6323641f674ae34
3281 # mm: Protect operations adding pages to page cache with invalidate_lock
3283 AC_DEFUN([LC_HAVE_INVALIDATE_LOCK], [
3284 tmp_flags="$EXTRA_KCFLAGS"
3285 EXTRA_KCFLAGS="-Werror"
3286 LB_CHECK_COMPILE([if have address_space have invalidate_lock member],
3287 address_space_invalidate_lock, [
3288 #include <linux/fs.h>
3290 struct address_space *mapping = NULL;
3292 filemap_invalidate_lock(mapping);
3294 AC_DEFINE(HAVE_INVALIDATE_LOCK, 1,
3295 [address_space invalidate_lock member exists])
3297 EXTRA_KCFLAGS="$tmp_flags"
3298 ]) # LC_HAVE_INVALIDATE_LOCK
3301 # LC_HAVE_SECURITY_DENTRY_INIT_WITH_XATTR_NAME_ARG
3303 # Linux v5.15-rc1-20-g15bf32398ad4
3304 # security: Return xattr name from security_dentry_init_security()
3306 AC_DEFUN([LC_SRC_HAVE_SECURITY_DENTRY_INIT_WITH_XATTR_NAME_ARG], [
3307 LB2_LINUX_TEST_SRC([security_dentry_init_security_xattr_name_arg], [
3308 #include <linux/security.h>
3310 struct dentry *dentry = NULL;
3312 const struct qstr *name = NULL;
3313 const char *xattr_name = NULL;
3316 int rc = security_dentry_init_security(dentry, mode, name, &xattr_name,
3322 AC_DEFUN([LC_HAVE_SECURITY_DENTRY_INIT_WITH_XATTR_NAME_ARG], [
3323 LB2_MSG_LINUX_TEST_RESULT([if security_dentry_init_security() returns xattr name],
3324 [security_dentry_init_security_xattr_name_arg], [
3325 AC_DEFINE(HAVE_SECURITY_DENTRY_INIT_WITH_XATTR_NAME_ARG, 1,
3326 [security_dentry_init_security() returns xattr name])
3328 ]) # LC_HAVE_SECURITY_DENTRY_INIT_WITH_XATTR_NAME_ARG
3331 # LC_HAVE_KIOCB_COMPLETE_2ARGS
3333 # kernel v5.15-rc6-145-g6b19b766e8f0
3334 # fs: get rid of the res2 iocb->ki_complete argument
3336 AC_DEFUN([LC_SRC_HAVE_KIOCB_COMPLETE_2ARGS], [
3337 LB2_LINUX_TEST_SRC([kiocb_ki_complete_2args], [
3338 #include <linux/fs.h>
3340 static void complete_fn(struct kiocb *iocb, long ret)
3346 struct kiocb *kio = NULL;
3348 kio->ki_complete = complete_fn;
3351 AC_DEFUN([LC_HAVE_KIOCB_COMPLETE_2ARGS], [
3352 LB2_MSG_LINUX_TEST_RESULT([if kiocb->ki_complete() has 2 arguments],
3353 [kiocb_ki_complete_2args], [
3354 AC_DEFINE(HAVE_KIOCB_COMPLETE_2ARGS, 1,
3355 [kiocb->ki_complete() has 2 arguments])
3357 ]) # LC_HAVE_KIOCB_COMPLETE_2ARGS
3360 # LC_EXPORTS_DELETE_FROM_PAGE_CACHE
3362 # Linux commit v5.16-rc4-44-g452e9e6992fe
3363 # filemap: Add filemap_remove_folio and __filemap_remove_folio
3365 # Also removes the export of delete_from_page_cache
3367 AC_DEFUN([LC_EXPORTS_DELETE_FROM_PAGE_CACHE], [
3368 LB_CHECK_EXPORT([delete_from_page_cache], [mm/filemap.c],
3369 [AC_DEFINE(HAVE_DELETE_FROM_PAGE_CACHE, 1,
3370 [delete_from_page_cache is exported])])
3371 ]) # LC_EXPORTS_DELETE_FROM_PAGE_CACHE
3375 # LC_HAVE_WB_STAT_MOD
3377 # Kernel 5.16-rc1 bd3488e7b4d61780eb3dfaca1cc6f4026bcffd48
3378 # mm/writeback: Rename __add_wb_stat() to wb_stat_mod()
3380 AC_DEFUN([LC_HAVE_WB_STAT_MOD], [
3381 tmp_flags="$EXTRA_KCFLAGS"
3382 EXTRA_KCFLAGS="-Werror"
3383 LB_CHECK_COMPILE([if wb_stat_mod() exists],
3385 #include <linux/backing-dev.h>
3387 wb_stat_mod(NULL, WB_WRITEBACK, 1);
3389 AC_DEFINE(HAVE_WB_STAT_MOD, 1,
3390 [wb_stat_mod() exists])
3392 EXTRA_KCFLAGS="$tmp_flags"
3393 ]) # LC_HAVE_WB_STAT_MOD
3396 # LC_HAVE_INVALIDATE_FOLIO
3398 # linux commit v5.17-rc4-10-g128d1f8241d6
3399 # fs: Add invalidate_folio() aops method
3401 AC_DEFUN([LC_SRC_HAVE_INVALIDATE_FOLIO], [
3402 LB2_LINUX_TEST_SRC([address_spaace_operaions_invalidate_folio], [
3403 #include <linux/fs.h>
3405 struct address_space_operations *aops = NULL;
3406 struct folio *folio = NULL;
3407 aops->invalidate_folio(folio, 0, PAGE_SIZE);
3411 AC_DEFUN([LC_HAVE_INVALIDATE_FOLIO], [
3412 LB2_MSG_LINUX_TEST_RESULT([if have address_spaace_operaions->invalidate_folio() member],
3413 [address_spaace_operaions_invalidate_folio], [
3414 AC_DEFINE(HAVE_INVALIDATE_FOLIO, 1,
3415 [address_spaace_operaions->invalidate_folio() member exists])
3417 ]) # LC_HAVE_INVALIDATE_FOLIO
3420 # LC_HAVE_DIRTY_FOLIO
3422 # linux commit v5.17-rc4-38-g6f31a5a261db
3423 # fs: Add aops->dirty_folio
3424 # ... replaces ->set_page_dirty() with ->dirty_folio()
3426 AC_DEFUN([LC_SRC_HAVE_DIRTY_FOLIO], [
3427 LB2_LINUX_TEST_SRC([address_spaace_operaions_dirty_folio], [
3428 #include <linux/fs.h>
3430 struct address_space_operations *aops = NULL;
3431 struct address_space *mapping = NULL;
3432 struct folio *folio = NULL;
3433 bool dirty = aops->dirty_folio(mapping, folio);
3437 AC_DEFUN([LC_HAVE_DIRTY_FOLIO], [
3438 LB2_MSG_LINUX_TEST_RESULT([if have address_spaace_operaions->dirty_folio() member],
3439 [address_spaace_operaions_dirty_folio], [
3440 AC_DEFINE(HAVE_DIRTY_FOLIO, 1,
3441 [address_spaace_operaions->dirty_folio() member exists])
3443 ]) # LC_HAVE_DIRTY_FOLIO
3446 # LC_HAVE_ALLOC_INODE_SB
3448 # linux commit v5.17-49-g8b9f3ac5b01d
3449 # fs: introduce alloc_inode_sb() to allocate filesystems specific inode
3451 AC_DEFUN([LC_SRC_HAVE_ALLOC_INODE_SB], [
3452 LB2_LINUX_TEST_SRC([alloc_inode_sb], [
3453 #include <linux/fs.h>
3455 struct super_block *sb = NULL;
3456 struct kmem_cache *cache = NULL;
3458 (void)alloc_inode_sb(sb, cache, GFP_NOFS);
3461 AC_DEFUN([LC_HAVE_ALLOC_INODE_SB], [
3462 LB2_MSG_LINUX_TEST_RESULT([if alloc_inode_sb() exists],
3464 AC_DEFINE(HAVE_ALLOC_INODE_SB, 1,
3465 [alloc_inode_sb() exists])
3467 ]) # LC_HAVE_ALLOC_INODE_SB
3470 # LC_GRAB_CACHE_PAGE_WRITE_BEGIN_WITH_FLAGS
3472 # Linux commit v5.18-rc5-221-gb7446e7cf15f
3473 # fs: Remove aop flags parameter from grab_cache_page_write_begin()
3475 AC_DEFUN([LC_SRC_GRAB_CACHE_PAGE_WRITE_BEGIN_WITH_FLAGS], [
3476 LB2_LINUX_TEST_SRC([grab_cache_page_write_begin_with_flags], [
3477 #include <linux/pagemap.h>
3479 struct address_space *mapping = NULL;
3480 (void)grab_cache_page_write_begin(mapping, 0, 1);
3483 AC_DEFUN([LC_GRAB_CACHE_PAGE_WRITE_BEGIN_WITH_FLAGS], [
3484 LB2_MSG_LINUX_TEST_RESULT([if grab_cache_page_write_begin() has flags argument],
3485 [grab_cache_page_write_begin_with_flags], [
3486 AC_DEFINE(HAVE_GRAB_CACHE_PAGE_WRITE_BEGIN_WITH_FLAGS, 1,
3487 [grab_cache_page_write_begin() has flags argument])
3489 ]) # LC_GRAB_CACHE_PAGE_WRITE_BEGIN_WITH_FLAGS
3492 # LC_HAVE_ADDRESS_SPACE_OPERATIONS_READ_FOLIO
3494 # Linux commit v5.18-rc5-241-g5efe7448a142
3495 # fs: Introduce aops->read_folio
3497 AC_DEFUN([LC_SRC_HAVE_ADDRESS_SPACE_OPERATIONS_READ_FOLIO], [
3498 LB2_LINUX_TEST_SRC([address_space_operations_read_folio], [
3499 #include <linux/fs.h>
3501 struct address_space_operations *aops = NULL;
3502 struct file *file = NULL;
3503 struct folio *folio = NULL;
3504 int err = aops->read_folio(file, folio);
3508 AC_DEFUN([LC_HAVE_ADDRESS_SPACE_OPERATIONS_READ_FOLIO], [
3509 LB2_MSG_LINUX_TEST_RESULT([if struct address_space_operations() has read_folio()],
3510 [address_space_operations_read_folio], [
3511 AC_DEFINE(HAVE_AOPS_READ_FOLIO, 1,
3512 [struct address_space_operations() has read_folio()])
3514 ]) # LC_HAVE_ADDRESS_SPACE_OPERATIONS_READ_FOLIO
3517 # LC_HAVE_READ_CACHE_PAGE_FILLER_WITH_FILE
3519 # Linux commit v5.18-rc5-280-ge9b5b23e957e
3520 # fs: Change the type of filler_t
3522 AC_DEFUN([LC_SRC_HAVE_READ_CACHE_PAGE_FILLER_WITH_FILE], [
3523 LB2_LINUX_TEST_SRC([read_cache_page_filler_with_file], [
3524 #include <linux/pagemap.h>
3525 static inline int _filler(struct file *file, struct folio *f)
3530 struct address_space *mapping = NULL;
3531 struct file *file = NULL;
3532 struct page *page = read_cache_page(mapping, 0, _filler, file);
3536 AC_DEFUN([LC_HAVE_READ_CACHE_PAGE_FILLER_WITH_FILE], [
3537 LB2_MSG_LINUX_TEST_RESULT([if read_cache_page() filler_t needs struct file],
3538 [read_cache_page_filler_with_file], [
3539 AC_DEFINE(HAVE_READ_CACHE_PAGE_WANTS_FILE, 1,
3540 [read_cache_page() filler_t needs struct file])
3542 ]) # LC_HAVE_READ_CACHE_PAGE_FILLER_WITH_FILE
3545 # LC_HAVE_ADDRESS_SPACE_OPERATIONS_RELEASE_FOLIO
3547 # Linux commit v5.18-rc5-282-gfa29000b6b26
3548 # fs: Add aops->release_folio
3550 AC_DEFUN([LC_SRC_HAVE_ADDRESS_SPACE_OPERATIONS_RELEASE_FOLIO], [
3551 LB2_LINUX_TEST_SRC([address_space_operations_release_folio], [
3552 #include <linux/fs.h>
3554 struct address_space_operations *aops = NULL;
3555 struct folio *folio = NULL;
3556 int err = aops->release_folio(folio, GFP_KERNEL);
3560 AC_DEFUN([LC_HAVE_ADDRESS_SPACE_OPERATIONS_RELEASE_FOLIO], [
3561 LB2_MSG_LINUX_TEST_RESULT([if struct address_space_operations() has release_folio()],
3562 [address_space_operations_release_folio], [
3563 AC_DEFINE(HAVE_AOPS_RELEASE_FOLIO, 1,
3564 [struct address_space_operations() has release_folio()])
3566 ]) # LC_HAVE_ADDRESS_SPACE_OPERATIONS_RELEASE_FOLIO
3569 # LC_HAVE_LSMCONTEXT_INIT
3571 # repo: git://git.launchpad.net/~ubuntu-kernel/ubuntu/+source/linux/+git/jammy
3572 # kernel linux-hwe-5.19 commit fef1deb99dad87dd700afae76b35c5b5750e33a8
3573 # LSM: Removed scaffolding function lsmcontext_init
3575 AC_DEFUN([LC_SRC_HAVE_LSMCONTEXT_INIT], [
3576 LB2_LINUX_TEST_SRC([lsmcontext_init], [
3577 #include <linux/security.h>
3579 struct lsmcontext ctx = {};
3581 lsmcontext_init(&ctx, "", 0, 0);
3584 AC_DEFUN([LC_HAVE_LSMCONTEXT_INIT], [
3585 LB2_MSG_LINUX_TEST_RESULT([if lsmcontext_init is available],
3586 [lsmcontext_init], [
3587 AC_DEFINE(HAVE_LSMCONTEXT_INIT, 1,
3588 [lsmcontext_init is available])
3590 ]) # LC_HAVE_LSMCONTEXT_INIT
3593 # LC_SECURITY_DENTRY_INIT_SECURTY_WITH_CTX
3595 # repo: git://git.launchpad.net/~ubuntu-kernel/ubuntu/+source/linux/+git/jammy
3596 # kernel linux-hwe-5.19 commit 57d0004bc811254916be30f94c86d9607867deb0
3597 # LSM: Use lsmcontext in security_dentry_init_security
3599 AC_DEFUN([LC_SRC_SECURITY_DENTRY_INIT_SECURTY_WITH_CTX], [
3600 LB2_LINUX_TEST_SRC([security_dentry_init_security_with_ctx], [
3601 #include <linux/security.h>
3603 struct dentry *dentry = NULL;
3604 const struct qstr *name = NULL;
3605 struct lsmcontext *ctx = NULL;
3606 const char *xattr_name = "";
3608 (void)security_dentry_init_security(dentry, 0, name,
3612 AC_DEFUN([LC_SECURITY_DENTRY_INIT_SECURTY_WITH_CTX], [
3613 LB2_MSG_LINUX_TEST_RESULT([if security_dentry_init_security needs lsmcontext],
3614 [security_dentry_init_security_with_ctx], [
3615 AC_DEFINE(HAVE_SECURITY_DENTRY_INIT_SECURTY_WITH_CTX, 1,
3616 [security_dentry_init_security needs lsmcontext])
3618 ]) # LC_SECURITY_DENTRY_INIT_SECURTY_WITH_CTX
3623 # Linux commit v5.19-rc2-6-g868941b14441
3624 # fs: remove no_llseek
3626 AC_DEFUN([LC_SRC_HAVE_NO_LLSEEK], [
3627 LB2_LINUX_TEST_SRC([no_llseek], [
3628 #include <linux/fs.h>
3630 static const struct file_operations fops = {
3631 .llseek = &no_llseek,
3636 AC_DEFUN([LC_HAVE_NO_LLSEEK], [
3637 LB2_MSG_LINUX_TEST_RESULT([if no_llseek() is available],
3639 AC_DEFINE(HAVE_NO_LLSEEK, 1, [no_llseek() is available])
3641 ]) # LC_HAVE_NO_LLSEEK
3644 # LC_DQUOT_TRANSFER_WITH_USER_NS
3646 # Linux commit v5.19-rc3-6-g71e7b535b890
3647 # quota: port quota helpers mount ids
3649 AC_DEFUN([LC_SRC_DQUOT_TRANSFER_WITH_USER_NS], [
3650 LB2_LINUX_TEST_SRC([dquot_transfer], [
3651 #include <linux/quotaops.h>
3653 struct user_namespace *userns = NULL;
3654 struct inode *inode = NULL;
3655 struct iattr *iattr = NULL;
3656 int err __attribute__ ((unused));
3658 err = dquot_transfer(userns, inode, iattr);
3661 AC_DEFUN([LC_DQUOT_TRANSFER_WITH_USER_NS], [
3662 LB2_MSG_LINUX_TEST_RESULT([if dquot_transfer() has user_ns argument],
3664 AC_DEFINE(HAVE_DQUOT_TRANSFER_WITH_USER_NS, 1,
3665 [dquot_transfer() has user_ns argument])
3667 ]) # LC_DQUOT_TRANSFER_WITH_USER_NS
3670 # LC_HAVE_ADDRESS_SPACE_OPERATIONS_MIGRATE_FOLIO
3672 # Linux commit v5.19-rc3-392-g5490da4f06d1
3673 # fs: Add aops->migrate_folio
3675 AC_DEFUN([LC_SRC_HAVE_ADDRESS_SPACE_OPERATIONS_MIGRATE_FOLIO], [
3676 LB2_LINUX_TEST_SRC([address_space_operations_migrate_folio], [
3677 #include <linux/fs.h>
3679 struct address_space_operations *aops = NULL;
3680 struct address_space *m = NULL;
3681 struct folio *src = NULL;
3682 struct folio *dst = NULL;
3683 int err = aops->migrate_folio(m, dst, src, MIGRATE_ASYNC);
3687 AC_DEFUN([LC_HAVE_ADDRESS_SPACE_OPERATIONS_MIGRATE_FOLIO], [
3688 LB2_MSG_LINUX_TEST_RESULT([if struct address_space_operations() has migrate_folio()],
3689 [address_space_operations_migrate_folio], [
3690 AC_DEFINE(HAVE_AOPS_MIGRATE_FOLIO, 1,
3691 [struct address_space_operations() has migrate_folio()])
3693 ]) # LC_HAVE_ADDRESS_SPACE_OPERATIONS_MIGRATE_FOLIO
3696 # LC_REGISTER_SHRINKER_FORMAT_NAMED
3698 # Linux commit v5.19-rc4-52-ge33c267ab70d
3699 # mm: shrinkers: provide shrinkers with names
3701 AC_DEFUN([LC_SRC_REGISTER_SHRINKER_FORMAT_NAMED], [
3702 LB2_LINUX_TEST_SRC([register_shrinker_format], [
3703 #include <linux/mm.h>
3705 if (register_shrinker(NULL, "lustre-%ps", __func__))
3706 unregister_shrinker(NULL);
3709 AC_DEFUN([LC_REGISTER_SHRINKER_FORMAT_NAMED], [
3710 LB2_MSG_LINUX_TEST_RESULT([if register_shrinker() returns status],
3711 [register_shrinker_format], [
3712 AC_DEFINE(HAVE_REGISTER_SHRINKER_FORMAT_NAMED, 1,
3713 [register_shrinker() returns status])
3715 ]) # LC_REGISTER_SHRINKER_FORMAT_NAMED
3718 # LC_HAVE_VFS_SETXATTR_NON_CONST_VALUE
3720 # From Linux commit v5.19-rc5-17-g0c5fd887d2bb
3721 # acl: move idmapped mount fixup into vfs_{g,s}etxattr()
3722 # Until Linux commit v6.0-rc3-6-g6344e66970c6
3723 # xattr: constify value argument in vfs_setxattr()
3725 AC_DEFUN([LC_SRC_HAVE_VFS_SETXATTR_NON_CONST_VALUE], [
3726 LB2_LINUX_TEST_SRC([vfs_setxattr_non_const_value_arg], [
3727 #include <linux/xattr.h>
3729 struct dentry *de = NULL;
3730 const char *name = "an.xattr";
3731 const void *value = NULL;
3732 int err = vfs_setxattr(&init_user_ns, de, name, value, 0, 0);
3735 ]) # LC_HAVE_VFS_SETXATTR_NON_CONST_VALUE
3736 AC_DEFUN([LC_HAVE_VFS_SETXATTR_NON_CONST_VALUE], [
3737 LB2_MSG_LINUX_TEST_RESULT([if vfs_setxattr() value argument is non-const],
3738 [vfs_setxattr_non_const_value_arg], [
3739 AC_DEFINE([VFS_SETXATTR_VALUE(value)],
3741 [vfs_setxattr() value argument is const void *])
3743 AC_DEFINE([VFS_SETXATTR_VALUE(value)],
3744 [((void *)(value))],
3745 [vfs_setxattr() value argument is non-const])
3747 ]) # LC_HAVE_VFS_SETXATTR_NON_CONST_VALUE
3750 # LC_HAVE_IOV_ITER_GET_PAGES_ALLOC2
3752 # Linux commit v5.19-10313-geba2d3d79829
3753 # get rid of non-advancing variants
3755 AC_DEFUN([LC_SRC_HAVE_IOV_ITER_GET_PAGES_ALLOC2], [
3756 LB2_LINUX_TEST_SRC([iov_iter_get_pages_alloc2], [
3757 #include <linux/uio.h>
3759 struct iov_iter *iter = NULL;
3760 struct page ***pages = NULL;
3763 size_t result __attribute__ ((unused));
3764 result = iov_iter_get_pages_alloc2(iter, pages, maxsize, &start);
3767 AC_DEFUN([LC_HAVE_IOV_ITER_GET_PAGES_ALLOC2], [
3768 LB2_MSG_LINUX_TEST_RESULT([if iov_iter_get_pages_alloc2() is available],
3769 [iov_iter_get_pages_alloc2], [
3770 AC_DEFINE(HAVE_IOV_ITER_GET_PAGES_ALLOC2, 1,
3771 [iov_iter_get_pages_alloc2() is available])
3773 ]) # LC_HAVE_IOV_ITER_GET_PAGES_ALLOC2
3776 # LC_HAVE_GET_RANDOM_U32_AND_U64
3778 # Linux commit v4.10-rc3-6-gc440408cf690
3779 # random: convert get_random_int/long into get_random_u32/u64
3780 # Linux commit v6.0-11338-gde492c83cae0
3781 # prandom: remove unused functions
3783 AC_DEFUN([LC_SRC_HAVE_GET_RANDOM_U32_AND_U64], [
3784 LB2_LINUX_TEST_SRC([get_random_u32_and_u64], [
3785 #include <linux/random.h>
3787 u32 rand32 = get_random_u32();
3788 u64 rand64 = get_random_u64();
3793 AC_DEFUN([LC_HAVE_GET_RANDOM_U32_AND_U64], [
3794 LB2_MSG_LINUX_TEST_RESULT([if get_random_u32() and get_random_u64() are available],
3795 [get_random_u32_and_u64], [
3796 AC_DEFINE(HAVE_GET_RANDOM_U32_AND_U64, 1,
3797 [get_random_[u32|u64] are available])
3799 AC_DEFINE([get_random_u32()], [prandom_u32()],
3800 [get_random_u32() is not available, use prandom_u32])
3802 ]) # LC_HAVE_GET_RANDOM_U32_AND_U64
3805 # LC_NFS_FILLDIR_USE_CTX_RETURN_BOOL
3807 # Linux commit v6.0-rc1-2-g25885a35a720
3808 # Change calling conventions for filldir_t
3810 AC_DEFUN([LC_SRC_NFS_FILLDIR_USE_CTX_RETURN_BOOL], [
3811 LB2_LINUX_TEST_SRC([filldir_ctx_return_bool], [
3812 #include <linux/fs.h>
3814 bool filldir(struct dir_context *ctx, const char* name,
3815 int i, loff_t off, u64 tmp, unsigned temp)
3820 struct dir_context ctx = {
3824 ctx.actor(NULL, "test", 0, (loff_t) 0, 0, 0);
3827 AC_DEFUN([LC_NFS_FILLDIR_USE_CTX_RETURN_BOOL], [
3828 LB2_MSG_LINUX_TEST_RESULT([if filldir_t uses struct dir_context and returns bool],
3829 [filldir_ctx_return_bool], [
3830 AC_DEFINE(HAVE_FILLDIR_USE_CTX_RETURN_BOOL, 1,
3831 [filldir_t needs struct dir_context and returns bool])
3832 AC_DEFINE(HAVE_FILLDIR_USE_CTX, 1,
3833 [filldir_t needs struct dir_context as argument])
3834 AC_DEFINE(FILLDIR_TYPE, bool,
3835 [filldir_t return type is bool or int])
3837 AC_DEFINE(FILLDIR_TYPE, int,
3838 [filldir_t return type is bool or int])
3840 ]) # LC_NFS_FILLDIR_USE_CTX_RETURN_BOOL
3843 # LC_HAVE_FILEMAP_GET_FOLIOS_CONTIG
3845 # Linux commit v6.0-rc3-94-g35b471467f88
3846 # filemap: add filemap_get_folios_contig()
3848 AC_DEFUN([LC_SRC_HAVE_FILEMAP_GET_FOLIOS_CONTIG], [
3849 LB2_LINUX_TEST_SRC([filemap_get_folios_contig], [
3850 #include <linux/pagemap.h>
3852 struct address_space *m = NULL;
3854 struct folio_batch *fbatch = NULL;
3855 (void)filemap_get_folios_contig(m, &start, ULONG_MAX, fbatch);
3858 AC_DEFUN([LC_HAVE_FILEMAP_GET_FOLIOS_CONTIG], [
3859 LB2_MSG_LINUX_TEST_RESULT([if filemap_get_folios_contig() is available],
3860 [filemap_get_folios_contig], [
3861 AC_DEFINE(HAVE_FILEMAP_GET_FOLIOS_CONTIG, 1,
3862 [filemap_get_folios_contig() is available])
3864 ]) # LC_HAVE_FILEMAP_GET_FOLIOS_CONTIG
3867 # LC_HAVE_GET_RANDOM_U32_BELOW
3869 # Linux commit v6.1-13825-g3c202d14a9d7
3870 # prandom: remove prandom_u32_max()
3872 AC_DEFUN([LC_SRC_HAVE_GET_RANDOM_U32_BELOW], [
3873 LB2_LINUX_TEST_SRC([get_random_u32_below], [
3874 #include <linux/random.h>
3876 u32 rand32 = get_random_u32_below(99);
3880 AC_DEFUN([LC_HAVE_GET_RANDOM_U32_BELOW], [
3881 LB2_MSG_LINUX_TEST_RESULT([if get_random_u32_below()is available],
3882 [get_random_u32_below], [
3883 AC_DEFINE(HAVE_GET_RANDOM_U32_BELOW, 1,
3884 [get_random_u32_below() is available])
3886 AC_DEFINE([get_random_u32_below(v)], [prandom_u32_max(v)],
3887 [get_random_u32_below() is not available])
3889 ]) # LC_HAVE_GET_RANDOM_U32_BELOW
3892 # LC_HAVE_ACL_WITH_DENTRY
3894 # Linux commit v6.1-rc1-2-g138060ba92b3
3895 # fs: pass dentry to set acl method
3896 # Linux commit v6.1-rc1-4-g7420332a6ff4
3897 # fs: add new get acl method
3899 AC_DEFUN([LC_SRC_HAVE_ACL_WITH_DENTRY], [
3900 LB2_LINUX_TEST_SRC([acl_with_dentry], [
3901 #include <linux/fs.h>
3903 struct dentry *dentry = NULL;
3905 ((struct inode_operations *)1)->get_acl(NULL, dentry, 0);
3909 AC_DEFUN([LC_HAVE_ACL_WITH_DENTRY], [
3910 LB2_MSG_LINUX_TEST_RESULT([if 'get_acl' and 'set_acl' use dentry argument],
3911 [acl_with_dentry], [
3912 AC_DEFINE(HAVE_ACL_WITH_DENTRY, 1,
3913 ['get_acl' and 'set_acl' use dentry argument])
3915 ]) # LC_HAVE_ACL_WITH_DENTRY
3918 # LC_HAVE_U64_CAPABILITY
3920 # linux kernel v6.2-13111-gf122a08b197d
3921 # capability: just use a 'u64' instead of a 'u32[2]' array
3923 AC_DEFUN([LC_SRC_HAVE_U64_CAPABILITY], [
3924 LB2_LINUX_TEST_SRC([kernel_cap_t_has_u64_value], [
3925 #include <linux/cred.h>
3926 #include <linux/capability.h>
3928 kernel_cap_t cap __attribute__ ((unused));
3929 cap.val = 0xffffffffffffffffull;
3932 AC_DEFUN([LC_HAVE_U64_CAPABILITY], [
3933 LB2_MSG_LINUX_TEST_RESULT([if 'kernel_cap_t' has u64 val],
3934 [kernel_cap_t_has_u64_value], [
3935 AC_DEFINE(HAVE_U64_CAPABILITY, 1,
3936 ['kernel_cap_t' has u64 val])
3938 ]) # LC_HAVE_U64_CAPABILITY
3941 # LC_HAVE_MNT_IDMAP_ARG
3943 # linux kernel v6.2-rc1-4-gb74d24f7a74f
3944 # fs: port ->getattr() to pass mnt_idmap
3945 # linux kernel v6.2-rc1-3-gc1632a0f1120
3946 # fs: port ->setattr() to pass mnt_idmap
3948 AC_DEFUN([LC_SRC_HAVE_MNT_IDMAP_ARG], [
3949 LB2_LINUX_TEST_SRC([inode_ops_getattr_has_mnt_idmap_argument], [
3950 #include <linux/mount.h>
3951 #include <linux/fs.h>
3953 ((struct inode_operations *)1)->getattr((struct mnt_idmap *)NULL,
3957 AC_DEFUN([LC_HAVE_MNT_IDMAP_ARG], [
3958 LB2_MSG_LINUX_TEST_RESULT([if 'inode_operations' members have mnt_idmap argument],
3959 [inode_ops_getattr_has_mnt_idmap_argument], [
3960 AC_DEFINE(HAVE_MNT_IDMAP_ARG, 1,
3961 ['inode_operations' members have mnt_idmap argument])
3962 AC_DEFINE(HAVE_USER_NAMESPACE_ARG, 1,
3963 [use mnt_idmap in place of user_namespace argument])
3964 AC_DEFINE(HAVE_DQUOT_TRANSFER_WITH_USER_NS, 1,
3965 [use mnt_idmap with dquot_transfer])
3967 ]) # LC_HAVE_MNT_IDMAP_ARG
3970 # LC_HAVE_LOCKS_LOCK_FILE_WAIT_IN_FILELOCK
3972 # Linux commit v6.2-rc3-9-g5970e15dbcfe
3973 # filelock: move file locking definitions to separate header file
3975 AC_DEFUN([LC_SRC_HAVE_LOCKS_LOCK_FILE_WAIT_IN_FILELOCK], [
3976 LB2_LINUX_TEST_SRC([locks_lock_file_wait_in_filelock], [
3977 #include <linux/filelock.h>
3979 locks_lock_file_wait(NULL, NULL);
3982 AC_DEFUN([LC_HAVE_LOCKS_LOCK_FILE_WAIT_IN_FILELOCK], [
3983 LB2_MSG_LINUX_TEST_RESULT([if 'locks_lock_file_wait' exists in filelock.h],
3984 [locks_lock_file_wait_in_filelock], [
3985 AC_DEFINE(HAVE_LOCKS_LOCK_FILE_WAIT, 1,
3986 [kernel has locks_lock_file_wait in filelock.h])
3987 AC_DEFINE(HAVE_LINUX_FILELOCK_HEADER, 1,
3988 [linux/filelock.h is present])
3990 ]) # LC_HAVE_LOCKS_LOCK_FILE_WAIT_IN_FILELOCK
3993 # LC_HAVE_FOLIO_BATCH_REINIT
3995 # linux kernel v6.2-rc4-254-g811561288397
3996 # mm: pagevec: add folio_batch_reinit()
3998 AC_DEFUN([LC_SRC_HAVE_FOLIO_BATCH_REINIT], [
3999 LB2_LINUX_TEST_SRC([folio_batch_reinit_exists], [
4000 #include <linux/pagevec.h>
4002 struct folio_batch fbatch __attribute__ ((unused));
4004 folio_batch_reinit(&fbatch);
4007 AC_DEFUN([LC_HAVE_FOLIO_BATCH_REINIT], [
4008 LB2_MSG_LINUX_TEST_RESULT([if 'folio_batch_reinit' is available],
4009 [folio_batch_reinit_exists], [
4010 AC_DEFINE(HAVE_FOLIO_BATCH_REINIT, 1,
4011 ['folio_batch_reinit' is available])
4013 ]) # LC_HAVE_FOLIO_BATCH_REINIT
4016 # LC_HAVE_IOV_ITER_IOVEC
4018 # linux kernel v6.3-rc4-32-g6eb203e1a868
4019 # iov_iter: remove iov_iter_iovec()
4021 AC_DEFUN([LC_SRC_HAVE_IOV_ITER_IOVEC], [
4022 LB2_LINUX_TEST_SRC([iov_iter_iovec_exists], [
4023 #include <linux/uio.h>
4025 struct iovec iov __attribute__ ((unused));
4026 struct iov_iter i = { };
4028 iov = iov_iter_iovec(&i);
4031 AC_DEFUN([LC_HAVE_IOV_ITER_IOVEC], [
4032 LB2_MSG_LINUX_TEST_RESULT([if 'iov_iter_iovec' is available],
4033 [iov_iter_iovec_exists], [
4034 AC_DEFINE(HAVE_IOV_ITER_IOVEC, 1,
4035 ['iov_iter_iovec' is available])
4037 ]) # LC_HAVE_IOV_ITER_IOVEC
4040 # LC_HAVE_IOVEC_WITH_IOV_MEMBER
4042 # linux kernel v6.3-rc4-34-g747b1f65d39a
4043 # iov_iter: overlay struct iovec and ubuf/len
4044 # This renames iov_iter member iov to __iov and now __iov == __ubuf_iovec
4045 # And provides the iov_iter() accessor to return __iov or __ubuf_iovec
4047 AC_DEFUN([LC_SRC_HAVE_IOVEC_WITH_IOV_MEMBER], [
4048 LB2_LINUX_TEST_SRC([iov_iter_has___iov_member], [
4049 #include <linux/uio.h>
4051 struct iov_iter iter = { };
4052 size_t len __attribute__ ((unused));
4054 len = iter.__iov->iov_len;
4057 AC_DEFUN([LC_HAVE_IOVEC_WITH_IOV_MEMBER], [
4058 LB2_MSG_LINUX_TEST_RESULT([if 'iov_iter_iovec' is available],
4059 [iov_iter_has___iov_member], [
4060 AC_DEFINE(HAVE___IOV_MEMBER, __iov,
4061 ['struct iov_iter' has '__iov' member])
4062 AC_DEFINE(HAVE_ITER_IOV, 1,
4063 [iter_iov() is available])
4065 AC_DEFINE(iter_iov(iter), (iter)->__iov,
4066 ['iov_iter()' provides iov])
4067 AC_DEFINE(__iov, iov,
4068 ['struct iov_iter' has 'iov' member])
4070 ]) # LC_HAVE_IOVEC_WITH_IOV_MEMBER
4073 # LC_HAVE_CLASS_CREATE_MODULE_ARG
4075 # linux kernel v6.3-rc1-13-g1aaba11da9aa
4076 # driver core: class: remove module * from class_create()
4078 AC_DEFUN([LC_SRC_HAVE_CLASS_CREATE_MODULE_ARG], [
4079 LB2_LINUX_TEST_SRC([class_create_without_module_arg], [
4080 #include <linux/device/class.h>
4082 struct class *class __attribute__ ((unused));
4084 class = class_create("empty");
4089 AC_DEFUN([LC_HAVE_CLASS_CREATE_MODULE_ARG], [
4090 LB2_MSG_LINUX_TEST_RESULT([if 'class_create' does not have module arg],
4091 [class_create_without_module_arg], [
4092 AC_DEFINE([ll_class_create(name)],
4093 [class_create((name))],
4094 ['class_create' does not have module arg])
4096 AC_DEFINE([ll_class_create(name)],
4097 [class_create(THIS_MODULE, (name))],
4098 ['class_create' expects module arg])
4100 ]) # LC_HAVE_CLASS_CREATE_MODULE_ARG
4103 # LC_HAVE_FILEMAP_SPLICE_READ
4105 # linux kernel v6.4-rc2-29-gc6585011bc1d
4106 # splice: Remove generic_file_splice_read()
4108 AC_DEFUN([LC_SRC_HAVE_FILEMAP_SPLICE_READ], [
4109 LB2_LINUX_TEST_SRC([filemap_splice_read], [
4110 #include <linux/fs.h>
4112 struct file *in = NULL;
4114 struct pipe_inode_info *pipe = NULL;
4115 ssize_t count __attribute__ ((unused));
4117 count = filemap_splice_read(in, &pos, pipe, 0, 0);
4120 AC_DEFUN([LC_HAVE_FILEMAP_SPLICE_READ], [
4121 LB2_MSG_LINUX_TEST_RESULT([if 'filemap_splice_read' is available],
4122 [filemap_splice_read], [
4123 AC_DEFINE(HAVE_FILEMAP_SPLICE_READ, 1,
4124 ['filemap_splice_read' is available])
4126 ]) # LC_HAVE_FILEMAP_SPLICE_READ
4129 # LC_HAVE_ENUM_ITER_PIPE
4131 # linux kernel v6.4-rc2-30-g3fc40265ae2b
4132 # iov_iter: Kill ITER_PIPE
4134 AC_DEFUN([LC_SRC_HAVE_ENUM_ITER_PIPE], [
4135 LB2_LINUX_TEST_SRC([enum_iter_type_iter_pipe], [
4136 #include <linux/uio.h>
4138 enum iter_type iter_type = ITER_PIPE;
4143 AC_DEFUN([LC_HAVE_ENUM_ITER_PIPE], [
4144 LB2_MSG_LINUX_TEST_RESULT([if enum iter_type has member 'iter_pipe'],
4145 [enum_iter_type_iter_pipe], [
4146 AC_DEFINE(HAVE_ENUM_ITER_PIPE, 1,
4147 [enum iter_type has member 'iter_pipe'])
4149 ]) # LC_HAVE_ENUM_ITER_PIPE
4152 # LC_HAVE_GET_USER_PAGES_WITHOUT_VMA
4154 # linux kernel v6.4-rc2-30-g3fc40265ae2b
4155 # iov_iter: Kill ITER_PIPE
4157 AC_DEFUN([LC_SRC_HAVE_GET_USER_PAGES_WITHOUT_VMA], [
4158 LB2_LINUX_TEST_SRC([get_user_pages_without_vma], [
4159 #include <linux/mm.h>
4161 struct page *pages __attribute__ ((unused));
4163 (void)get_user_pages(0, 0, 0, &pages);
4166 AC_DEFUN([LC_HAVE_GET_USER_PAGES_WITHOUT_VMA], [
4167 LB2_MSG_LINUX_TEST_RESULT([if get_user_pages removed 'vma' parameter],
4168 [get_user_pages_without_vma], [
4169 AC_DEFINE(HAVE_GET_USER_PAGES_WITHOUT_VMA, 1,
4170 [get_user_pages removed 'vma' parameter])
4172 ]) # LC_HAVE_GET_USER_PAGES_WITHOUT_VMA
4175 # LC_HAVE_FOLIO_BATCH
4177 # linux kernel v5.16-rc4-36-g10331795fb79
4178 # pagevec: Add folio_batch
4180 AC_DEFUN([LC_SRC_HAVE_FOLIO_BATCH], [
4181 LB2_LINUX_TEST_SRC([struct_folio_batch_exists], [
4182 #include <linux/pagevec.h>
4184 struct folio_batch fbatch __attribute__ ((unused));
4186 folio_batch_init(&fbatch);
4189 AC_DEFUN([LC_HAVE_FOLIO_BATCH], [
4190 LB2_MSG_LINUX_TEST_RESULT([if 'struct folio_batch' is available],
4191 [struct_folio_batch_exists], [
4192 AC_DEFINE(HAVE_FOLIO_BATCH, 1,
4193 ['struct folio_batch' is available])
4195 ]) # LC_HAVE_FOLIO_BATCH
4198 # LC_HAVE_STRUCT_PAGEVEC
4200 # linux kernel v6.4-rc4-438-g1e0877d58b1e
4201 # mm: remove struct pagevec
4203 AC_DEFUN([LC_SRC_HAVE_STRUCT_PAGEVEC], [
4204 LB2_LINUX_TEST_SRC([struct_pagevec_exists], [
4205 #include <linux/pagevec.h>
4207 struct pagevec *pvec = NULL;
4211 AC_DEFUN([LC_HAVE_STRUCT_PAGEVEC], [
4212 LB2_MSG_LINUX_TEST_RESULT([if 'struct pagevec' is available],
4213 [struct_pagevec_exists], [
4214 AC_DEFINE(HAVE_PAGEVEC, 1,
4215 ['struct pagevec' is available])
4217 ]) # LC_HAVE_STRUCT_PAGEVEC
4220 # LC_HAVE_FLUSH___WORKQUEUE
4222 # linux kernel v6.5-rc1-7-g20bdedafd2f6
4223 # workqueue: Warn attempt to flush system-wide workqueues.
4225 AC_DEFUN([LC_SRC_HAVE_FLUSH___WORKQUEUE], [
4226 LB2_LINUX_TEST_SRC([flush_scheduled_work_warning], [
4227 #include <linux/workqueue.h>
4229 __flush_workqueue(system_wq);
4232 AC_DEFUN([LC_HAVE_FLUSH___WORKQUEUE], [
4233 LB2_MSG_LINUX_TEST_RESULT([if 'flush_scheduled_work()' throws warning],
4234 [flush_scheduled_work_warning], [
4235 AC_DEFINE(HAVE_FLUSH___WORKQUEUE, 1,
4236 ['__flush_workqueue(system_wq)' is available])
4238 ]) # LC_HAVE_FLUSH___WORKQUEUE
4241 # LC_HAVE_INODE_GET_CTIME
4243 # linux kernel v6.5-rc1-92-g13bc24457850
4244 # fs: rename i_ctime field to __i_ctime
4246 AC_DEFUN([LC_SRC_HAVE_INODE_GET_CTIME], [
4247 LB2_LINUX_TEST_SRC([inode_get_ctime_exists], [
4248 #include <linux/fs.h>
4250 struct inode *inode = NULL;
4251 struct timespec64 ts __attribute__ ((unused));
4253 ts = inode_get_ctime(inode);
4256 AC_DEFUN([LC_HAVE_INODE_GET_CTIME], [
4257 LB2_MSG_LINUX_TEST_RESULT([if 'inode_get_ctime()' exists],
4258 [inode_get_ctime_exists], [
4259 AC_DEFINE(HAVE_INODE_GET_CTIME, 1,
4260 ['inode_get_ctime()' exists])
4262 ]) # LC_HAVE_INODE_GET_CTIME
4265 # LC_HAVE_MMAP_WRITE_TRYLOCK
4267 # linux kernel v6.5-rc4-110-gcf95e337cb63
4268 # mm: delete mmap_write_trylock() and vma_try_start_write()
4270 AC_DEFUN([LC_SRC_HAVE_MMAP_WRITE_TRYLOCK], [
4271 LB2_LINUX_TEST_SRC([mmap_write_trylock_removed], [
4272 #include <linux/mmap_lock.h>
4274 struct mm_struct *mm = NULL;
4276 (void)mmap_write_trylock(mm);
4279 AC_DEFUN([LC_HAVE_MMAP_WRITE_TRYLOCK], [
4280 LB2_MSG_LINUX_TEST_RESULT([if 'mmap_write_trylock()' is available],
4281 [mmap_write_trylock_removed], [
4282 AC_DEFINE(HAVE_MMAP_WRITE_TRYLOCK, 1,
4283 ['mmap_write_trylock()' is available])
4285 ]) # LC_HAVE_MMAP_WRITE_TRYLOCK
4288 # LC_HAVE_GENERIC_FILEATTR_HAS_MASK_ARG
4290 # linux kernel v6.5-rc1-95-g0d72b92883c6
4291 # fs: pass the request_mask to generic_fillattr
4293 AC_DEFUN([LC_SRC_HAVE_GENERIC_FILEATTR_HAS_MASK_ARG], [
4294 LB2_LINUX_TEST_SRC([generic_fillattr_has_request_mask_arg], [
4295 #include <linux/fs.h>
4297 struct inode *inode = NULL;
4298 struct mnt_idmap *map = NULL;
4299 struct kstat *kstat = NULL;
4301 generic_fillattr(map, 0, inode, kstat);
4304 AC_DEFUN([LC_HAVE_GENERIC_FILEATTR_HAS_MASK_ARG], [
4305 LB2_MSG_LINUX_TEST_RESULT([if 'generic_fillattr()' has request_mask argument],
4306 [generic_fillattr_has_request_mask_arg], [
4307 AC_DEFINE(HAVE_GENERIC_FILEATTR_HAS_MASK_ARG, 1,
4308 ['generic_fillattr()' has request_mask argument])
4309 AC_DEFINE([RQMASK_ARG], [0,], [default request_mask argument])
4311 AC_DEFINE([RQMASK_ARG], [], [no request_mask argument needed])
4313 ]) # LC_HAVE_GENERIC_FILEATTR_HAS_MASK_ARG
4316 # LC_HAVE_NSPROXY_COUNT_AS_REFCOUNT
4318 # Linux commit v6.5-rc2-20-g2ddd3cac1fa9
4319 # nsproxy: Convert nsproxy.count to refcount_t
4321 AC_DEFUN([LC_SRC_HAVE_NSPROXY_COUNT_AS_REFCOUNT], [
4322 LB2_LINUX_TEST_SRC([struct_nsproxy_count_refcount_t], [
4323 #include <linux/nsproxy.h>
4325 struct nsproxy *nsproxy = NULL;
4327 refcount_dec(&nsproxy->count);
4330 AC_DEFUN([LC_HAVE_NSPROXY_COUNT_AS_REFCOUNT], [
4331 LB2_MSG_LINUX_TEST_RESULT([if 'struct nsproxy.count' is refcount_t],
4332 [struct_nsproxy_count_refcount_t], [
4333 AC_DEFINE(HAVE_NSPROXY_COUNT_AS_REFCOUNT, 1,
4334 ['struct nsproxy.count' is refcount_t])
4336 ]) # LC_HAVE_NSPROXY_COUNT_AS_REFCOUNT
4339 # LC_HAVE_INODE_GET_MTIME_SEC
4341 # Linux commit v6.6-rc5-1-g077c212f0344
4342 # fs: new accessor methods for atime and mtime
4344 # Linux commit v6.6-rc5-86-g12cd44023651
4345 # fs: rename inode i_atime and i_mtime fields
4347 AC_DEFUN([LC_SRC_HAVE_INODE_GET_MTIME_SEC], [
4348 LB2_LINUX_TEST_SRC([inode_get_mtime_exists], [
4349 #include <linux/fs.h>
4351 struct inode *inode = NULL;
4352 time64_t sec __attribute__ ((unused));
4354 sec = inode_get_mtime_sec(inode);
4357 AC_DEFUN([LC_HAVE_INODE_GET_MTIME_SEC], [
4358 LB2_MSG_LINUX_TEST_RESULT([if 'inode_get_mtime()' exists],
4359 [inode_get_mtime_exists], [
4360 AC_DEFINE(HAVE_INODE_GET_MTIME_SEC, 1,
4361 ['inode_get_mtime()' exists])
4363 ]) # LC_HAVE_INODE_GET_MTIME_SEC
4366 # LC_HAVE_SHRINKER_ALLOC
4368 # Linux commit v6.6-rc4-53-gc42d50aefd17
4369 # mm: shrinker: add infrastructure for dynamically allocating shrinker
4371 AC_DEFUN([LC_SRC_HAVE_SHRINKER_ALLOC], [
4372 LB2_LINUX_TEST_SRC([shrinker_alloc_exists], [
4373 #include <linux/shrinker.h>
4375 struct shrinker *shrink __attribute__ ((unused));
4377 shrink = shrinker_alloc(0, "%s", "whoami");
4380 AC_DEFUN([LC_HAVE_SHRINKER_ALLOC], [
4381 LB2_MSG_LINUX_TEST_RESULT([if 'shrinker_alloc()' exists],
4382 [shrinker_alloc_exists], [
4383 AC_DEFINE(HAVE_SHRINKER_ALLOC, 1,
4384 ['shrinker_alloc()' exists])
4386 ]) # LC_HAVE_SHRINKER_ALLOC
4389 # LC_HAVE_DENTRY_D_CHILDREN
4391 # Linux commit v6.7-rc1-3-gda549bdd15c2
4392 # dentry: switch the lists of children to hlist
4394 AC_DEFUN([LC_SRC_HAVE_DENTRY_D_CHILDREN], [
4395 LB2_LINUX_TEST_SRC([dentry_d_children], [
4396 #include <linux/dcache.h>
4398 struct dentry *dentry = NULL;
4400 return hlist_empty(&dentry->d_children);
4403 AC_DEFUN([LC_HAVE_DENTRY_D_CHILDREN], [
4404 LB2_MSG_LINUX_TEST_RESULT([if sruct dentry has d_children member],
4405 [dentry_d_children], [
4406 AC_DEFINE(HAVE_DENTRY_D_CHILDREN, 1,
4407 [sruct dentry has d_children member])
4409 ]) # LC_HAVE_DENTRY_D_CHILDREN
4412 # LC_HAVE_GENERIC_ERROR_REMOVE_FOLIO
4414 # Linux commit v6.7-rc4-79-gaf7628d6ec19
4415 # fs: convert error_remove_page to error_remove_folio
4417 AC_DEFUN([LC_SRC_HAVE_GENERIC_ERROR_REMOVE_FOLIO], [
4418 LB2_LINUX_TEST_SRC([generic_error_remove_folio], [
4419 #include <linux/mm.h>
4421 struct address_space *mapping = NULL;
4422 struct folio *folio = NULL;
4423 int err = generic_error_remove_folio(mapping, folio);
4428 AC_DEFUN([LC_HAVE_GENERIC_ERROR_REMOVE_FOLIO], [
4429 LB2_MSG_LINUX_TEST_RESULT([if generic_error_remove_folio() exists],
4430 [generic_error_remove_folio], [
4431 AC_DEFINE(HAVE_GENERIC_ERROR_REMOVE_FOLIO, 1,
4432 [generic_error_remove_folio() exists])
4434 ]) # LC_HAVE_GENERIC_ERROR_REMOVE_FOLIO
4439 # Lustre linux kernel checks
4441 AC_DEFUN([LC_PROG_LINUX_SRC], [
4442 AS_IF([test "x$enable_gss" != xno], [
4443 LC_SRC_KEY_TYPE_INSTANTIATE_2ARGS
4444 LB2_SRC_CHECK_CONFIG_IM([CRYPTO_MD5])
4445 LB2_SRC_CHECK_CONFIG_IM([CRYPTO_SHA1])
4446 LB2_SRC_CHECK_CONFIG_IM([CRYPTO_SHA256])
4447 LB2_SRC_CHECK_CONFIG_IM([CRYPTO_SHA512])
4449 AS_IF([test "x$enable_server" != xno], [
4453 LC_SRC_CONFIG_FHANDLE
4454 LC_SRC_POSIX_ACL_CONFIG
4455 LC_SRC_HAVE_PROJECT_QUOTA
4458 LC_SRC_INVALIDATE_RANGE
4459 LC_SRC_HAVE_DIR_CONTEXT
4460 LC_SRC_D_COMPARE_5ARGS
4462 LC_SRC_PID_NS_FOR_CHILDREN
4465 LC_SRC_OLDSIZE_TRUNCATE_PAGECACHE
4466 LC_SRC_PTR_ERR_OR_ZERO_MISSING
4467 LC_SRC_HAVE_DENTRY_D_U_D_ALIAS_LIST
4468 LC_SRC_HAVE_DENTRY_D_U_D_ALIAS_HLIST
4469 LC_SRC_HAVE_DENTRY_D_CHILD
4470 LC_SRC_KIOCB_KI_LEFT
4471 LC_SRC_REGISTER_SHRINKER_RET
4474 LC_SRC_VFS_RENAME_5ARGS
4475 LC_SRC_VFS_UNLINK_3ARGS
4476 LC_SRC_HAVE_D_IS_POSITIVE
4479 LC_SRC_HAVE_BVEC_ITER
4480 LC_SRC_HAVE_TRUNCATE_IPAGES_FINAL
4481 LC_SRC_IOPS_RENAME_WITH_FLAGS
4485 LC_SRC_VFS_RENAME_6ARGS
4488 LC_SRC_DIRECTIO_USE_ITER
4489 LC_SRC_HAVE_IOV_ITER_INIT_DIRECTION
4490 LC_SRC_HAVE_IOV_ITER_TRUNCATE
4491 LC_SRC_HAVE_FILE_OPERATIONS_READ_WRITE_ITER
4492 LC_SRC_PAGECACHE_GET_PAGE
4495 LC_SRC_HAVE_INTERVAL_BLK_INTEGRITY
4496 LC_SRC_KEY_MATCH_DATA
4497 LC_SRC_HAVE_BLK_INTEGRITY_ITER
4500 LC_SRC_NFS_FILLDIR_USE_CTX
4501 LC_SRC_PERCPU_COUNTER_INIT
4504 LC_SRC_KIOCB_HAS_NBYTES
4505 LC_SRC_HAVE_DQUOT_QC_DQBLK
4506 LC_SRC_HAVE_AIO_COMPLETE
4507 LC_SRC_HAVE_IS_ROOT_INODE
4510 LC_SRC_BACKING_DEV_INFO_REMOVAL
4514 LC_SRC_HAVE___BI_CNT
4517 LC_SRC_BIO_ENDIO_USES_ONE_ARG
4518 LC_SRC_SYMLINK_OPS_USE_NAMEIDATA
4519 LC_SRC_ACCOUNT_PAGE_DIRTIED_3ARGS
4520 LC_SRC_HAVE_CRYPTO_ALLOC_SKCIPHER
4523 LC_SRC_HAVE_INTERVAL_EXP_BLK_INTEGRITY
4524 LC_SRC_HAVE_BIP_ITER_BIO_INTEGRITY_PAYLOAD
4525 LC_SRC_HAVE_CACHE_HEAD_HLIST
4526 LC_SRC_HAVE_XATTR_HANDLER_SIMPLIFIED
4529 LC_SRC_HAVE_LOCKS_LOCK_FILE_WAIT
4530 LC_SRC_HAVE_KEY_PAYLOAD_DATA_ARRAY
4531 LC_SRC_HAVE_XATTR_HANDLER_NAME
4532 LC_SRC_BIO_INTEGRITY_PREP_FN_RETURNS_BOOL
4534 LC_SRC_HAVE_SUBMIT_BIO_2ARGS
4535 LC_SRC_HAVE_CLEAN_BDEV_ALIASES
4538 LC_SRC_HAVE_FILE_DENTRY
4541 LC_SRC_HAVE_INODE_LOCK
4542 LC_SRC_HAVE_IOP_GET_LINK
4543 LC_SRC_HAVE_IN_COMPAT_SYSCALL
4544 LC_SRC_HAVE_XATTR_HANDLER_INODE_PARAM
4545 LC_SRC_LOCK_PAGE_MEMCG
4546 LC_SRC_HAVE_DOWN_WRITE_KILLABLE
4551 LC_SRC_DIRECTIO_2ARGS
4552 LC_SRC_GENERIC_WRITE_SYNC_2ARGS
4553 LC_SRC_FOP_ITERATE_SHARED
4556 LC_SRC_HAVE_POSIX_ACL_VALID_USER_NS
4557 LC_SRC_D_COMPARE_4ARGS
4558 LC_SRC_FULL_NAME_HASH_3ARGS
4559 LC_SRC_STRUCT_POSIX_ACL_XATTR
4563 LC_SRC_GROUP_INFO_GID
4565 LC_SRC_POSIX_ACL_UPDATE_MODE
4566 LC_SRC_HAVE_BDI_IO_PAGES
4569 LC_SRC_IOP_GENERIC_READLINK
4570 LC_SRC_HAVE_VM_FAULT_ADDRESS
4573 LC_SRC_INODEOPS_ENHANCED_GETATTR
4574 LC_SRC_VM_OPERATIONS_REMOVE_VMF_ARG
4575 LC_SRC_HAVE_KEY_USAGE_REFCOUNT
4576 LC_SRC_HAVE_CRYPTO_MAX_ALG_NAME_128
4577 LC_SRC_HAVE_FSMAP_HEADER
4581 LC_SRC_SUPER_SETUP_BDI_NAME
4585 LC_SRC_HAVE_GET_INODE_USAGE
4588 LC_SRC_PAGEVEC_INIT_ONE_PARAM
4590 LC_SRC_INTERVAL_TREE_CACHED
4594 LC_SRC_VM_FAULT_RETRY
4598 LC_SRC_INODE_TIMESPEC64
4599 LC_SRC_ALLOC_FILE_PSEUDO
4602 LC_SRC_RADIX_TREE_TAG_SET
4603 LC_SRC_UAPI_LINUX_MOUNT_H
4604 LC_SRC_HAVE_SUNRPC_CACHE_HASH_LOCK_IS_A_SPINLOCK
4607 LC_SRC_GENL_FAMILY_HAS_RESV_START_OP
4610 LC_SRC_HAVE_BVEC_ITER_ALL
4613 LC_SRC_KEYRING_SEARCH_4ARGS
4616 LC_SRC_BIO_BI_PHYS_SEGMENTS
4617 LC_SRC_LM_COMPARE_OWNER_EXISTS
4620 LC_SRC_FSCRYPT_DIGESTED_NAME
4623 LC_SRC_FSCRYPT_DUMMY_CONTEXT_ENABLED
4626 LC_SRC_HAVE_KTHREAD_USE_MM
4629 LC_SRC_FSCRYPT_FNAME_ALLOC_BUFFER
4630 LC_SRC_FSCRYPT_SET_CONTEXT
4631 LC_SRC_FSCRYPT_NOKEY_NAME
4632 LC_SRC_FSCRYPT_SET_TEST_DUMMY_ENC_CHAR_ARG
4633 LC_SRC_FSCRYPT_DUMMY_POLICY
4634 LC_SRC_HAVE_ITER_FILE_SPLICE_WRITE
4637 LC_SRC_HAVE_BDI_DEBUG_STATS
4638 LC_SRC_FSCRYPT_IS_NOKEY_NAME
4639 LC_SRC_FSCRYPT_PREPARE_READDIR
4645 LC_SRC_HAVE_USER_NAMESPACE_ARG
4648 LC_SRC_HAVE_COPY_PAGE_FROM_ITER_ATOMIC
4649 LC_SRC_HAVE_FILEATTR_GET
4652 LC_SRC_HAVE_GET_ACL_RCU_ARG
4653 LC_SRC_HAVE_FAULT_IN_IOV_ITER_READABLE
4656 LC_SRC_HAVE_SECURITY_DENTRY_INIT_WITH_XATTR_NAME_ARG
4657 LC_SRC_HAVE_KIOCB_COMPLETE_2ARGS
4660 LC_SRC_HAVE_INVALIDATE_FOLIO
4661 LC_SRC_HAVE_DIRTY_FOLIO
4664 LC_SRC_HAVE_ALLOC_INODE_SB
4667 LC_SRC_GRAB_CACHE_PAGE_WRITE_BEGIN_WITH_FLAGS
4668 LC_SRC_HAVE_ADDRESS_SPACE_OPERATIONS_READ_FOLIO
4669 LC_SRC_HAVE_READ_CACHE_PAGE_FILLER_WITH_FILE
4670 LC_SRC_HAVE_ADDRESS_SPACE_OPERATIONS_RELEASE_FOLIO
4671 LC_SRC_HAVE_LSMCONTEXT_INIT
4672 LC_SRC_SECURITY_DENTRY_INIT_SECURTY_WITH_CTX
4675 LC_SRC_HAVE_NO_LLSEEK
4676 LC_SRC_DQUOT_TRANSFER_WITH_USER_NS
4677 LC_SRC_HAVE_ADDRESS_SPACE_OPERATIONS_MIGRATE_FOLIO
4678 LC_SRC_REGISTER_SHRINKER_FORMAT_NAMED
4679 LC_SRC_HAVE_VFS_SETXATTR_NON_CONST_VALUE
4680 LC_SRC_HAVE_IOV_ITER_GET_PAGES_ALLOC2
4683 LC_SRC_HAVE_GET_RANDOM_U32_AND_U64
4684 LC_SRC_NFS_FILLDIR_USE_CTX_RETURN_BOOL
4685 LC_SRC_HAVE_FILEMAP_GET_FOLIOS_CONTIG
4688 LC_SRC_HAVE_GET_RANDOM_U32_BELOW
4689 LC_SRC_HAVE_ACL_WITH_DENTRY
4692 LC_SRC_HAVE_MNT_IDMAP_ARG
4693 LC_SRC_HAVE_LOCKS_LOCK_FILE_WAIT_IN_FILELOCK
4694 LC_SRC_HAVE_U64_CAPABILITY
4695 LC_SRC_HAVE_FOLIO_BATCH_REINIT
4698 LC_SRC_HAVE_IOV_ITER_IOVEC
4699 LC_SRC_HAVE_IOVEC_WITH_IOV_MEMBER
4700 LC_SRC_HAVE_CLASS_CREATE_MODULE_ARG
4703 LC_SRC_HAVE_FILEMAP_SPLICE_READ
4704 LC_SRC_HAVE_ENUM_ITER_PIPE
4705 LC_SRC_HAVE_GET_USER_PAGES_WITHOUT_VMA
4706 LC_SRC_HAVE_FOLIO_BATCH
4707 LC_SRC_HAVE_STRUCT_PAGEVEC
4710 LC_SRC_HAVE_FLUSH___WORKQUEUE
4711 LC_SRC_HAVE_INODE_GET_CTIME
4712 LC_SRC_HAVE_MMAP_WRITE_TRYLOCK
4713 LC_SRC_HAVE_GENERIC_FILEATTR_HAS_MASK_ARG
4714 LC_SRC_HAVE_NSPROXY_COUNT_AS_REFCOUNT
4717 LC_SRC_HAVE_INODE_GET_MTIME_SEC
4718 LC_SRC_HAVE_SHRINKER_ALLOC
4721 LC_SRC_HAVE_DENTRY_D_CHILDREN
4722 LC_SRC_HAVE_GENERIC_ERROR_REMOVE_FOLIO
4724 # kernel patch to extend integrity interface
4725 LC_SRC_BIO_INTEGRITY_PREP_FN
4728 AC_DEFUN([LC_PROG_LINUX_RESULTS], [
4729 AS_IF([test "x$enable_gss" != xno], [
4730 LC_KEY_TYPE_INSTANTIATE_2ARGS
4732 LB2_TEST_CHECK_CONFIG_IM([CRYPTO_MD5], [],
4734 [kernel MD5 support is recommended by using GSS.])])
4735 LB2_TEST_CHECK_CONFIG_IM([CRYPTO_SHA1], [],
4737 [kernel SHA1 support is recommended by using GSS.])])
4738 LB2_TEST_CHECK_CONFIG_IM([CRYPTO_SHA256], [],
4740 [kernel SHA256 support is recommended by using GSS.])])
4741 LB2_TEST_CHECK_CONFIG_IM([CRYPTO_SHA512], [],
4743 [kernel SHA512 support is recommended by using GSS.])])
4745 AS_IF([test "x$enable_server" != xno], [
4751 LC_HAVE_PROJECT_QUOTA
4758 LC_HAVE_DENTRY_D_U_D_ALIAS_LIST
4759 LC_HAVE_DENTRY_D_U_D_ALIAS_HLIST
4760 LC_HAVE_DENTRY_D_CHILD
4761 LC_PID_NS_FOR_CHILDREN
4764 LC_OLDSIZE_TRUNCATE_PAGECACHE
4765 LC_PTR_ERR_OR_ZERO_MISSING
4767 LC_REGISTER_SHRINKER_RET
4772 LC_HAVE_D_IS_POSITIVE
4776 LC_HAVE_TRUNCATE_IPAGES_FINAL
4777 LC_IOPS_RENAME_WITH_FLAGS
4784 LC_DIRECTIO_USE_ITER
4785 LC_HAVE_IOV_ITER_INIT_DIRECTION
4786 LC_HAVE_IOV_ITER_TRUNCATE
4787 LC_HAVE_FILE_OPERATIONS_READ_WRITE_ITER
4788 LC_PAGECACHE_GET_PAGE
4791 LC_HAVE_INTERVAL_BLK_INTEGRITY
4793 LC_HAVE_BLK_INTEGRITY_ITER
4796 LC_PERCPU_COUNTER_INIT
4797 LC_NFS_FILLDIR_USE_CTX
4801 LC_HAVE_DQUOT_QC_DQBLK
4802 LC_HAVE_AIO_COMPLETE
4803 LC_HAVE_IS_ROOT_INODE
4806 LC_BACKING_DEV_INFO_REMOVAL
4813 LC_BIO_ENDIO_USES_ONE_ARG
4814 LC_SYMLINK_OPS_USE_NAMEIDATA
4815 LC_ACCOUNT_PAGE_DIRTIED_3ARGS
4816 LC_HAVE_CRYPTO_ALLOC_SKCIPHER
4819 LC_HAVE_INTERVAL_EXP_BLK_INTEGRITY
4820 LC_HAVE_BIP_ITER_BIO_INTEGRITY_PAYLOAD
4821 LC_HAVE_CACHE_HEAD_HLIST
4822 LC_HAVE_XATTR_HANDLER_SIMPLIFIED
4825 LC_HAVE_LOCKS_LOCK_FILE_WAIT
4826 LC_HAVE_KEY_PAYLOAD_DATA_ARRAY
4827 LC_HAVE_XATTR_HANDLER_NAME
4829 LC_HAVE_SUBMIT_BIO_2ARGS
4830 LC_HAVE_CLEAN_BDEV_ALIASES
4837 LC_HAVE_IOP_GET_LINK
4840 LC_HAVE_IN_COMPAT_SYSCALL
4841 LC_HAVE_XATTR_HANDLER_INODE_PARAM
4843 LC_HAVE_DOWN_WRITE_KILLABLE
4849 LC_GENERIC_WRITE_SYNC_2ARGS
4850 LC_FOP_ITERATE_SHARED
4853 LC_HAVE_POSIX_ACL_VALID_USER_NS
4855 LC_FULL_NAME_HASH_3ARGS
4856 LC_STRUCT_POSIX_ACL_XATTR
4862 LC_POSIX_ACL_UPDATE_MODE
4863 LC_HAVE_BDI_IO_PAGES
4866 LC_IOP_GENERIC_READLINK
4867 LC_HAVE_VM_FAULT_ADDRESS
4870 LC_INODEOPS_ENHANCED_GETATTR
4871 LC_VM_OPERATIONS_REMOVE_VMF_ARG
4872 LC_HAVE_KEY_USAGE_REFCOUNT
4873 LC_HAVE_CRYPTO_MAX_ALG_NAME_128
4874 LC_HAVE_FSMAP_HEADER
4878 LC_SUPER_SETUP_BDI_NAME
4882 LC_BIO_INTEGRITY_PREP_FN_RETURNS_BOOL
4883 LC_HAVE_GET_INODE_USAGE
4886 LC_PAGEVEC_INIT_ONE_PARAM
4888 LC_INTERVAL_TREE_CACHED
4896 LC_ALLOC_FILE_PSEUDO
4900 LC_RADIX_TREE_TAG_SET
4901 LC_UAPI_LINUX_MOUNT_H
4902 LC_HAVE_SUNRPC_CACHE_HASH_LOCK_IS_A_SPINLOCK
4905 LC_GENL_FAMILY_HAS_RESV_START_OP
4908 LC_HAVE_BVEC_ITER_ALL
4911 LC_KEYRING_SEARCH_4ARGS
4914 LC_BIO_BI_PHYS_SEGMENTS
4915 LC_HAVE_FLUSH_DELAYED_FPUT
4916 LC_LM_COMPARE_OWNER_EXISTS
4919 LC_FSCRYPT_DIGESTED_NAME
4922 LC_FSCRYPT_DUMMY_CONTEXT_ENABLED
4925 LC_HAVE_KTHREAD_USE_MM
4928 LC_HAVE_ITER_FILE_SPLICE_WRITE
4931 LC_FSCRYPT_FNAME_ALLOC_BUFFER
4932 LC_FSCRYPT_SET_CONTEXT
4933 LC_FSCRYPT_D_REVALIDATE
4934 LC_FSCRYPT_NOKEY_NAME
4935 LC_FSCRYPT_SET_TEST_DUMMY_ENC_CHAR_ARG
4936 LC_FSCRYPT_DUMMY_POLICY
4939 LC_HAVE_BDI_DEBUG_STATS
4940 LC_FSCRYPT_IS_NOKEY_NAME
4941 LC_FSCRYPT_PREPARE_READDIR
4947 LC_HAVE_USER_NAMESPACE_ARG
4950 LC_HAVE_FILEATTR_GET
4951 LC_HAVE_COPY_PAGE_FROM_ITER_ATOMIC
4954 LC_HAVE_GET_ACL_RCU_ARG
4957 LC_HAVE_GET_ACL_RCU_ARG
4958 LC_HAVE_INVALIDATE_LOCK
4959 LC_HAVE_FAULT_IN_IOV_ITER_READABLE
4962 LC_HAVE_SECURITY_DENTRY_INIT_WITH_XATTR_NAME_ARG
4963 LC_HAVE_KIOCB_COMPLETE_2ARGS
4964 LC_EXPORTS_DELETE_FROM_PAGE_CACHE
4968 LC_HAVE_INVALIDATE_FOLIO
4972 LC_HAVE_ALLOC_INODE_SB
4975 LC_GRAB_CACHE_PAGE_WRITE_BEGIN_WITH_FLAGS
4976 LC_HAVE_ADDRESS_SPACE_OPERATIONS_READ_FOLIO
4977 LC_HAVE_READ_CACHE_PAGE_FILLER_WITH_FILE
4978 LC_HAVE_ADDRESS_SPACE_OPERATIONS_RELEASE_FOLIO
4979 LC_HAVE_LSMCONTEXT_INIT
4980 LC_SECURITY_DENTRY_INIT_SECURTY_WITH_CTX
4984 LC_DQUOT_TRANSFER_WITH_USER_NS
4985 LC_HAVE_ADDRESS_SPACE_OPERATIONS_MIGRATE_FOLIO
4986 LC_REGISTER_SHRINKER_FORMAT_NAMED
4987 LC_HAVE_VFS_SETXATTR_NON_CONST_VALUE
4988 LC_HAVE_IOV_ITER_GET_PAGES_ALLOC2
4991 LC_HAVE_GET_RANDOM_U32_AND_U64
4992 LC_NFS_FILLDIR_USE_CTX_RETURN_BOOL
4993 LC_HAVE_FILEMAP_GET_FOLIOS_CONTIG
4996 LC_HAVE_GET_RANDOM_U32_BELOW
4997 LC_HAVE_ACL_WITH_DENTRY
5000 LC_HAVE_MNT_IDMAP_ARG
5001 LC_HAVE_LOCKS_LOCK_FILE_WAIT_IN_FILELOCK
5002 LC_HAVE_U64_CAPABILITY
5003 LC_HAVE_FOLIO_BATCH_REINIT
5006 LC_HAVE_IOV_ITER_IOVEC
5007 LC_HAVE_IOVEC_WITH_IOV_MEMBER
5008 LC_HAVE_CLASS_CREATE_MODULE_ARG
5011 LC_HAVE_FILEMAP_SPLICE_READ
5012 LC_HAVE_ENUM_ITER_PIPE
5013 LC_HAVE_GET_USER_PAGES_WITHOUT_VMA
5015 LC_HAVE_STRUCT_PAGEVEC
5018 LC_HAVE_FLUSH___WORKQUEUE
5019 LC_HAVE_INODE_GET_CTIME
5020 LC_HAVE_MMAP_WRITE_TRYLOCK
5021 LC_HAVE_GENERIC_FILEATTR_HAS_MASK_ARG
5022 LC_HAVE_NSPROXY_COUNT_AS_REFCOUNT
5025 LC_HAVE_INODE_GET_MTIME_SEC
5026 LC_HAVE_SHRINKER_ALLOC
5029 LC_HAVE_DENTRY_D_CHILDREN
5030 LC_HAVE_GENERIC_ERROR_REMOVE_FOLIO
5032 # kernel patch to extend integrity interface
5033 LC_BIO_INTEGRITY_PREP_FN
5039 # Lustre linux kernel checks
5041 AC_DEFUN([LC_PROG_LINUX], [
5042 AC_MSG_NOTICE([Lustre kernel checks
5043 ==============================================================================])
5048 LC_CONFIG_LRU_RESIZE
5051 LC_GLIBC_SUPPORT_FHANDLES
5052 LC_GLIBC_SUPPORT_COPY_FILE_RANGE
5056 # 4.1.0 - Check export
5057 LC_HAVE_SYNC_READ_WRITE
5059 # 4.8 - Check export
5060 LC_EXPORT_DEFAULT_FILE_SPLICE_READ
5062 # 5.2 - Check export
5063 LC_ACCOUNT_PAGE_DIRTIED
5070 # Check whether to build the client side of Lustre
5072 AC_DEFUN([LC_CONFIG_CLIENT], [
5073 AC_MSG_CHECKING([whether to build Lustre client support])
5074 AC_ARG_ENABLE([client],
5075 AS_HELP_STRING([--disable-client],
5076 [disable Lustre client support]),
5077 [], [enable_client="yes"])
5078 AC_MSG_RESULT([$enable_client])
5079 ]) # LC_CONFIG_CLIENT
5084 AC_DEFUN([LB_CONFIG_MPITESTS], [
5085 AC_ARG_ENABLE([mpitests],
5086 AS_HELP_STRING([--enable-mpitests=<yes|no|mpicc wrapper>],
5087 [include mpi tests]), [
5088 enable_mpitests="yes"
5091 MPICC_WRAPPER="mpicc"
5092 MPI_BIN=$(eval which $MPICC_WRAPPER | xargs dirname)
5095 enable_mpitests="no"
5099 MPICC_WRAPPER=$enableval
5100 MPI_BIN=$(eval echo $MPICC_WRAPPER | xargs dirname)
5104 enable_mpitests="yes"
5105 MPICC_WRAPPER="mpicc"
5106 MPI_BIN=$(eval which $MPICC_WRAPPER | xargs dirname)
5109 if test "x$enable_mpitests" != "xno"; then
5112 AC_CACHE_CHECK([whether mpitests can be built],
5113 lb_cv_mpi_tests, [AC_COMPILE_IFELSE([AC_LANG_SOURCE([
5117 MPI_Initialized(&flag);
5120 ])], [lb_cv_mpi_tests="yes"], [lb_cv_mpi_tests="no"])
5122 enable_mpitests=$lb_cv_mpi_tests
5126 AC_SUBST(MPICC_WRAPPER)
5127 ]) # LB_CONFIG_MPITESTS
5132 # whether to enable quota support global control
5134 AC_DEFUN([LC_ENABLE_QUOTA], [
5135 AC_MSG_CHECKING([whether to enable quota support global control])
5136 AC_ARG_ENABLE([quota],
5137 AS_HELP_STRING([--enable-quota],
5138 [enable quota support]),
5139 [], [enable_quota="yes"])
5140 AS_IF([test "x$enable_quota" = xyes],
5141 [AC_MSG_RESULT([yes])],
5142 [AC_MSG_RESULT([no])])
5143 ]) # LC_ENABLE_QUOTA
5148 AC_DEFUN([LC_QUOTA], [
5152 AS_IF([test "x$enable_quota" != xno -a "x$enable_utils" != xno], [
5153 AC_CHECK_HEADER([sys/quota.h],
5154 [AC_DEFINE(HAVE_SYS_QUOTA_H, 1,
5155 [Define to 1 if you have <sys/quota.h>.])],
5156 [AC_MSG_ERROR([did not find <sys/quota.h> on your system])])
5163 # configure support for optional OSD implementation
5165 AC_DEFUN([LC_OSD_ADDON], [
5166 AC_MSG_CHECKING([whether to use OSD addon])
5168 AS_HELP_STRING([--with-osd=path],
5169 [set path to optional osd]),
5176 OSDADDON="$with_osd"
5183 AS_IF([test $ENABLEOSDADDON -eq 0], [
5187 OSDMODNAME=$(basename $OSDADDON)
5188 AS_IF([test -e $LUSTRE/$OSDMODNAME], [
5189 AC_MSG_RESULT([cannot link])
5191 ], [ln -s $OSDADDON $LUSTRE/$OSDMODNAME], [
5192 AC_MSG_RESULT([$OSDMODNAME])
5193 OSDADDON="obj-m += $OSDMODNAME/"
5195 AC_MSG_RESULT([cannot link])
5205 # Check whether to enable Lustre client crypto
5207 AC_DEFUN([LC_CONFIG_CRYPTO], [
5208 AC_MSG_CHECKING([whether to enable Lustre client crypto])
5209 AC_ARG_ENABLE([crypto],
5210 AS_HELP_STRING([--enable-crypto=yes|no|in-kernel],
5211 [enable Lustre client crypto (default is yes), use 'in-kernel' to force use of in-kernel fscrypt instead of embedded llcrypt]),
5212 [], [enable_crypto="auto"])
5213 AS_IF([test "x$enable_crypto" != xno -a "x$enable_dist" = xno], [
5217 LC_FSCRYPT_SUPPORT])
5218 AS_IF([test "x$enable_crypto" = xin-kernel], [
5219 AS_IF([test "x$has_fscrypt_support" = xyes], [
5220 AC_DEFINE(HAVE_LUSTRE_CRYPTO, 1, [Enable Lustre client crypto via in-kernel fscrypt])], [
5221 AC_MSG_ERROR([Lustre client crypto cannot be enabled via in-kernel fscrypt.])
5222 enable_crypto=no])],
5223 [AS_IF([test "x$has_is_encrypted" = xyes], [
5224 AC_DEFINE(HAVE_LUSTRE_CRYPTO, 1, [Enable Lustre client crypto via embedded llcrypt])
5225 AC_DEFINE(CONFIG_LL_ENCRYPTION, 1, [embedded llcrypt])
5226 AC_DEFINE(HAVE_FSCRYPT_DUMMY_CONTEXT_ENABLED, 1, [embedded llcrypt uses llcrypt_dummy_context_enabled()])
5227 enable_crypto="embedded-llcrypt"
5228 enable_llcrypt=yes], [
5229 AS_IF([test "x$enable_crypto" = xyes],
5230 [AC_MSG_ERROR([Lustre client crypto cannot be enabled because of lack of encryption support in your kernel.])])
5231 AS_IF([test "x$enable_crypto" != xno -a "x$enable_dist" = xno],
5232 [AC_MSG_WARN(Lustre client crypto cannot be enabled because of lack of encryption support in your kernel.)])
5233 enable_crypto=no])])
5234 AS_IF([test "x$enable_dist" != xno], [
5236 enable_llcrypt=yes])
5237 AC_MSG_RESULT([$enable_crypto])
5238 ]) # LC_CONFIG_CRYPTO
5243 # other configure checks
5245 AC_DEFUN([LC_CONFIGURE], [
5246 AC_MSG_NOTICE([Lustre core checks
5247 ==============================================================================])
5249 # maximum MDS thread count
5252 # lustre/utils/gss/gss_util.c
5253 # lustre/utils/llog_reader.c
5254 # lustre/utils/create_iam.c
5255 # lustre/utils/libiam.c
5256 AC_CHECK_HEADERS([netdb.h endian.h])
5258 # lustre/utils/llverfs.c lustre/utils/libmount_utils_ldiskfs.c
5259 AC_CHECK_HEADERS([ext2fs/ext2fs.h], [], [
5260 AS_IF([test "x$enable_utils" = xyes -a "x$enable_ldiskfs" = xyes], [
5262 ext2fs.h not found. Please install e2fsprogs development package.
5267 # lustre/tests/statx_test.c
5268 AC_CHECK_FUNCS([statx])
5270 # lustre/utils/lfs.c
5271 AS_IF([test "$enable_dist" = "no"], [
5272 AC_CHECK_LIB([z], [crc32], [
5273 AC_CHECK_HEADER([zlib.h], [], [
5274 AC_MSG_ERROR([zlib.h not found.])])
5277 zlib library not found. Please install zlib development package.])
5283 AC_CHECK_LIB([selinux], [is_selinux_enabled],
5284 [AC_CHECK_HEADERS([selinux/selinux.h],
5285 [SELINUX="-lselinux"
5286 AC_DEFINE([HAVE_SELINUX], 1,
5287 [support for selinux ])],
5290 No libselinux-devel package found, unable to build selinux enabled tools
5295 No selinux package found, unable to build selinux enabled tools
5300 AC_CHECK_LIB([keyutils], [add_key])
5303 AC_MSG_CHECKING([whether to report minimum OST free space])
5304 AC_ARG_ENABLE([mindf],
5305 AS_HELP_STRING([--enable-mindf],
5306 [Make statfs report the minimum available space on any single OST instead of the sum of free space on all OSTs]),
5307 [], [enable_mindf="no"])
5308 AC_MSG_RESULT([$enable_mindf])
5309 AS_IF([test "$enable_mindf" = "yes"], [
5310 AC_DEFINE([MIN_DF], 1, [Report minimum OST free space])
5311 AC_SUBST(ENABLE_MINDF, yes)
5313 AC_SUBST(ENABLE_MINDF, no)
5316 AC_MSG_CHECKING([whether to randomly failing memory alloc])
5317 AC_ARG_ENABLE([fail_alloc],
5318 AS_HELP_STRING([--disable-fail-alloc],
5319 [disable randomly alloc failure]),
5320 [], [enable_fail_alloc="yes"])
5321 AC_MSG_RESULT([$enable_fail_alloc])
5322 AS_IF([test "x$enable_fail_alloc" != xno], [
5323 AC_DEFINE([RANDOM_FAIL_ALLOC], 1, [enable randomly alloc failure])
5324 AC_SUBST(ENABLE_FAIL_ALLOC, yes)
5326 AC_SUBST(ENABLE_FAIL_ALLOC, no)
5329 AC_MSG_CHECKING([whether to check invariants (expensive cpu-wise)])
5330 AC_ARG_ENABLE([invariants],
5331 AS_HELP_STRING([--enable-invariants],
5332 [enable invariant checking (cpu intensive)]),
5333 [], [enable_invariants="no"])
5334 AC_MSG_RESULT([$enable_invariants])
5335 AS_IF([test "x$enable_invariants" = xyes], [
5336 AC_DEFINE([CONFIG_LUSTRE_DEBUG_EXPENSIVE_CHECK], 1,
5337 [enable invariant checking])
5338 AC_SUBST(ENABLE_INVARIANTS, yes)
5340 AC_SUBST(ENABLE_INVARIANTS, no)
5343 AC_MSG_CHECKING([whether to track references with lu_ref])
5344 AC_ARG_ENABLE([lu_ref],
5345 AS_HELP_STRING([--enable-lu_ref],
5346 [enable lu_ref reference tracking code]),
5347 [], [enable_lu_ref="no"])
5348 AC_MSG_RESULT([$enable_lu_ref])
5349 AS_IF([test "x$enable_lu_ref" = xyes], [
5350 AC_DEFINE([CONFIG_LUSTRE_DEBUG_LU_REF], 1,
5351 [enable lu_ref reference tracking code])
5352 AC_SUBST(ENABLE_LU_REF, yes)
5354 AC_SUBST(ENABLE_LU_REF, no)
5357 AC_MSG_CHECKING([whether to enable page state tracking])
5358 AC_ARG_ENABLE([pgstate-track],
5359 AS_HELP_STRING([--enable-pgstate-track],
5360 [enable page state tracking]),
5361 [], [enable_pgstat_track="no"])
5362 AC_MSG_RESULT([$enable_pgstat_track])
5363 AS_IF([test "x$enable_pgstat_track" = xyes], [
5364 AC_DEFINE([CONFIG_DEBUG_PAGESTATE_TRACKING], 1,
5365 [enable page state tracking code])
5366 AC_SUBST(ENABLE_PGSTAT_TRACK, yes)
5368 AC_SUBST(ENABLE_PGSTAT_TRACK, no)
5372 AC_MSG_CHECKING([systemd unit file directory])
5373 AC_ARG_WITH([systemdsystemunitdir],
5374 [AS_HELP_STRING([--with-systemdsystemunitdir=DIR],
5375 [Directory for systemd service files])],
5376 [], [with_systemdsystemunitdir=auto])
5377 AS_IF([test "x$with_systemdsystemunitdir" = "xyes" -o "x$with_systemdsystemunitdir" = "xauto"],
5378 [def_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)
5379 AS_IF([test "x$def_systemdsystemunitdir" = "x"],
5380 [AS_IF([test "x$with_systemdsystemunitdir" = "xyes"],
5381 [AC_MSG_ERROR([systemd support requested but pkg-config unable to query systemd package])])
5382 with_systemdsystemunitdir=no],
5383 [with_systemdsystemunitdir="$def_systemdsystemunitdir"])])
5384 AS_IF([test "x$with_systemdsystemunitdir" != "xno"],
5385 [AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])])
5386 AC_MSG_RESULT([$with_systemdsystemunitdir])
5388 AC_MSG_CHECKING([bash-completion directory])
5389 AC_ARG_WITH([bash-completion-dir],
5390 AS_HELP_STRING([--with-bash-completion-dir[=PATH]],
5391 [Install the bash auto-completion script in this directory.]),
5393 [with_bash_completion_dir=yes])
5394 AS_IF([test "x$with_bash_completion_dir" = "xyes"], [
5395 BASH_COMPLETION_DIR="`pkg-config --variable=completionsdir bash-completion`"
5396 AS_IF([test "x$BASH_COMPLETION_DIR" = "x"], [
5397 [BASH_COMPLETION_DIR="/usr/share/bash-completion/completions"]
5400 BASH_COMPLETION_DIR="$with_bash_completion_dir"
5402 AC_SUBST([BASH_COMPLETION_DIR])
5403 AC_MSG_RESULT([$BASH_COMPLETION_DIR])
5409 # AM_CONDITIONALS for lustre
5411 AC_DEFUN([LC_CONDITIONALS], [
5412 AM_CONDITIONAL(MPITESTS, test x$enable_mpitests = xyes, Build MPI Tests)
5413 AM_CONDITIONAL(CLIENT, test x$enable_client = xyes)
5414 AM_CONDITIONAL(SERVER, test x$enable_server = xyes)
5415 AM_CONDITIONAL(SPLIT, test x$enable_split = xyes)
5416 AM_CONDITIONAL(EXT2FS_DEVEL, test x$ac_cv_header_ext2fs_ext2fs_h = xyes)
5417 AM_CONDITIONAL(GSS, test x$enable_gss = xyes)
5418 AM_CONDITIONAL(GSS_KEYRING, test x$enable_gss_keyring = xyes)
5419 AM_CONDITIONAL(GSS_SSK, test x$enable_ssk = xyes)
5420 AM_CONDITIONAL(LIBPTHREAD, test x$enable_libpthread = xyes)
5421 AM_CONDITIONAL(HAVE_SYSTEMD, test "x$with_systemdsystemunitdir" != "xno")
5422 AM_CONDITIONAL(ENABLE_BASH_COMPLETION, test "x$with_bash_completion_dir" != "xno")
5423 AM_CONDITIONAL(XATTR_HANDLER, test "x$lb_cv_compile_xattr_handler_flags" = xyes)
5424 AM_CONDITIONAL(SELINUX, test "$SELINUX" = "-lselinux")
5425 AM_CONDITIONAL(GETSEPOL, test x$enable_getsepol = xyes &&
5426 test x$config_getsepol = xyes)
5427 AM_CONDITIONAL(LLCRYPT, test x$enable_llcrypt = xyes)
5428 AM_CONDITIONAL(LIBAIO, test x$enable_libaio = xyes)
5429 ]) # LC_CONDITIONALS
5434 # files that should be generated with AC_OUTPUT
5436 AC_DEFUN([LC_CONFIG_FILES],
5440 lustre/autoconf/Makefile
5441 lustre/conf/Makefile
5442 lustre/conf/resource/Makefile
5444 lustre/include/Makefile
5445 lustre/include/lustre/Makefile
5446 lustre/include/uapi/linux/lustre/Makefile
5447 lustre/kernel_patches/targets/5.14-rhel9.3.target
5448 lustre/kernel_patches/targets/5.14-rhel9.2.target
5449 lustre/kernel_patches/targets/5.14-rhel9.1.target
5450 lustre/kernel_patches/targets/5.14-rhel9.0.target
5451 lustre/kernel_patches/targets/4.18-rhel8.9.target
5452 lustre/kernel_patches/targets/4.18-rhel8.8.target
5453 lustre/kernel_patches/targets/4.18-rhel8.7.target
5454 lustre/kernel_patches/targets/4.18-rhel8.6.target
5455 lustre/kernel_patches/targets/4.18-rhel8.5.target
5456 lustre/kernel_patches/targets/4.18-rhel8.4.target
5457 lustre/kernel_patches/targets/4.18-rhel8.3.target
5458 lustre/kernel_patches/targets/4.18-rhel8.2.target
5459 lustre/kernel_patches/targets/4.18-rhel8.1.target
5460 lustre/kernel_patches/targets/4.18-rhel8.target
5461 lustre/kernel_patches/targets/3.10-rhel7.9.target
5462 lustre/kernel_patches/targets/3.10-rhel7.8.target
5463 lustre/kernel_patches/targets/3.10-rhel7.7.target
5464 lustre/kernel_patches/targets/3.10-rhel7.6.target
5465 lustre/kernel_patches/targets/3.10-rhel7.5.target
5466 lustre/kernel_patches/targets/4.14-rhel7.5.target
5467 lustre/kernel_patches/targets/4.14-rhel7.6.target
5468 lustre/kernel_patches/targets/4.12-sles12sp4.target
5469 lustre/kernel_patches/targets/4.12-sles12sp5.target
5470 lustre/kernel_patches/targets/4.12-sles15sp1.target
5471 lustre/kernel_patches/targets/5.3-sles15sp2.target
5472 lustre/kernel_patches/targets/5.3-sles15sp3.target
5473 lustre/kernel_patches/targets/5.14-sles15sp4.target
5474 lustre/kernel_patches/targets/5.14-sles15sp5.target
5475 lustre/kernel_patches/targets/3.x-fc18.target
5476 lustre/kernel_patches/targets/5.10-oe2203.target
5477 lustre/kernel_patches/targets/5.10-oe2203sp1.target
5478 lustre/kernel_patches/targets/5.10-oe2203sp2.target
5479 lustre/ldlm/Makefile
5480 lustre/ldlm/autoMakefile
5481 lustre/ec/autoMakefile
5484 lustre/fid/autoMakefile
5485 lustre/llite/Makefile
5486 lustre/llite/autoMakefile
5488 lustre/lov/autoMakefile
5490 lustre/mdc/autoMakefile
5492 lustre/lmv/autoMakefile
5493 lustre/lfsck/Makefile
5494 lustre/lfsck/autoMakefile
5496 lustre/mdt/autoMakefile
5498 lustre/mdd/autoMakefile
5500 lustre/fld/autoMakefile
5501 lustre/obdclass/Makefile
5502 lustre/obdclass/autoMakefile
5503 lustre/obdecho/Makefile
5504 lustre/obdecho/autoMakefile
5506 lustre/ofd/autoMakefile
5508 lustre/osc/autoMakefile
5510 lustre/ost/autoMakefile
5511 lustre/osd-ldiskfs/Makefile
5512 lustre/osd-ldiskfs/autoMakefile
5513 lustre/osd-zfs/Makefile
5514 lustre/osd-zfs/autoMakefile
5516 lustre/mgc/autoMakefile
5518 lustre/mgs/autoMakefile
5519 lustre/target/Makefile
5520 lustre/target/autoMakefile
5521 lustre/ptlrpc/Makefile
5522 lustre/ptlrpc/autoMakefile
5523 lustre/ptlrpc/gss/Makefile
5524 lustre/ptlrpc/gss/autoMakefile
5525 lustre/quota/Makefile
5526 lustre/quota/autoMakefile
5527 lustre/scripts/Makefile
5528 lustre/scripts/systemd/Makefile
5529 lustre/tests/Makefile
5530 lustre/tests/mpi/Makefile
5531 lustre/tests/iabf/Makefile
5532 lustre/tests/lutf/Makefile
5533 lustre/tests/lutf/src/Makefile
5534 lustre/kunit/Makefile
5535 lustre/kunit/autoMakefile
5536 lustre/utils/Makefile
5537 lustre/utils/gss/Makefile
5539 lustre/osp/autoMakefile
5541 lustre/lod/autoMakefile
5543 ]) # LC_CONFIG_FILES