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 # Ensure the stack size is at least 8k in Lustre server (all kernels)
73 AC_DEFUN([LC_STACK_SIZE], [
74 LB_CHECK_COMPILE([if stack size is at least 8k],
76 #include <linux/thread_info.h>
78 #if THREAD_SIZE < 8192
79 #error "stack size < 8192"
81 ], [], [AC_MSG_ERROR([
83 Lustre requires that Linux is configured with at least a 8KB stack.
90 # Allow the user to set the MDS thread upper limit
92 AC_DEFUN([LC_MDS_MAX_THREADS], [
93 AC_MSG_CHECKING([for maximum number of MDS threads])
94 AC_ARG_WITH([mds_max_threads],
95 AC_HELP_STRING([--with-mds-max-threads=count],
96 [maximum threads available on the MDS: (default=512)]),
97 [AC_DEFINE_UNQUOTED(MDS_MAX_THREADS, $with_mds_max_threads,
98 [maximum number of MDS threads])])
99 AC_MSG_RESULT([$with_mds_max_threads])
100 ]) # LC_MDS_MAX_THREADS
105 # the pinger is temporary, until we have the recovery node in place
107 AC_DEFUN([LC_CONFIG_PINGER], [
108 AC_MSG_CHECKING([whether to enable Lustre pinger support])
109 AC_ARG_ENABLE([pinger],
110 AC_HELP_STRING([--disable-pinger],
111 [disable recovery pinger support]),
112 [], [enable_pinger="yes"])
113 AC_MSG_RESULT([$enable_pinger])
114 AS_IF([test "x$enable_pinger" != xno],
115 [AC_DEFINE(CONFIG_LUSTRE_FS_PINGER, 1,[Use the Pinger])])
116 ]) # LC_CONFIG_PINGER
121 # do checksum of bulk data between client and OST
123 AC_DEFUN([LC_CONFIG_CHECKSUM], [
124 AC_MSG_CHECKING([whether to enable data checksum support])
125 AC_ARG_ENABLE([checksum],
126 AC_HELP_STRING([--disable-checksum],
127 [disable data checksum support]),
128 [], [enable_checksum="yes"])
129 AC_MSG_RESULT([$enable_checksum])
130 AS_IF([test "x$enable_checksum" != xno],
131 [AC_DEFINE(ENABLE_CHECKSUM, 1, [do data checksums])])
132 ]) # LC_CONFIG_CHECKSUM
137 # enable distributed flock by default
139 AC_DEFUN([LC_CONFIG_FLOCK], [
140 AC_MSG_CHECKING([whether to enable flock by default])
141 AC_ARG_ENABLE([flock],
142 AC_HELP_STRING([--disable-flock],
143 [disable flock by default]),
144 [], [enable_flock="yes"])
145 AC_MSG_RESULT([$enable_flock])
146 AS_IF([test "x$enable_flock" != xno],
147 [AC_DEFINE(ENABLE_FLOCK, 1, [enable flock by default])])
151 # LC_CONFIG_HEALTH_CHECK_WRITE
153 # Turn off the actual write to the disk
155 AC_DEFUN([LC_CONFIG_HEALTH_CHECK_WRITE], [
156 AC_MSG_CHECKING([whether to enable a write with the health check])
157 AC_ARG_ENABLE([health_write],
158 AC_HELP_STRING([--enable-health_write],
159 [enable disk writes when doing health check]),
160 [], [enable_health_write="no"])
161 AC_MSG_RESULT([$enable_health_write])
162 AS_IF([test "x$enable_health_write" != xno],
163 [AC_DEFINE(USE_HEALTH_CHECK_WRITE, 1, [Write when Checking Health])])
164 ]) # LC_CONFIG_HEALTH_CHECK_WRITE
167 # LC_CONFIG_LRU_RESIZE
169 AC_DEFUN([LC_CONFIG_LRU_RESIZE], [
170 AC_MSG_CHECKING([whether to enable lru self-adjusting])
171 AC_ARG_ENABLE([lru_resize],
172 AC_HELP_STRING([--enable-lru-resize],
173 [enable lru resize support]),
174 [], [enable_lru_resize="yes"])
175 AC_MSG_RESULT([$enable_lru_resize])
176 AS_IF([test "x$enable_lru_resize" != xno],
177 [AC_DEFINE(HAVE_LRU_RESIZE_SUPPORT, 1, [Enable lru resize support])])
178 ]) # LC_CONFIG_LRU_RESIZE
183 # Quota support. The kernel must support CONFIG_QUOTA.
185 AC_DEFUN([LC_QUOTA_CONFIG], [
186 LB_CHECK_CONFIG_IM([QUOTA], [],
189 Lustre quota requires that CONFIG_QUOTA is enabled in your kernel.
196 # fhandle kernel support for open_by_handle_at() and name_to_handle_at()
197 # system calls. The kernel must support CONFIG_FHANDLE.
199 AC_DEFUN([LC_CONFIG_FHANDLE], [
200 LB_CHECK_CONFIG_IM([FHANDLE], [],
203 Lustre fid handling requires that CONFIG_FHANDLE is enabled in your kernel.
205 ]) # LC_CONFIG_FHANDLE
208 # LC_POSIX_ACL_CONFIG
212 AC_DEFUN([LC_POSIX_ACL_CONFIG], [
213 LB_CHECK_CONFIG_IM([FS_POSIX_ACL],
214 [AC_DEFINE(CONFIG_LUSTRE_FS_POSIX_ACL, 1, [Enable POSIX acl])
216 ]) # LC_POSIX_ACL_CONFIG
218 LB_CHECK_CONFIG_IM([CRYPTO_MD5], [],
219 [AC_MSG_WARN([kernel MD5 support is recommended by using GSS.])])
222 # LC_CONFIG_GSS_KEYRING
224 # default 'auto', tests for dependencies, if found, enables;
225 # only called if gss is enabled
227 AC_DEFUN([LC_CONFIG_GSS_KEYRING], [
228 AC_MSG_CHECKING([whether to enable gss keyring backend])
229 AC_ARG_ENABLE([gss_keyring],
230 [AC_HELP_STRING([--disable-gss-keyring],
231 [disable gss keyring backend])],
232 [], [enable_gss_keyring="auto"])
233 AC_MSG_RESULT([$enable_gss_keyring])
234 AS_IF([test "x$enable_gss_keyring" != xno], [
235 LB_CHECK_CONFIG_IM([KEYS], [], [
236 gss_keyring_conf_test="fail"
237 AC_MSG_WARN([GSS keyring backend requires that CONFIG_KEYS be enabled in your kernel.])])
239 AC_CHECK_LIB([keyutils], [keyctl_search], [], [
240 gss_keyring_conf_test="fail"
241 AC_MSG_WARN([GSS keyring backend requires libkeyutils])])
243 AS_IF([test "x$gss_keyring_conf_test" != xfail], [
244 AC_DEFINE([HAVE_GSS_KEYRING], [1],
245 [Define this if you enable gss keyring backend])
246 enable_gss_keyring="yes"
248 AS_IF([test "x$enable_gss_keyring" = xyes], [
249 AC_MSG_ERROR([Cannot enable gss_keyring. See above for details.])
253 ]) # LC_CONFIG_GSS_KEYRING
256 # LC_KEY_TYPE_INSTANTIATE_2ARGS
258 # rhel7 key_type->instantiate takes 2 args (struct key, struct key_preparsed_payload)
260 AC_DEFUN([LC_KEY_TYPE_INSTANTIATE_2ARGS], [
261 LB_CHECK_COMPILE([if 'key_type->instantiate' has two args],
262 key_type_instantiate_2args, [
263 #include <linux/key-type.h>
265 ((struct key_type *)0)->instantiate(0, NULL);
267 AC_DEFINE(HAVE_KEY_TYPE_INSTANTIATE_2ARGS, 1,
268 [key_type->instantiate has two args])
270 ]) # LC_KEY_TYPE_INSTANTIATE_2ARGS
275 AC_DEFUN([LC_CONFIG_SUNRPC], [
276 LB_CHECK_CONFIG_IM([SUNRPC], [], [
277 AS_IF([test "x$sunrpc_required" = xyes], [
280 kernel SUNRPC support is required by using GSS.
283 ]) # LC_CONFIG_SUNRPC
286 # LC_CONFIG_GSS (default 'auto' (tests for dependencies, if found, enables))
288 # Build gss and related tools of Lustre. Currently both kernel and user space
289 # parts are depend on linux platform.
291 AC_DEFUN([LC_CONFIG_GSS], [
292 AC_MSG_CHECKING([whether to enable gss support])
294 [AC_HELP_STRING([--enable-gss], [enable gss support])],
295 [], [enable_gss="auto"])
296 AC_MSG_RESULT([$enable_gss])
298 AC_ARG_VAR([TEST_JOBS],
299 [simultaneous jobs during configure (defaults to $(nproc))])
300 if test "x$ac_cv_env_TEST_JOBS_set" != "xset"; then
301 TEST_JOBS=${TEST_JOBS:-$(nproc)}
305 AC_ARG_VAR([TEST_DIR],
306 [location of temporary parallel configure tests (defaults to $PWD/lb2)])
307 TEST_DIR=${TEST_DIR:-$PWD/_lpb}
310 AS_IF([test "x$enable_gss" != xno], [
311 LC_CONFIG_GSS_KEYRING
312 LC_KEY_TYPE_INSTANTIATE_2ARGS
313 sunrpc_required=$enable_gss
317 LB_CHECK_CONFIG_IM([CRYPTO_MD5], [],
318 [AC_MSG_WARN([kernel MD5 support is recommended by using GSS.])])
319 LB_CHECK_CONFIG_IM([CRYPTO_SHA1], [],
320 [AC_MSG_WARN([kernel SHA1 support is recommended by using GSS.])])
321 LB_CHECK_CONFIG_IM([CRYPTO_SHA256], [],
322 [AC_MSG_WARN([kernel SHA256 support is recommended by using GSS.])])
323 LB_CHECK_CONFIG_IM([CRYPTO_SHA512], [],
324 [AC_MSG_WARN([kernel SHA512 support is recommended by using GSS.])])
326 require_krb5=$enable_gss
330 AS_IF([test -n "$KRBDIR"], [
331 gss_conf_test="success"
333 gss_conf_test="failure"
336 AS_IF([test "x$gss_conf_test" = xsuccess && test "x$enable_gss" != xno], [
337 AC_DEFINE([HAVE_GSS], [1], [Define this is if you enable gss])
340 enable_gss_keyring="no"
344 enable_ssk=$enable_gss
346 enable_gss_keyring="no"
352 # OpenSSL 1.0+ return int for HMAC functions but older SLES11 versions do not
353 AC_DEFUN([LC_OPENSSL_SSK], [
354 AC_MSG_CHECKING([whether OpenSSL has functions needed for SSK])
355 AS_IF([test "x$enable_ssk" != xno], [
356 AC_COMPILE_IFELSE([AC_LANG_SOURCE([
357 #include <openssl/hmac.h>
358 #include <openssl/evp.h>
362 rc = HMAC_Init_ex(NULL, "test", 4, EVP_md_null(), NULL);
364 ])],[AC_DEFINE(HAVE_OPENSSL_SSK, 1,
365 [OpenSSL HMAC functions needed for SSK])],
368 AC_MSG_RESULT([$enable_ssk])
371 # LC_OPENSSL_GETSEPOL
373 # OpenSSL is needed for l_getsepol
374 AC_DEFUN([LC_OPENSSL_GETSEPOL], [
375 AC_MSG_CHECKING([whether openssl-devel is present])
376 AC_COMPILE_IFELSE([AC_LANG_SOURCE([
377 #include <openssl/evp.h>
380 EVP_MD_CTX *mdctx = EVP_MD_CTX_create();
383 AC_DEFINE(HAVE_OPENSSL_GETSEPOL, 1, [openssl-devel is present])
384 enable_getsepol="yes"
390 No openssl-devel headers found, unable to build l_getsepol and SELinux status checking
393 AC_MSG_RESULT([$enable_getsepol])
394 ]) # LC_OPENSSL_GETSEPOL
397 AC_DEFUN([LC_HAVE_LIBAIO], [
398 AC_CHECK_HEADER([libaio.h],
400 AC_MSG_WARN([libaio is not installed in the system]))
403 AC_DEFUN([LC_HAVE_PROJECT_QUOTA], [
404 LB_CHECK_COMPILE([if get_projid exists],
407 #include <linux/quota.h>
409 struct dquot_operations ops = { };
411 ops.get_projid(NULL, NULL);
413 AC_DEFINE(HAVE_PROJECT_QUOTA, 1,
414 [get_projid function exists])
416 ]) # LC_HAVE_PROJECT_QUOTA
419 # LC_INVALIDATE_RANGE
421 # 3.11 invalidatepage requires the length of the range to invalidate
423 AC_DEFUN([LC_INVALIDATE_RANGE], [
424 LB_CHECK_COMPILE([if 'address_space_operations.invalidatepage' requires 3 arguments],
425 address_space_ops_invalidatepage_3args, [
426 #include <linux/fs.h>
428 struct address_space_operations a_ops;
429 a_ops.invalidatepage(NULL, 0, 0);
431 AC_DEFINE(HAVE_INVALIDATE_RANGE, 1,
432 [address_space_operations.invalidatepage needs 3 arguments])
434 ]) # LC_INVALIDATE_RANGE
437 # LC_HAVE_DIR_CONTEXT
439 # 3.11 readdir now takes the new struct dir_context
441 AC_DEFUN([LC_HAVE_DIR_CONTEXT], [
442 LB_CHECK_COMPILE([if 'dir_context' exist],
444 #include <linux/fs.h>
446 #ifdef FMODE_KABI_ITERATE
447 #error "back to use readdir in kabi_extand mode"
449 struct dir_context ctx;
454 AC_DEFINE(HAVE_DIR_CONTEXT, 1,
457 ]) # LC_HAVE_DIR_CONTEXT
462 # 3.11 dentry_operations.d_compare() taken 5 arguments.
464 AC_DEFUN([LC_D_COMPARE_5ARGS], [
465 LB_CHECK_COMPILE([if 'd_compare' taken 5 arguments],
467 #include <linux/dcache.h>
469 ((struct dentry_operations*)0)->d_compare(NULL,NULL,0,NULL,NULL);
471 AC_DEFINE(HAVE_D_COMPARE_5ARGS, 1,
472 [d_compare need 5 arguments])
474 ]) # LC_D_COMPARE_5ARGS
479 # 3.11 need to access d_count to get dentry reference count
481 AC_DEFUN([LC_HAVE_DCOUNT], [
482 LB_CHECK_COMPILE([if 'd_count' exists],
484 #include <linux/dcache.h>
486 struct dentry de = { };
489 count = d_count(&de);
491 AC_DEFINE(HAVE_D_COUNT, 1,
497 # LC_PID_NS_FOR_CHILDREN
499 # 3.11 replaces pid_ns by pid_ns_for_children in struct nsproxy
501 AC_DEFUN([LC_PID_NS_FOR_CHILDREN], [
502 LB_CHECK_COMPILE([if 'struct nsproxy' has 'pid_ns_for_children'],
503 pid_ns_for_children, [
504 #include <linux/nsproxy.h>
507 ns.pid_ns_for_children = NULL;
509 AC_DEFINE(HAVE_PID_NS_FOR_CHILDREN, 1,
510 ['struct nsproxy' has 'pid_ns_for_children'])
512 ]) # LC_PID_NS_FOR_CHILDREN
515 # LC_OLDSIZE_TRUNCATE_PAGECACHE
517 # 3.12 truncate_pagecache without oldsize parameter
519 AC_DEFUN([LC_OLDSIZE_TRUNCATE_PAGECACHE], [
520 LB_CHECK_COMPILE([if 'truncate_pagecache' with 'old_size' parameter],
521 truncate_pagecache_old_size, [
522 #include <linux/mm.h>
524 truncate_pagecache(NULL, 0, 0);
526 AC_DEFINE(HAVE_OLDSIZE_TRUNCATE_PAGECACHE, 1,
529 ]) # LC_OLDSIZE_TRUNCATE_PAGECACHE
534 # For some reason SLES11SP4 is missing the PTR_ERR_OR_ZERO macro
535 # It was added to linux kernel 3.12
537 AC_DEFUN([LC_PTR_ERR_OR_ZERO_MISSING], [
538 LB_CHECK_COMPILE([if 'PTR_ERR_OR_ZERO' is missing],
540 #include <linux/err.h>
542 if (PTR_ERR_OR_ZERO(NULL)) return 0;
544 AC_DEFINE(HAVE_PTR_ERR_OR_ZERO, 1,
545 ['PTR_ERR_OR_ZERO' exist])
547 ]) # LC_PTR_ERR_OR_ZERO_MISSING
550 # LC_HAVE_DENTRY_D_U_D_ALIAS
552 # 3.11 kernel moved d_alias to the union d_u in struct dentry
554 # Some distros move d_alias to d_u but it is still a struct list
556 AC_DEFUN([LC_HAVE_DENTRY_D_U_D_ALIAS], [
557 AS_IF([test "x$lb_cv_compile_i_dentry_d_alias_list" = xyes], [
558 LB_CHECK_COMPILE([if list 'dentry.d_u.d_alias' exist],
560 #include <linux/list.h>
561 #include <linux/dcache.h>
564 INIT_LIST_HEAD(&de.d_u.d_alias);
566 AC_DEFINE(HAVE_DENTRY_D_U_D_ALIAS, 1,
567 [list dentry.d_u.d_alias exist])
570 LB_CHECK_COMPILE([if hlist 'dentry.d_u.d_alias' exist],
572 #include <linux/list.h>
573 #include <linux/dcache.h>
576 INIT_HLIST_NODE(&de.d_u.d_alias);
578 AC_DEFINE(HAVE_DENTRY_D_U_D_ALIAS, 1,
579 [hlist dentry.d_u.d_alias exist])
582 ]) # LC_HAVE_DENTRY_D_U_D_ALIAS
585 # LC_HAVE_DENTRY_D_CHILD
587 # 3.11 kernel d_child has been moved out of the union d_u
590 AC_DEFUN([LC_HAVE_DENTRY_D_CHILD], [
591 LB_CHECK_COMPILE([if 'dentry.d_child' exist],
593 #include <linux/list.h>
594 #include <linux/dcache.h>
597 INIT_LIST_HEAD(&de.d_child);
599 AC_DEFINE(HAVE_DENTRY_D_CHILD, 1,
600 [dentry.d_child exist])
602 ]) # LC_HAVE_DENTRY_D_CHILD
607 # 3.12 ki_left removed from struct kiocb
609 AC_DEFUN([LC_KIOCB_KI_LEFT], [
610 LB_CHECK_COMPILE([if 'struct kiocb' with 'ki_left' member],
612 #include <linux/aio.h>
614 ((struct kiocb*)0)->ki_left = 0;
616 AC_DEFINE(HAVE_KIOCB_KI_LEFT, 1,
619 ]) # LC_KIOCB_KI_LEFT
622 # LC_VFS_RENAME_5ARGS
624 # 3.13 has vfs_rename with 5 args
626 AC_DEFUN([LC_VFS_RENAME_5ARGS], [
627 LB_CHECK_COMPILE([if Linux kernel has 'vfs_rename' with 5 args],
629 #include <linux/fs.h>
631 vfs_rename(NULL, NULL, NULL, NULL, NULL);
633 AC_DEFINE(HAVE_VFS_RENAME_5ARGS, 1,
634 [kernel has vfs_rename with 5 args])
636 ]) # LC_VFS_RENAME_5ARGS
639 # LC_VFS_UNLINK_3ARGS
641 # 3.13 has vfs_unlink with 3 args
643 AC_DEFUN([LC_VFS_UNLINK_3ARGS], [
644 LB_CHECK_COMPILE([if Linux kernel has 'vfs_unlink' with 3 args],
646 #include <linux/fs.h>
648 vfs_unlink(NULL, NULL, NULL);
650 AC_DEFINE(HAVE_VFS_UNLINK_3ARGS, 1,
651 [kernel has vfs_unlink with 3 args])
653 ]) # LC_VFS_UNLINK_3ARGS
655 # LC_HAVE_D_IS_POSITIVE
657 # Kernel version 3.13 b18825a7c8e37a7cf6abb97a12a6ad71af160de7
658 # d_is_positive is added
660 AC_DEFUN([LC_HAVE_D_IS_POSITIVE], [
661 LB_CHECK_COMPILE([if 'd_is_positive' exist],
663 #include <linux/dcache.h>
667 AC_DEFINE(HAVE_D_IS_POSITIVE, 1,
668 ['d_is_positive' is available])
670 ]) # LC_HAVE_D_IS_POSITIVE
675 # 3.14 move some of its data in struct bio into the new
678 AC_DEFUN([LC_HAVE_BVEC_ITER], [
679 LB_CHECK_COMPILE([if Linux kernel has struct bvec_iter],
681 #include <linux/bio.h>
683 struct bvec_iter iter;
685 iter.bi_bvec_done = 0;
687 AC_DEFINE(HAVE_BVEC_ITER, 1,
688 [kernel has struct bvec_iter])
690 ]) # LC_HAVE_BVEC_ITER
695 # 3.14 adds set_acl method to inode_operations
696 # see kernel commit 893d46e443346370cd4ea81d9d35f72952c62a37
698 AC_DEFUN([LC_IOP_SET_ACL], [
699 LB_CHECK_COMPILE([if 'inode_operations' has '.set_acl' member function],
701 #include <linux/fs.h>
703 struct inode_operations iop;
706 AC_DEFINE(HAVE_IOP_SET_ACL, 1,
707 [inode_operations has .set_acl member function])
712 # LC_HAVE_TRUNCATE_IPAGE_FINAL
714 # 3.14 bring truncate_inode_pages_final for evict_inode
716 AC_DEFUN([LC_HAVE_TRUNCATE_IPAGES_FINAL], [
717 LB_CHECK_COMPILE([if Linux kernel has truncate_inode_pages_final],
718 truncate_ipages_final, [
719 #include <linux/mm.h>
721 truncate_inode_pages_final(NULL);
723 AC_DEFINE(HAVE_TRUNCATE_INODE_PAGES_FINAL, 1,
724 [kernel has truncate_inode_pages_final])
726 ]) # LC_HAVE_TRUNCATE_IPAGES_FINAL
729 # LC_IOPS_RENAME_WITH_FLAGS
731 # 3.14 has inode_operations->rename with 5 args
732 # commit 520c8b16505236fc82daa352e6c5e73cd9870cff
734 AC_DEFUN([LC_IOPS_RENAME_WITH_FLAGS], [
735 LB_CHECK_COMPILE([if 'inode_operations->rename' taken flags as argument],
736 iops_rename_with_flags, [
737 #include <linux/fs.h>
739 struct inode *i1 = NULL, *i2 = NULL;
740 struct dentry *d1 = NULL, *d2 = NULL;
742 rc = ((struct inode_operations *)0)->rename(i1, d1, i2, d2, 0);
744 AC_DEFINE(HAVE_IOPS_RENAME_WITH_FLAGS, 1,
745 [inode_operations->rename need flags as argument])
747 ]) # LC_IOPS_RENAME_WITH_FLAGS
750 # LC_VFS_RENAME_6ARGS
752 # 3.15 has vfs_rename with 6 args
754 AC_DEFUN([LC_VFS_RENAME_6ARGS], [
755 LB_CHECK_COMPILE([if Linux kernel has 'vfs_rename' with 6 args],
757 #include <linux/fs.h>
759 vfs_rename(NULL, NULL, NULL, NULL, NULL, NULL);
761 AC_DEFINE(HAVE_VFS_RENAME_6ARGS, 1,
762 [kernel has vfs_rename with 6 args])
764 ]) # LC_VFS_RENAME_6ARGS
767 # LC_DIRECTIO_USE_ITER
769 # 3.16 kernel changes direct IO to use iov_iter
771 AC_DEFUN([LC_DIRECTIO_USE_ITER], [
772 LB_CHECK_COMPILE([if direct IO uses iov_iter],
774 #include <linux/fs.h>
776 struct address_space_operations ops = { };
777 struct iov_iter *iter = NULL;
780 ops.direct_IO(0, NULL, iter, offset);
782 AC_DEFINE(HAVE_DIRECTIO_ITER, 1,
783 [direct IO uses iov_iter])
785 ]) # LC_DIRECTIO_USE_ITER
788 # LC_HAVE_IOV_ITER_INIT_DIRECTION
791 # 3.16 linux commit 71d8e532b1549a478e6a6a8a44f309d050294d00
792 # changed iov_iter_init api to start accepting a tag
793 # that defines if its a read or write operation
795 AC_DEFUN([LC_HAVE_IOV_ITER_INIT_DIRECTION], [
796 tmp_flags="$EXTRA_KCFLAGS"
797 EXTRA_KCFLAGS="-Werror"
798 LB_CHECK_COMPILE([if 'iov_iter_init' takes a tag],
800 #include <linux/uio.h>
801 #include <linux/fs.h>
803 const struct iovec *iov = NULL;
805 iov_iter_init(NULL, READ, iov, 1, 0);
807 AC_DEFINE(HAVE_IOV_ITER_INIT_DIRECTION, 1,
808 [iov_iter_init handles directional tag])
810 EXTRA_KCFLAGS="$tmp_flags"
811 ]) # LC_HAVE_IOV_ITER_INIT_DIRECTION
814 # LC_HAVE_IOV_ITER_TRUNCATE
817 # 3.16 introduces a new API iov_iter_truncate()
819 AC_DEFUN([LC_HAVE_IOV_ITER_TRUNCATE], [
820 tmp_flags="$EXTRA_KCFLAGS"
821 EXTRA_KCFLAGS="-Werror"
822 LB_CHECK_COMPILE([if 'iov_iter_truncate' exists ],
824 #include <linux/uio.h>
825 #include <linux/fs.h>
827 struct iov_iter *i = NULL;
829 iov_iter_truncate(i, 0);
831 AC_DEFINE(HAVE_IOV_ITER_TRUNCATE, 1, [iov_iter_truncate exists])
833 EXTRA_KCFLAGS="$tmp_flags"
834 ]) # LC_HAVE_IOV_ITER_TRUNCATE
837 # LC_HAVE_FILE_OPERATIONS_READ_WRITE_ITER
839 # 3.16 introduces [read|write]_iter to struct file_operations
841 AC_DEFUN([LC_HAVE_FILE_OPERATIONS_READ_WRITE_ITER], [
842 LB_CHECK_COMPILE([if 'file_operations.[read|write]_iter' exist],
843 file_function_iter, [
844 #include <linux/fs.h>
846 ((struct file_operations *)NULL)->read_iter(NULL, NULL);
847 ((struct file_operations *)NULL)->write_iter(NULL, NULL);
849 AC_DEFINE(HAVE_FILE_OPERATIONS_READ_WRITE_ITER, 1,
850 [file_operations.[read|write]_iter functions exist])
852 ]) # LC_HAVE_FILE_OPERATIONS_READ_WRITE_ITER
855 # LC_HAVE_INTERVAL_BLK_INTEGRITY
857 # 3.17 replace sector_size with interval in struct blk_integrity
859 AC_DEFUN([LC_HAVE_INTERVAL_BLK_INTEGRITY], [
860 LB_CHECK_COMPILE([if 'blk_integrity.interval' exist],
861 interval_blk_integrity, [
862 #include <linux/blkdev.h>
864 ((struct blk_integrity *)0)->interval = 0;
866 AC_DEFINE(HAVE_INTERVAL_BLK_INTEGRITY, 1,
867 [blk_integrity.interval exist])
869 ]) # LC_HAVE_INTERVAL_BLK_INTEGRITY
874 # 3.17 replaces key_type::match with match_preparse
875 # and has new struct key_match_data
877 AC_DEFUN([LC_KEY_MATCH_DATA], [
878 LB_CHECK_COMPILE([if struct key_match field exist],
880 #include <linux/key-type.h>
882 struct key_match_data data;
884 data.raw_data = NULL;
886 AC_DEFINE(HAVE_KEY_MATCH_DATA, 1,
887 [struct key_match_data exist])
889 ]) # LC_KEY_MATCH_DATA
892 # LC_NFS_FILLDIR_USE_CTX
894 # 3.18 kernel moved from void cookie to struct dir_context
896 AC_DEFUN([LC_NFS_FILLDIR_USE_CTX], [
897 tmp_flags="$EXTRA_KCFLAGS"
898 EXTRA_KCFLAGS="-Werror"
899 LB_CHECK_COMPILE([if filldir_t uses struct dir_context],
901 #include <linux/fs.h>
903 int filldir(struct dir_context *ctx, const char* name,
904 int i, loff_t off, u64 tmp, unsigned temp)
909 struct dir_context ctx = {
913 ctx.actor(NULL, "test", 0, (loff_t) 0, 0, 0);
915 AC_DEFINE(HAVE_FILLDIR_USE_CTX, 1,
916 [filldir_t needs struct dir_context as argument])
918 EXTRA_KCFLAGS="$tmp_flags"
919 ]) # LC_NFS_FILLDIR_USE_CTX
922 # LC_PERCPU_COUNTER_INIT
924 # 3.18 For kernels 3.18 and after percpu_counter_init starts
925 # to pass a GFP_* memory allocation flag for internal
926 # memory allocation purposes.
928 AC_DEFUN([LC_PERCPU_COUNTER_INIT], [
929 LB_CHECK_COMPILE([if percpu_counter_init uses GFP_* flag as argument],
930 percpu_counter_init, [
931 #include <linux/percpu_counter.h>
933 percpu_counter_init(NULL, 0, GFP_KERNEL);
935 AC_DEFINE(HAVE_PERCPU_COUNTER_INIT_GFP_FLAG, 1,
936 [percpu_counter_init uses GFP_* flag])
938 ]) # LC_PERCPU_COUNTER_INIT
941 # LC_KIOCB_HAS_NBYTES
943 # 3.19 kernel removed ki_nbytes from struct kiocb
945 AC_DEFUN([LC_KIOCB_HAS_NBYTES], [
946 LB_CHECK_COMPILE([if struct kiocb has ki_nbytes field],
948 #include <linux/fs.h>
950 struct kiocb iocb = { };
954 AC_DEFINE(HAVE_KI_NBYTES, 1, [ki_nbytes field exist])
956 ]) # LC_KIOCB_HAS_NBYTES
959 # LC_HAVE_DQUOT_QC_DQBLK
961 # 3.19 has quotactl_ops->[sg]et_dqblk that take struct kqid and qc_dqblk
962 # Added in commit 14bf61ffe
964 AC_DEFUN([LC_HAVE_DQUOT_QC_DQBLK], [
965 tmp_flags="$EXTRA_KCFLAGS"
966 EXTRA_KCFLAGS="-Werror"
967 LB_CHECK_COMPILE([if 'quotactl_ops.set_dqblk' takes struct qc_dqblk],
969 #include <linux/fs.h>
970 #include <linux/quota.h>
972 ((struct quotactl_ops *)0)->set_dqblk(NULL, *((struct kqid*)0), (struct qc_dqblk*)0);
974 AC_DEFINE(HAVE_DQUOT_QC_DQBLK, 1,
975 [quotactl_ops.set_dqblk takes struct qc_dqblk])
976 AC_DEFINE(HAVE_DQUOT_KQID, 1,
977 [quotactl_ops.set_dqblk takes struct kqid])
979 EXTRA_KCFLAGS="$tmp_flags"
980 ]) # LC_HAVE_DQUOT_QC_DQBLK
983 # LC_HAVE_AIO_COMPLETE
985 # 3.19 kernel makes aio_complete() static
987 AC_DEFUN([LC_HAVE_AIO_COMPLETE], [
988 LB_CHECK_COMPILE([if kernel has exported aio_complete() ],
990 #include <linux/aio.h>
992 aio_complete(NULL, 0, 0);
994 AC_DEFINE(HAVE_AIO_COMPLETE, 1, [aio_complete defined])
996 ]) # LC_HAVE_AIO_COMPLETE
999 # LC_BACKING_DEV_INFO_REMOVAL
1001 # 3.20 kernel removed backing_dev_info from address_space
1003 AC_DEFUN([LC_BACKING_DEV_INFO_REMOVAL], [
1004 LB_CHECK_COMPILE([if struct address_space has backing_dev_info],
1006 #include <linux/fs.h>
1008 struct address_space mapping;
1010 mapping.backing_dev_info = NULL;
1012 AC_DEFINE(HAVE_BACKING_DEV_INFO, 1, [backing_dev_info exist])
1014 ]) # LC_BACKING_DEV_INFO_REMOVAL
1017 # LC_HAVE_BDI_CAP_MAP_COPY
1019 # 3.20 removed mmap handling for backing devices since
1020 # it breaks on non-MMU systems. See kernel commit
1021 # b4caecd48005fbed3949dde6c1cb233142fd69e9
1023 AC_DEFUN([LC_HAVE_BDI_CAP_MAP_COPY], [
1024 LB_CHECK_COMPILE([if have 'BDI_CAP_MAP_COPY'],
1026 #include <linux/backing-dev.h>
1028 struct backing_dev_info info;
1030 info.capabilities = BDI_CAP_MAP_COPY;
1032 AC_DEFINE(HAVE_BDI_CAP_MAP_COPY, 1,
1033 [BDI_CAP_MAP_COPY exist])
1035 ]) # LC_HAVE_BDI_CAP_MAP_COPY
1040 # 4.1 kernel has iov_iter_rw
1042 AC_DEFUN([LC_IOV_ITER_RW], [
1043 LB_CHECK_COMPILE([if iov_iter_rw exist],
1045 #include <linux/fs.h>
1046 #include <linux/uio.h>
1048 struct iov_iter *iter = NULL;
1052 AC_DEFINE(HAVE_IOV_ITER_RW, 1,
1053 [iov_iter_rw exist])
1058 # LC_HAVE_SYNC_READ_WRITE
1060 # 4.1 new_sync_[read|write] no longer exported
1062 AC_DEFUN([LC_HAVE_SYNC_READ_WRITE], [
1063 LB_CHECK_EXPORT([new_sync_read], [fs/read_write.c],
1064 [AC_DEFINE(HAVE_SYNC_READ_WRITE, 1,
1065 [new_sync_[read|write] is exported by the kernel])])
1066 ]) # LC_HAVE_SYNC_READ_WRITE
1071 # 4.1 redefined bi_cnt as __bi_cnt in commit dac56212e8127dbc0
1073 AC_DEFUN([LC_HAVE___BI_CNT], [
1074 LB_CHECK_COMPILE([if Linux kernel has __bi_cnt in struct bio],
1076 #include <asm/atomic.h>
1077 #include <linux/bio.h>
1078 #include <linux/blk_types.h>
1080 struct bio bio = { };
1082 cnt = atomic_read(&bio.__bi_cnt);
1084 AC_DEFINE(HAVE___BI_CNT, 1,
1085 [struct bio has __bi_cnt])
1087 ]) # LC_HAVE___BI_CNT
1090 # LC_SYMLINK_OPS_USE_NAMEIDATA
1092 # For the 4.2+ kernels the file system internal symlink api no
1093 # longer uses struct nameidata as a argument
1095 AC_DEFUN([LC_SYMLINK_OPS_USE_NAMEIDATA], [
1096 LB_CHECK_COMPILE([if symlink inode operations have struct nameidata argument],
1097 symlink_use_nameidata, [
1098 #include <linux/namei.h>
1099 #include <linux/fs.h>
1101 struct nameidata *nd = NULL;
1103 ((struct inode_operations *)0)->follow_link(NULL, nd);
1104 ((struct inode_operations *)0)->put_link(NULL, nd, NULL);
1106 AC_DEFINE(HAVE_SYMLINK_OPS_USE_NAMEIDATA, 1,
1107 [symlink inode operations need struct nameidata argument])
1109 ]) # LC_SYMLINK_OPS_USE_NAMEIDATA
1112 # LC_BIO_ENDIO_USES_ONE_ARG
1114 # 4.2 kernel bio_endio now only takes one argument
1116 AC_DEFUN([LC_BIO_ENDIO_USES_ONE_ARG], [
1117 LB_CHECK_COMPILE([if 'bio_endio' with one argument exist],
1119 #include <linux/bio.h>
1123 AC_DEFINE(HAVE_BIO_ENDIO_USES_ONE_ARG, 1,
1124 [bio_endio takes only one argument])
1126 ]) # LC_BIO_ENDIO_USES_ONE_ARG
1129 # LC_ACCOUNT_PAGE_DIRTIED_3ARGS
1131 # 4.2 [to 4.5] kernel page dirtied takes 3 arguments
1133 AC_DEFUN([LC_ACCOUNT_PAGE_DIRTIED_3ARGS], [
1134 LB_CHECK_COMPILE([if 'account_page_dirtied' with 3 args exists],
1135 account_page_dirtied, [
1136 #include <linux/mm.h>
1138 account_page_dirtied(NULL, NULL, NULL);
1140 AC_DEFINE(HAVE_ACCOUNT_PAGE_DIRTIED_3ARGS, 1,
1141 [account_page_dirtied takes three arguments])
1143 ]) # LC_ACCOUNT_PAGE_DIRTIED_3ARGS
1146 # LC_HAVE_CRYPTO_ALLOC_SKCIPHER
1148 # Kernel version 4.12 commit 7a7ffe65c8c5
1149 # introduced crypto_alloc_skcipher().
1151 AC_DEFUN([LC_HAVE_CRYPTO_ALLOC_SKCIPHER], [
1152 LB_CHECK_COMPILE([if crypto_alloc_skcipher is defined],
1153 crypto_alloc_skcipher, [
1154 #include <crypto/skcipher.h>
1156 crypto_alloc_skcipher(NULL, 0, 0);
1158 AC_DEFINE(HAVE_CRYPTO_ALLOC_SKCIPHER, 1,
1159 [crypto_alloc_skcipher is defined])
1161 ]) # LC_HAVE_CRYPTO_ALLOC_SKCIPHER
1164 # LC_HAVE_INTERVAL_EXP_BLK_INTEGRITY
1166 # 4.3 replace interval with interval_exp in 'struct blk_integrity'
1167 # 'struct blk_integrity_profile' is also added in this version,
1168 # thus use this to determine whether 'struct blk_integrity' has profile
1170 AC_DEFUN([LC_HAVE_INTERVAL_EXP_BLK_INTEGRITY], [
1171 LB_CHECK_COMPILE([if 'blk_integrity.interval_exp' exist],
1172 blk_integrity_interval_exp, [
1173 #include <linux/blkdev.h>
1175 ((struct blk_integrity *)0)->interval_exp = 0;
1177 AC_DEFINE(HAVE_INTERVAL_EXP_BLK_INTEGRITY, 1,
1178 [blk_integrity.interval_exp exist])
1180 ]) # LC_HAVE_INTERVAL_EXP_BLK_INTEGRITY
1183 # LC_HAVE_CACHE_HEAD_HLIST
1185 # 4.3 kernel swiched to hlist for cache_head
1187 AC_DEFUN([LC_HAVE_CACHE_HEAD_HLIST], [
1188 LB_CHECK_COMPILE([if 'struct cache_head' has 'cache_list' field],
1189 cache_head_has_hlist, [
1190 #include <linux/sunrpc/cache.h>
1192 do {} while(sizeof(((struct cache_head *)0)->cache_list));
1194 AC_DEFINE(HAVE_CACHE_HEAD_HLIST, 1,
1195 [cache_head has hlist cache_list])
1197 ]) # LC_HAVE_CACHE_HEAD_HLIST
1200 # LC_HAVE_XATTR_HANDLER_SIMPLIFIED
1202 # Kernel version 4.3 commit e409de992e3ea3674393465f07cc71c948edd87a
1203 # simplified xattr_handler handling by passing in the handler pointer
1205 AC_DEFUN([LC_HAVE_XATTR_HANDLER_SIMPLIFIED], [
1206 tmp_flags="$EXTRA_KCFLAGS"
1207 EXTRA_KCFLAGS="-Werror"
1208 LB_CHECK_COMPILE([if 'struct xattr_handler' functions pass in handler pointer],
1209 xattr_handler_simplified, [
1210 #include <linux/xattr.h>
1212 struct xattr_handler handler;
1214 ((struct xattr_handler *)0)->get(&handler, NULL, NULL, NULL, 0);
1215 ((struct xattr_handler *)0)->set(&handler, NULL, NULL, NULL, 0, 0);
1217 AC_DEFINE(HAVE_XATTR_HANDLER_SIMPLIFIED, 1, [handler pointer is parameter])
1219 EXTRA_KCFLAGS="$tmp_flags"
1220 ]) # LC_HAVE_XATTR_HANDLER_SIMPLIFIED
1223 # LC_HAVE_BIP_ITER_BIO_INTEGRITY_PAYLOAD
1225 # 4.3 replace interval with interval_exp in 'struct blk_integrity'.
1227 AC_DEFUN([LC_HAVE_BIP_ITER_BIO_INTEGRITY_PAYLOAD], [
1228 LB_CHECK_COMPILE([if 'bio_integrity_payload.bip_iter' exist],
1229 bio_integrity_payload_bip_iter, [
1230 #include <linux/bio.h>
1232 ((struct bio_integrity_payload *)0)->bip_iter.bi_size = 0;
1234 AC_DEFINE(HAVE_BIP_ITER_BIO_INTEGRITY_PAYLOAD, 1,
1235 [bio_integrity_payload.bip_iter exist])
1237 ]) # LC_HAVE_BIP_ITER_BIO_INTEGRITY_PAYLOAD
1240 # LC_BIO_INTEGRITY_PREP_FN
1242 # Lustre kernel patch extents bio_integrity_prep to accept optional
1243 # generate/verify_fn as extra args.
1245 AC_DEFUN([LC_BIO_INTEGRITY_PREP_FN], [
1246 LB_CHECK_COMPILE([if 'bio_integrity_prep_fn' exists],
1247 bio_integrity_prep_fn, [
1248 #include <linux/bio.h>
1250 bio_integrity_prep_fn(NULL, NULL, NULL);
1252 AC_DEFINE(HAVE_BIO_INTEGRITY_PREP_FN, 1,
1253 [kernel has bio_integrity_prep_fn])
1254 AC_SUBST(PATCHED_INTEGRITY_INTF)
1256 AC_SUBST(PATCHED_INTEGRITY_INTF, [#])
1258 ]) # LC_BIO_INTEGRITY_PREP_FN
1263 # 4.4/4.8 redefined bi_rw as bi_opf (SLES12/kernel commit 4382e33ad37486)
1265 AC_DEFUN([LC_HAVE_BI_OPF], [
1266 LB_CHECK_COMPILE([if Linux kernel has bi_opf in struct bio],
1268 #include <linux/bio.h>
1274 AC_DEFINE(HAVE_BI_OPF, 1,
1275 [struct bio has bi_opf])
1280 # LC_HAVE_SUBMIT_BIO_2ARGS
1282 # 4.4 removed an argument from submit_bio
1284 AC_DEFUN([LC_HAVE_SUBMIT_BIO_2ARGS], [
1285 LB_CHECK_COMPILE([if submit_bio takes two arguments],
1286 have_submit_bio_2args, [
1287 #include <linux/bio.h>
1290 submit_bio(READ, &bio);
1292 AC_DEFINE(HAVE_SUBMIT_BIO_2ARGS, 1,
1293 [submit_bio takes two arguments])
1295 ]) # LC_HAVE_SUBMIT_BIO_2_ARGS
1298 # LC_HAVE_CLEAN_BDEV_ALIASES
1300 # 4.4/4.9 unmap_underlying_metadata was replaced by clean_bdev_aliases
1301 # (SLES12/kernel commit 29f3ad7d8380364c)
1303 AC_DEFUN([LC_HAVE_CLEAN_BDEV_ALIASES], [
1304 LB_CHECK_COMPILE([if kernel has clean_bdev_aliases],
1305 have_clean_bdev_aliases, [
1306 #include <linux/buffer_head.h>
1308 clean_bdev_aliases(NULL,1,1);
1310 AC_DEFINE(HAVE_CLEAN_BDEV_ALIASES, 1,
1311 [kernel has clean_bdev_aliases])
1313 ]) # LC_HAVE_CLEAN_BDEV_ALIASES
1316 # LC_HAVE_LOCKS_LOCK_FILE_WAIT
1318 # 4.4 kernel have moved locks API users to
1319 # locks_lock_inode_wait()
1321 AC_DEFUN([LC_HAVE_LOCKS_LOCK_FILE_WAIT], [
1322 LB_CHECK_COMPILE([if 'locks_lock_file_wait' exists],
1323 locks_lock_file_wait, [
1324 #include <linux/fs.h>
1326 locks_lock_file_wait(NULL, NULL);
1328 AC_DEFINE(HAVE_LOCKS_LOCK_FILE_WAIT, 1,
1329 [kernel has locks_lock_file_wait])
1331 ]) # LC_HAVE_LOCKS_LOCK_FILE_WAIT
1334 # LC_HAVE_KEY_PAYLOAD_DATA_ARRAY
1336 # 4.4 kernel merged type-specific data with the payload data for keys
1338 AC_DEFUN([LC_HAVE_KEY_PAYLOAD_DATA_ARRAY], [
1339 LB_CHECK_COMPILE([if 'struct key' has 'payload.data' as an array],
1340 key_payload_data_array, [
1341 #include <linux/key.h>
1343 struct key key = { };
1345 key.payload.data[0] = NULL;
1347 AC_DEFINE(HAVE_KEY_PAYLOAD_DATA_ARRAY, 1, [payload.data is an array])
1349 ]) #LC_HAVE_KEY_PAYLOAD_DATA_ARRAY
1352 # LC_HAVE_XATTR_HANDLER_NAME
1354 # Kernel version 4.4 commit 98e9cb5711c68223f0e4d5201b9a6add255ec550
1355 # add a name member to struct xattr_handler
1357 AC_DEFUN([LC_HAVE_XATTR_HANDLER_NAME], [
1358 tmp_flags="$EXTRA_KCFLAGS"
1359 EXTRA_KCFLAGS="-Werror"
1360 LB_CHECK_COMPILE([if 'struct xattr_handler' has a name member],
1361 xattr_handler_name, [
1362 #include <linux/xattr.h>
1364 ((struct xattr_handler *)NULL)->name = NULL;
1366 AC_DEFINE(HAVE_XATTR_HANDLER_NAME, 1, [xattr_handler has a name member])
1368 EXTRA_KCFLAGS="$tmp_flags"
1369 ]) # LC_HAVE_XATTR_HANDLER_NAME
1372 # LC_HAVE_FILE_DENTRY
1374 # 4.5 adds wrapper file_dentry
1376 AC_DEFUN([LC_HAVE_FILE_DENTRY], [
1377 LB_CHECK_COMPILE([if Linux kernel has 'file_dentry'],
1379 #include <linux/fs.h>
1383 AC_DEFINE(HAVE_FILE_DENTRY, 1,
1384 [kernel has file_dentry])
1386 ]) # LC_HAVE_FILE_DENTRY
1389 # LC_HAVE_INODE_LOCK
1391 # 4.5 introduced inode_lock
1393 AC_DEFUN([LC_HAVE_INODE_LOCK], [
1394 LB_CHECK_COMPILE([if 'inode_lock' is defined],
1396 #include <linux/fs.h>
1400 AC_DEFINE(HAVE_INODE_LOCK, 1,
1401 [inode_lock is defined])
1403 ]) # LC_HAVE_INODE_LOCK
1406 # LC_HAVE_IOP_GET_LINK
1408 # 4.5 vfs replaced iop->follow_link with
1411 AC_DEFUN([LC_HAVE_IOP_GET_LINK], [
1412 LB_CHECK_COMPILE([if 'iop' has 'get_link'],
1413 inode_ops_get_link, [
1414 #include <linux/fs.h>
1416 struct inode_operations iop;
1417 iop.get_link = NULL;
1419 AC_DEFINE(HAVE_IOP_GET_LINK, 1,
1420 [have iop get_link])
1422 ]) # LC_HAVE_IOP_GET_LINK
1425 # LC_HAVE_IN_COMPAT_SYSCALL
1427 # 4.6 renamed is_compat_task to in_compat_syscall
1429 AC_DEFUN([LC_HAVE_IN_COMPAT_SYSCALL], [
1430 LB_CHECK_COMPILE([if 'in_compat_syscall' is defined],
1431 in_compat_syscall, [
1432 #include <linux/compat.h>
1434 in_compat_syscall();
1436 AC_DEFINE(HAVE_IN_COMPAT_SYSCALL, 1,
1437 [have in_compat_syscall])
1439 ]) # LC_HAVE_IN_COMPAT_SYSCALL
1442 # LC_HAVE_XATTR_HANDLER_INODE_PARAM
1444 # Kernel version 4.6 commit b296821a7c42fa58baa17513b2b7b30ae66f3336
1445 # and commit 5930122683dff58f0846b0f0405b4bd598a3ba6a added inode parameter
1446 # to xattr_handler functions
1448 AC_DEFUN([LC_HAVE_XATTR_HANDLER_INODE_PARAM], [
1449 tmp_flags="$EXTRA_KCFLAGS"
1450 EXTRA_KCFLAGS="-Werror"
1451 LB_CHECK_COMPILE([if 'struct xattr_handler' functions have inode parameter],
1452 xattr_handler_inode_param, [
1453 #include <linux/xattr.h>
1455 const struct xattr_handler handler;
1457 ((struct xattr_handler *)0)->get(&handler, NULL, NULL, NULL, NULL, 0);
1458 ((struct xattr_handler *)0)->set(&handler, NULL, NULL, NULL, NULL, 0, 0);
1460 AC_DEFINE(HAVE_XATTR_HANDLER_INODE_PARAM, 1, [needs inode parameter])
1462 EXTRA_KCFLAGS="$tmp_flags"
1463 ]) # LC_HAVE_XATTR_HANDLER_INODE_PARAM
1468 # Kernel version 4.6 commit 85c7f81041d57cfe9dc97f4680d5586b54534a39
1469 # introduced parallel lookups in the VFS layer. The inline function
1470 # d_in_lookup was added to notify when the same item was being queried
1473 AC_DEFUN([LC_D_IN_LOOKUP], [
1474 tmp_flags="$EXTRA_KCFLAGS"
1475 EXTRA_KCFLAGS="-Werror"
1476 LB_CHECK_COMPILE([if 'd_in_lookup' is defined],
1478 #include <linux/dcache.h>
1482 AC_DEFINE(HAVE_D_IN_LOOKUP, 1, [d_in_lookup is defined])
1484 EXTRA_KCFLAGS="$tmp_flags"
1488 # LC_LOCK_PAGE_MEMCG
1490 # Kernel version 4.6 adds lock_page_memcg
1492 AC_DEFUN([LC_LOCK_PAGE_MEMCG], [
1493 LB_CHECK_COMPILE([if 'lock_page_memcg' is defined],
1495 #include <linux/memcontrol.h>
1497 lock_page_memcg(NULL);
1499 AC_DEFINE(HAVE_LOCK_PAGE_MEMCG, 1,
1500 [lock_page_memcg is defined])
1502 ]) # LC_LOCK_PAGE_MEMCG
1507 # Kernel version 4.7 commit c8b8e32d700fe943a935e435ae251364d016c497
1508 # direct-io: eliminate the offset argument to ->direct_IO
1510 AC_DEFUN([LC_DIRECTIO_2ARGS], [
1511 LB_CHECK_COMPILE([if '->direct_IO()' taken 2 arguments],
1513 #include <linux/fs.h>
1515 struct address_space_operations ops = { };
1516 struct iov_iter *iter = NULL;
1517 struct kiocb *iocb = NULL;
1520 rc = ops.direct_IO(iocb, iter);
1522 AC_DEFINE(HAVE_DIRECTIO_2ARGS, 1,
1523 [direct_IO need 2 arguments])
1525 ]) # LC_DIRECTIO_2ARGS
1528 # LC_GENERIC_WRITE_SYNC_2ARGS
1530 # Kernel version 4.7 commit dde0c2e79848298cc25621ad080d47f94dbd7cce
1531 # fs: add IOCB_SYNC and IOCB_DSYNC
1533 AC_DEFUN([LC_GENERIC_WRITE_SYNC_2ARGS], [
1534 LB_CHECK_COMPILE([if 'generic_write_sync()' taken 2 arguments],
1535 generic_write_sync_2args, [
1536 #include <linux/fs.h>
1538 struct kiocb *iocb = NULL;
1541 rc = generic_write_sync(iocb, 0);
1543 AC_DEFINE(HAVE_GENERIC_WRITE_SYNC_2ARGS, 1,
1544 [generic_write_sync need 2 arguments])
1546 ]) # LC_GENERIC_WRITE_SYNC_2ARGS
1549 # LC_FOP_ITERATE_SHARED
1551 # Kernel v4.6-rc3-29-g6192269 adds iterate_shared method to file_operations
1553 AC_DEFUN([LC_FOP_ITERATE_SHARED], [
1554 LB_CHECK_COMPILE([if 'file_operations' has 'iterate_shared'],
1555 fop_iterate_shared, [
1556 #include <linux/fs.h>
1558 struct file_operations fop;
1559 fop.iterate_shared = NULL;
1561 AC_DEFINE(HAVE_FOP_ITERATE_SHARED, 1,
1562 [file_operations has iterate_shared])
1564 ]) # LC_FOP_ITERATE_SHARED
1567 # LC_EXPORT_DEFAULT_FILE_SPLICE_READ
1569 # 4.8-rc8 commit 82c156f853840645604acd7c2cebcb75ed1b6652 switched
1570 # generic_file_splice_read() to using ->read_iter. We can test this
1571 # change since default_file_splice_read() is no longer exported.
1573 AC_DEFUN([LC_EXPORT_DEFAULT_FILE_SPLICE_READ], [
1574 LB_CHECK_EXPORT([default_file_splice_read], [fs/splice.c],
1575 [AC_DEFINE(HAVE_DEFAULT_FILE_SPLICE_READ_EXPORT, 1,
1576 [default_file_splice_read is exported])])
1577 ]) # LC_EXPORT_DEFAULT_FILE_SPLCE_READ
1580 # LC_HAVE_POSIX_ACL_VALID_USER_NS
1582 # 4.8 posix_acl_valid takes struct user_namespace
1584 AC_DEFUN([LC_HAVE_POSIX_ACL_VALID_USER_NS], [
1585 LB_CHECK_COMPILE([if 'posix_acl_valid' takes 'struct user_namespace'],
1587 #include <linux/fs.h>
1588 #include <linux/posix_acl.h>
1590 posix_acl_valid((struct user_namespace*)NULL, (const struct posix_acl*)NULL);
1592 AC_DEFINE(HAVE_POSIX_ACL_VALID_USER_NS, 1,
1593 [posix_acl_valid takes struct user_namespace])
1595 ]) # LC_HAVE_POSIX_ACL_VALID_USER_NS
1598 # LC_D_COMPARE_4ARGS
1600 # Kernel version 4.8 commit 6fa67e707559303e086303aeecc9e8b91ef497d5
1601 # get rid of 'parent' argument of ->d_compare()
1603 AC_DEFUN([LC_D_COMPARE_4ARGS], [
1604 LB_CHECK_COMPILE([if 'd_compare' taken 4 arguments],
1606 #include <linux/dcache.h>
1608 ((struct dentry_operations*)0)->d_compare(NULL,0,NULL,NULL);
1610 AC_DEFINE(HAVE_D_COMPARE_4ARGS, 1,
1611 [d_compare need 4 arguments])
1613 ]) # LC_D_COMPARE_4ARGS
1616 # LC_FULL_NAME_HASH_3ARGS
1618 # Kernel version 4.8 commit 8387ff2577eb9ed245df9a39947f66976c6bcd02
1619 # vfs: make the string hashes salt the hash
1621 AC_DEFUN([LC_FULL_NAME_HASH_3ARGS], [
1622 LB_CHECK_COMPILE([if 'full_name_hash' taken 3 arguments],
1623 full_name_hash_3args, [
1624 #include <linux/stringhash.h>
1627 hash = full_name_hash(NULL,NULL,0);
1629 AC_DEFINE(HAVE_FULL_NAME_HASH_3ARGS, 1,
1630 [full_name_hash need 3 arguments])
1632 ]) # LC_FULL_NAME_HASH_3ARGS
1635 # LC_STRUCT_POSIX_ACL_XATTR
1637 # Kernel version 4.8 commit 2211d5ba5c6c4e972ba6dbc912b2897425ea6621
1638 # posix_acl: xattr representation cleanups
1640 AC_DEFUN([LC_STRUCT_POSIX_ACL_XATTR], [
1641 LB_CHECK_COMPILE([if 'struct posix_acl_xattr_{header,entry}' defined],
1642 struct_posix_acl_xattr, [
1643 #include <linux/fs.h>
1644 #include <linux/posix_acl_xattr.h>
1646 struct posix_acl_xattr_header *h = NULL;
1647 struct posix_acl_xattr_entry *e;
1648 e = (void *)(h + 1);
1650 AC_DEFINE(HAVE_STRUCT_POSIX_ACL_XATTR, 1,
1651 [struct posix_acl_xattr_{header,entry} defined])
1653 ]) # LC_STRUCT_POSIX_ACL_XATTR
1658 # Kernel version 4.8 commit fd50ecaddf8372a1d96e0daeaac0f93cf04e4d42
1659 # removed {get,set,remove}xattr inode operations
1661 AC_DEFUN([LC_IOP_XATTR], [
1662 LB_CHECK_COMPILE([if 'inode_operations' has {get,set,remove}xattr members],
1664 #include <linux/fs.h>
1666 struct inode_operations iop;
1667 iop.setxattr = NULL;
1668 iop.getxattr = NULL;
1669 iop.removexattr = NULL;
1671 AC_DEFINE(HAVE_IOP_XATTR, 1,
1672 [inode_operations has {get,set,remove}xattr members])
1679 # Kernel version 4.9 commit 81243eacfa400f5f7b89f4c2323d0de9982bb0fb
1680 # cred: simpler, 1D supplementary groups
1682 AC_DEFUN([LC_GROUP_INFO_GID], [
1683 LB_CHECK_COMPILE([if 'struct group_info' has member 'gid'],
1685 #include <linux/cred.h>
1688 p = ((struct group_info *)0)->gid;
1690 AC_DEFINE(HAVE_GROUP_INFO_GID, 1,
1691 [struct group_info has member gid])
1693 ]) # LC_GROUP_INFO_GID
1698 # Kernel version 4.9 commit 5d6c31910bc0713e37628dc0ce677dcb13c8ccf4
1699 # added __vfs_{get,set,remove}xattr helpers
1701 AC_DEFUN([LC_VFS_SETXATTR], [
1702 LB_CHECK_COMPILE([if '__vfs_setxattr' helper is available],
1704 #include <linux/xattr.h>
1706 __vfs_setxattr(NULL, NULL, NULL, NULL, 0, 0);
1708 AC_DEFINE(HAVE_VFS_SETXATTR, 1,
1709 ['__vfs_setxattr is available])
1711 ]) # LC_VFS_SETXATTR
1714 # LC_POSIX_ACL_UPDATE_MODE
1716 # Kernel version 4.9 commit 073931017b49d9458aa351605b43a7e34598caef
1717 # posix_acl: Clear SGID bit when setting file permissions
1719 AC_DEFUN([LC_POSIX_ACL_UPDATE_MODE], [
1720 LB_CHECK_COMPILE([if 'posix_acl_update_mode' exists],
1721 posix_acl_update_mode, [
1722 #include <linux/fs.h>
1723 #include <linux/posix_acl.h>
1725 posix_acl_update_mode(NULL, NULL, NULL);
1727 AC_DEFINE(HAVE_POSIX_ACL_UPDATE_MODE, 1,
1728 ['posix_acl_update_mode' is available])
1730 ]) # LC_POSIX_ACL_UPDATE_MODE
1733 # LC_IOP_GENERIC_READLINK
1735 # Kernel version 4.10 commit dfeef68862edd7d4bafe68ef7aeb5f658ef24bb5
1736 # removed generic_readlink from individual file systems
1738 AC_DEFUN([LC_IOP_GENERIC_READLINK], [
1739 LB_CHECK_COMPILE([if 'generic_readlink' still exist],
1740 inode_ops_readlink, [
1741 #include <linux/fs.h>
1743 struct inode_operations iop;
1744 iop.readlink = generic_readlink;
1746 AC_DEFINE(HAVE_IOP_GENERIC_READLINK, 1,
1747 [generic_readlink has been removed])
1749 ]) # LC_IOP_GENERIC_READLINK
1752 # LC_HAVE_VM_FAULT_ADDRESS
1754 # Kernel version 4.10 commit 1a29d85eb0f19b7d8271923d8917d7b4f5540b3e
1755 # removed virtual_address field. Need to use address field instead
1757 AC_DEFUN([LC_HAVE_VM_FAULT_ADDRESS], [
1758 LB_CHECK_COMPILE([if 'struct vm_fault' replaced virtual_address with address field],
1760 #include <linux/mm.h>
1762 struct vm_fault vmf;
1765 AC_DEFINE(HAVE_VM_FAULT_ADDRESS, 1,
1766 [virtual_address has been replaced by address field])
1768 ]) # LC_HAVE_VM_FAULT_ADDRESS
1771 # LC_INODEOPS_ENHANCED_GETATTR
1773 # Kernel version 4.11 commit a528d35e8bfcc521d7cb70aaf03e1bd296c8493f
1774 # expanded getattr to be able to get more stat information.
1776 AC_DEFUN([LC_INODEOPS_ENHANCED_GETATTR], [
1777 LB_CHECK_COMPILE([if 'inode_operations' getattr member can gather advance stats],
1779 #include <linux/fs.h>
1783 ((struct inode_operations *)1)->getattr(&path, NULL, 0, 0);
1785 AC_DEFINE(HAVE_INODEOPS_ENHANCED_GETATTR, 1,
1786 [inode_operations .getattr member function can gather advance stats])
1788 ]) # LC_INODEOPS_ENHANCED_GETATTR
1791 # LC_VM_OPERATIONS_REMOVE_VMF_ARG
1793 # Kernel version 4.11 commit 11bac80004499ea59f361ef2a5516c84b6eab675
1794 # removed struct vm_area_struct as an argument for vm_operations since
1795 # in the same kernel version struct vma_area_struct was folded into
1798 AC_DEFUN([LC_VM_OPERATIONS_REMOVE_VMF_ARG], [
1799 LB_CHECK_COMPILE([if 'struct vm_operations' removed struct vm_area_struct],
1800 vm_operations_no_vm_area_struct, [
1801 #include <linux/mm.h>
1803 struct vm_fault vmf;
1805 ((struct vm_operations_struct *)0)->fault(&vmf);
1806 ((struct vm_operations_struct *)0)->page_mkwrite(&vmf);
1808 AC_DEFINE(HAVE_VM_OPS_USE_VM_FAULT_ONLY, 1,
1809 ['struct vm_operations' remove struct vm_area_struct argument])
1811 ]) # LC_VM_OPERATIONS_REMOVE_VMF_ARG
1814 # LC_HAVE_KEY_USAGE_REFCOUNT
1816 # Kernel version 4.11 commit fff292914d3a2f1efd05ca71c2ba72a3c663201e
1817 # converted key.usage from atomic_t to refcount_t.
1819 AC_DEFUN([LC_HAVE_KEY_USAGE_REFCOUNT], [
1820 LB_CHECK_COMPILE([if 'key.usage' is refcount_t],
1821 key_usage_refcount, [
1822 #include <linux/key.h>
1824 struct key key = { };
1826 refcount_read(&key.usage);
1828 AC_DEFINE(HAVE_KEY_USAGE_REFCOUNT, 1, [key.usage is of type refcount_t])
1830 ]) #LC_HAVE_KEY_USAGE_REFCOUNT
1833 # LC_HAVE_CRYPTO_MAX_ALG_NAME_128
1835 # Kernel version 4.11 commit f437a3f477cce402dbec6537b29e9e33962c9f73
1836 # switched CRYPTO_MAX_ALG_NAME from 64 to 128.
1838 AC_DEFUN([LC_HAVE_CRYPTO_MAX_ALG_NAME_128], [
1839 LB_CHECK_COMPILE([if 'CRYPTO_MAX_ALG_NAME' is 128],
1840 crypto_max_alg_name, [
1841 #include <linux/crypto.h>
1843 #if CRYPTO_MAX_ALG_NAME != 128
1847 AC_DEFINE(HAVE_CRYPTO_MAX_ALG_NAME_128, 1,
1848 ['CRYPTO_MAX_ALG_NAME' is 128])
1850 ]) # LC_HAVE_CRYPTO_MAX_ALG_NAME_128
1853 # Kernel version 4.12 commit 47f38c539e9a42344ff5a664942075bd4df93876
1854 # CURRENT_TIME is not 64 bit time safe so it was replaced with
1857 AC_DEFUN([LC_CURRENT_TIME], [
1858 LB_CHECK_COMPILE([if CURRENT_TIME has been replaced with current_time],
1860 #include <linux/fs.h>
1864 attr.ia_atime = current_time(NULL);
1866 AC_DEFINE(HAVE_CURRENT_TIME, 1,
1867 [current_time() has replaced CURRENT_TIME])
1869 ]) # LIBCFS_CURRENT_TIME
1872 # Kernel version 4.12-rc3 85787090a21eb749d8b347eaf9ff1a455637473c
1873 # changed struct super_block s_uuid into a proper uuid_t
1875 AC_DEFUN([LC_SUPER_BLOCK_S_UUID], [
1876 LB_CHECK_COMPILE([if 'struct super_block' s_uuid is uuid_t],
1877 super_block_s_uuid, [
1878 #include <linux/fs.h>
1880 struct super_block sb;
1882 uuid_parse(NULL, &sb.s_uuid);
1884 AC_DEFINE(HAVE_S_UUID_AS_UUID_T, 1, ['s_uuid' is an uuid_t])
1886 ]) # LC_SUPER_BLOCK_S_UUID
1889 # LC_SUPER_SETUP_BDI_NAME
1891 # Kernel version 4.12 commit 9594caf216dc0fe3e318b34af0127276db661241
1892 # unified bdi handling
1894 AC_DEFUN([LC_SUPER_SETUP_BDI_NAME], [
1895 LB_CHECK_COMPILE([if 'super_setup_bdi_name' exist],
1896 super_setup_bdi_name, [
1897 #include <linux/fs.h>
1899 super_setup_bdi_name(NULL, "lustre");
1901 AC_DEFINE(HAVE_SUPER_SETUP_BDI_NAME, 1,
1902 ['super_setup_bdi_name' is available])
1904 ]) # LC_SUPER_SETUP_BDI_NAME
1909 # 4.12 replace bi_error to bi_status
1911 AC_DEFUN([LC_BI_STATUS], [
1912 LB_CHECK_COMPILE([if 'bi_status' exist],
1914 #include <linux/blk_types.h>
1916 ((struct bio *)0)->bi_status = 0;
1918 AC_DEFINE(HAVE_BI_STATUS, 1,
1919 ['bi_status' is available])
1924 # LC_BIO_INTEGRITY_ENABLED
1926 # 4.13 removed bio_integrity_enabled
1928 AC_DEFUN([LC_BIO_INTEGRITY_ENABLED], [
1929 LB_CHECK_COMPILE([if 'bio_integrity_enabled' exist],
1930 bio_integrity_enabled, [
1931 #include <linux/bio.h>
1933 bio_integrity_enabled(NULL);
1935 AC_DEFINE(HAVE_BIO_INTEGRITY_ENABLED, 1,
1936 ['bio_integrity_enabled' is available])
1938 ]) # LC_BIO_INTEGRITY_ENABLED
1941 # LC_PAGEVEC_INIT_ONE_PARAM
1943 # 4.14 pagevec_init takes one parameter
1945 AC_DEFUN([LC_PAGEVEC_INIT_ONE_PARAM], [
1946 LB_CHECK_COMPILE([if 'pagevec_init' takes one parameter],
1948 #include <linux/pagevec.h>
1952 AC_DEFINE(HAVE_PAGEVEC_INIT_ONE_PARAM, 1,
1953 ['pagevec_init' takes one parameter])
1955 ]) # LC_PAGEVEC_INIT_ONE_PARAM
1960 # 4.14 replaced bi_bdev to bi_disk
1962 AC_DEFUN([LC_BI_BDEV], [
1963 LB_CHECK_COMPILE([if 'bi_bdev' exist],
1965 #include <linux/bio.h>
1967 ((struct bio *)0)->bi_bdev = NULL;
1969 AC_DEFINE(HAVE_BI_BDEV, 1,
1970 ['bi_bdev' is available])
1977 # 4.14 introduced IS_ENCRYPTED and S_ENCRYPTED
1979 AC_DEFUN([LC_IS_ENCRYPTED], [
1980 LB_CHECK_COMPILE([if IS_ENCRYPTED is defined],
1982 #include <linux/fs.h>
1984 IS_ENCRYPTED((struct inode *)0);
1986 has_is_encrypted="yes"
1988 ]) # LC_IS_ENCRYPTED
1993 # kernel 4.17 commit b93b016313b3ba8003c3b8bb71f569af91f19fc7
1995 AC_DEFUN([LC_I_PAGES], [
1996 LB_CHECK_COMPILE([if struct address_space has i_pages],
1998 #include <linux/fs.h>
2000 struct address_space mapping = {};
2003 i_pages = &mapping.i_pages;
2005 AC_DEFINE(HAVE_I_PAGES, 1,
2006 [struct address_space has i_pages])
2013 # kernel 4.17 commit 3d3539018d2cbd12e5af4a132636ee7fd8d43ef0
2014 # mm: create the new vm_fault_t type
2016 AC_DEFUN([LC_VM_FAULT_T], [
2017 LB_CHECK_COMPILE([if vm_fault_t type exists],
2019 #include <linux/mm_types.h>
2021 vm_fault_t x = VM_FAULT_SIGBUS;
2024 AC_DEFINE(HAVE_VM_FAULT_T, 1,
2025 [if vm_fault_t type exists])
2032 # kernel 4.17 commit 3d3539018d2cbd12e5af4a132636ee7fd8d43ef0
2033 # mm: VM_FAULT_RETRY is defined in enum vm_fault_reason
2035 AC_DEFUN([LC_VM_FAULT_RETRY], [
2036 LB_CHECK_COMPILE([if VM_FAULT_RETRY is defined],
2038 #include <linux/mm.h>
2040 #ifndef VM_FAULT_RETRY
2045 AC_DEFINE(HAVE_VM_FAULT_RETRY, 1,
2046 [if VM_FAULT_RETRY is defined])
2048 ]) # LC_VM_FAULT_RETRY
2051 # LC_INODE_TIMESPEC64
2053 # kernel 4.17-rc7 commit 8efd6894ff089adeeac7cb9f32125b85d963d1bc
2054 # fs: add timespec64_truncate()
2055 # kernel 4.18 commit 95582b00838837fc07e042979320caf917ce3fe6
2056 # inode timestamps switched to timespec64
2057 # kernel 4.19-rc2 commit 976516404ff3fab2a8caa8bd6f5efc1437fed0b8
2058 # y2038: remove unused time interfaces
2062 # When inode times are timespec64 stop using the deprecated
2065 # kernel v5.5-rc1-6-gba70609d5ec6 ba70609d5ec664a8f36ba1c857fcd97a478adf79
2066 # fs: Delete timespec64_trunc()
2068 AC_DEFUN([LC_INODE_TIMESPEC64], [
2069 tmp_flags="$EXTRA_KCFLAGS"
2070 EXTRA_KCFLAGS="-Werror"
2071 LB_CHECK_COMPILE([if inode timestamps are struct timespec64],
2073 #include <linux/fs.h>
2075 struct inode *inode = NULL;
2076 struct timespec64 ts = {0, 1};
2078 inode->i_atime = ts;
2081 AC_DEFINE(HAVE_INODE_TIMESPEC64, 1,
2082 [inode times are using timespec64])
2084 EXTRA_KCFLAGS="$tmp_flags"
2085 ]) # LC_INODE_TIMESPEC64
2090 # kernel 4.20 commit v4.19-rc5-248-g9b89a0355144
2091 # xarray: Add XArray marks - replaced radix_tree_tag_set
2093 AC_DEFUN([LC___XA_SET_MARK], [
2094 tmp_flags="$EXTRA_KCFLAGS"
2095 EXTRA_KCFLAGS="-Werror"
2096 LB_CHECK_COMPILE([if '__xa_set_mark' exists],
2098 #include <linux/fs.h>
2099 #include <linux/radix-tree.h>
2101 radix_tree_tag_set(NULL, 0, PAGECACHE_TAG_DIRTY);
2103 AC_DEFINE(HAVE_RADIX_TREE_TAG_SET, 1,
2104 [__xa_set_mark exists])
2106 EXTRA_KCFLAGS="$tmp_flags"
2107 ]) # LC___XA_SET_MARK
2110 # LC_UAPI_LINUX_MOUNT_H
2112 # kernel 4.20 commit e262e32d6bde0f77fb0c95d977482fc872c51996
2113 # vfs: Suppress MS_* flag defs within the kernel ...
2115 AC_DEFUN([LC_UAPI_LINUX_MOUNT_H], [
2116 tmp_flags="$EXTRA_KCFLAGS"
2117 EXTRA_KCFLAGS="-Werror"
2118 LB_CHECK_COMPILE([if MS_RDONLY was moved to uapi/linux/mount.h],
2120 #include <uapi/linux/mount.h>
2125 AC_DEFINE(HAVE_UAPI_LINUX_MOUNT_H, 1,
2126 [if MS_RDONLY was moved to uapi/linux/mount.h])
2128 EXTRA_KCFLAGS="$tmp_flags"
2129 ]) # LC_UAPI_LINUX_MOUNT_H
2132 # LC_HAVE_SUNRPC_CACHE_HASH_LOCK_IS_A_SPINLOCK
2134 # kernel 4.20 commit 1863d77f15da0addcd293a1719fa5d3ef8cde3ca
2135 # SUNRPC: Replace the cache_detail->hash_lock with a regular spinlock
2137 # Now that the reader functions are all RCU protected, use a regular
2138 # spinlock rather than a reader/writer lock.
2140 AC_DEFUN([LC_HAVE_SUNRPC_CACHE_HASH_LOCK_IS_A_SPINLOCK], [
2141 tmp_flags="$EXTRA_KCFLAGS"
2142 EXTRA_KCFLAGS="-Werror"
2143 LB_CHECK_COMPILE([if cache_detail->hash_lock is a spinlock],
2144 hash_lock_isa_spinlock_t, [
2145 #include <linux/sunrpc/cache.h>
2147 spinlock_t *lock = &(((struct cache_detail *)0)->hash_lock);
2150 AC_DEFINE(HAVE_CACHE_HASH_SPINLOCK, 1,
2151 [if cache_detail->hash_lock is a spinlock])
2153 EXTRA_KCFLAGS="$tmp_flags"
2154 ]) # LC_HAVE_SUNRPC_CACHE_HASH_LOCK_IS_A_SPINLOCK
2157 # LC_HAS_LINUX_SELINUX_ENABLED
2159 # kernel 5.1 commit 3d252529480c68bfd6a6774652df7c8968b28e41
2160 # SELinux: Remove unused selinux_is_enabled
2162 AC_DEFUN([LC_HAS_LINUX_SELINUX_ENABLED], [
2163 tmp_flags="$EXTRA_KCFLAGS"
2164 EXTRA_KCFLAGS="-Werror"
2165 LB_CHECK_COMPILE([if linux/selinux.h exists],
2166 selinux_is_enabled, [
2167 #include <linux/selinux.h>
2169 bool has_selinux = selinux_is_enabled();
2172 AC_DEFINE(HAVE_LINUX_SELINUX_IS_ENABLED, 1,
2173 [if linux/selinux.h exists])
2175 EXTRA_KCFLAGS="$tmp_flags"
2176 ]) # LC_HAS_LINUX_SELINUX_ENABLED
2179 # LB_HAVE_BVEC_ITER_ALL
2181 # kernel 5.1 commit 6dc4f100c175dd0511ae8674786e7c9006cdfbfa
2182 # block: allow bio_for_each_segment_all() to iterate over multi-page bvec
2184 AC_DEFUN([LB_HAVE_BVEC_ITER_ALL], [
2185 tmp_flags="$EXTRA_KCFLAGS"
2186 EXTRA_KCFLAGS="-Werror"
2187 LB_CHECK_COMPILE([if bvec_iter_all exists for multi-page bvec iternation],
2189 #include <linux/bvec.h>
2191 struct bvec_iter_all iter;
2194 AC_DEFINE(HAVE_BVEC_ITER_ALL, 1,
2195 [if bvec_iter_all exists for multi-page bvec iternation])
2197 EXTRA_KCFLAGS="$tmp_flags"
2198 ]) # LB_HAVE_BVEC_ITER_ALL
2201 # LC_ACCOUNT_PAGE_DIRTIED
2203 # After 5.2 kernel page dirtied is not exported
2205 AC_DEFUN([LC_ACCOUNT_PAGE_DIRTIED], [
2206 LB_CHECK_EXPORT([account_page_dirtied], [mm/page-writeback.c],
2207 [AC_DEFINE(HAVE_ACCOUNT_PAGE_DIRTIED_EXPORT, 1,
2208 [account_page_dirtied is exported])])
2209 ]) # LC_ACCOUNT_PAGE_DIRTIED
2212 # LC_KEYRING_SEARCH_4ARGS
2214 # Kernel 5.2 commit dcf49dbc8077
2215 # keys: Add a 'recurse' flag for keyring searches
2217 AC_DEFUN([LC_KEYRING_SEARCH_4ARGS], [
2218 LB_CHECK_COMPILE([if 'keyring_search' has 4 args],
2219 keyring_search_4args, [
2220 #include <linux/key.h>
2223 keyring_search(keyring, NULL, NULL, false);
2225 AC_DEFINE(HAVE_KEYRING_SEARCH_4ARGS, 1,
2226 [keyring_search has 4 args])
2228 ]) # LC_KEYRING_SEARCH_4ARGS
2231 # LC_BIO_BI_PHYS_SEGMENTS
2233 # kernel 5.3-rc1 commit 14ccb66b3f585b2bc21e7256c96090abed5a512c
2234 # block: remove the bi_phys_segments field in struct bio
2236 AC_DEFUN([LC_BIO_BI_PHYS_SEGMENTS], [
2237 tmp_flags="$EXTRA_KCFLAGS"
2238 EXTRA_KCFLAGS="-Werror"
2239 LB_CHECK_COMPILE([if struct bio has bi_phys_segments member],
2240 bye_bio_bi_phys_segments, [
2241 #include <linux/bio.h>
2243 struct bio *bio = NULL;
2244 bio->bi_phys_segments++;
2246 AC_DEFINE(HAVE_BIO_BI_PHYS_SEGMENTS, 1,
2247 [struct bio has bi_phys_segments member])
2249 EXTRA_KCFLAGS="$tmp_flags"
2250 ]) # LC_BIO_BI_PHYS_SEGMENTS
2253 # LC_LM_COMPARE_OWNER_EXISTS
2255 # kernel 5.3-rc3 commit f85d93385e9fe6886a751f647f6812a89bf6bee3
2256 # locks: Cleanup lm_compare_owner and lm_owner_key
2257 # removed lm_compare_owner
2259 AC_DEFUN([LC_LM_COMPARE_OWNER_EXISTS], [
2260 tmp_flags="$EXTRA_KCFLAGS"
2261 EXTRA_KCFLAGS="-Werror"
2262 LB_CHECK_COMPILE([if lock_manager_operations has lm_compare_owner],
2263 lock_manager_ops_lm_compare_owner, [
2264 #include <linux/fs.h>
2266 struct lock_manager_operations lm_ops;
2267 lm_ops.lm_compare_owner = NULL;
2269 AC_DEFINE(HAVE_LM_COMPARE_OWNER, 1,
2270 [lock_manager_operations has lm_compare_owner])
2272 EXTRA_KCFLAGS="$tmp_flags"
2273 ]) # LC_LM_COMPARE_OWNER_EXISTS
2275 AC_DEFUN([LC_PROG_LINUX_SRC], [])
2276 AC_DEFUN([LC_PROG_LINUX_RESULTS], [])
2279 # LC_FSCRYPT_SUPPORT
2281 # 5.4 introduced fscrypt encryption policies v2
2283 AC_DEFUN([LC_FSCRYPT_SUPPORT], [
2284 LB_CHECK_COMPILE([for fscrypt in-kernel support],
2286 #define __FS_HAS_ENCRYPTION 0
2287 #include <linux/fscrypt.h>
2289 fscrypt_ioctl_get_policy_ex(NULL, NULL);
2291 dnl When Lustre supports file name encryption, restore "yes" value
2292 dnl for has_fscrypt_support and remove warning message.
2293 has_fscrypt_support="no"
2295 This version of Lustre lacks file name encryption support,
2296 so it cannot make use of in-kernel fscrypt.
2297 Will use embedded llcrypt if possible.])
2299 ]) # LC_FSCRYPT_SUPPORT
2304 # Lustre linux kernel checks
2306 AC_DEFUN([LC_PROG_LINUX], [
2307 AC_MSG_NOTICE([Lustre kernel checks
2308 ==============================================================================])
2313 LC_CONFIG_HEALTH_CHECK_WRITE
2314 LC_CONFIG_LRU_RESIZE
2318 LC_GLIBC_SUPPORT_FHANDLES
2319 LC_GLIBC_SUPPORT_COPY_FILE_RANGE
2324 LC_HAVE_PROJECT_QUOTA
2331 LC_HAVE_DENTRY_D_U_D_ALIAS
2332 LC_HAVE_DENTRY_D_CHILD
2333 LC_PID_NS_FOR_CHILDREN
2336 LC_OLDSIZE_TRUNCATE_PAGECACHE
2337 LC_PTR_ERR_OR_ZERO_MISSING
2343 LC_HAVE_D_IS_POSITIVE
2347 LC_HAVE_TRUNCATE_IPAGES_FINAL
2348 LC_IOPS_RENAME_WITH_FLAGS
2355 LC_DIRECTIO_USE_ITER
2356 LC_HAVE_IOV_ITER_INIT_DIRECTION
2357 LC_HAVE_IOV_ITER_TRUNCATE
2358 LC_HAVE_FILE_OPERATIONS_READ_WRITE_ITER
2361 LC_HAVE_INTERVAL_BLK_INTEGRITY
2365 LC_PERCPU_COUNTER_INIT
2366 LC_NFS_FILLDIR_USE_CTX
2370 LC_HAVE_DQUOT_QC_DQBLK
2371 LC_HAVE_AIO_COMPLETE
2374 LC_BACKING_DEV_INFO_REMOVAL
2375 LC_HAVE_BDI_CAP_MAP_COPY
2379 LC_HAVE_SYNC_READ_WRITE
2383 LC_BIO_ENDIO_USES_ONE_ARG
2384 LC_SYMLINK_OPS_USE_NAMEIDATA
2385 LC_ACCOUNT_PAGE_DIRTIED_3ARGS
2386 LC_HAVE_CRYPTO_ALLOC_SKCIPHER
2389 LC_HAVE_INTERVAL_EXP_BLK_INTEGRITY
2390 LC_HAVE_BIP_ITER_BIO_INTEGRITY_PAYLOAD
2391 LC_HAVE_CACHE_HEAD_HLIST
2392 LC_HAVE_XATTR_HANDLER_SIMPLIFIED
2395 LC_HAVE_LOCKS_LOCK_FILE_WAIT
2396 LC_HAVE_KEY_PAYLOAD_DATA_ARRAY
2397 LC_HAVE_XATTR_HANDLER_NAME
2399 LC_HAVE_SUBMIT_BIO_2ARGS
2400 LC_HAVE_CLEAN_BDEV_ALIASES
2407 LC_HAVE_IOP_GET_LINK
2410 LC_HAVE_IN_COMPAT_SYSCALL
2411 LC_HAVE_XATTR_HANDLER_INODE_PARAM
2417 LC_GENERIC_WRITE_SYNC_2ARGS
2418 LC_FOP_ITERATE_SHARED
2421 LC_EXPORT_DEFAULT_FILE_SPLICE_READ
2422 LC_HAVE_POSIX_ACL_VALID_USER_NS
2424 LC_FULL_NAME_HASH_3ARGS
2425 LC_STRUCT_POSIX_ACL_XATTR
2431 LC_POSIX_ACL_UPDATE_MODE
2434 LC_IOP_GENERIC_READLINK
2435 LC_HAVE_VM_FAULT_ADDRESS
2438 LC_INODEOPS_ENHANCED_GETATTR
2439 LC_VM_OPERATIONS_REMOVE_VMF_ARG
2440 LC_HAVE_KEY_USAGE_REFCOUNT
2441 LC_HAVE_CRYPTO_MAX_ALG_NAME_128
2445 LC_SUPER_BLOCK_S_UUID
2446 LC_SUPER_SETUP_BDI_NAME
2450 LC_BIO_INTEGRITY_ENABLED
2453 LC_PAGEVEC_INIT_ONE_PARAM
2466 LC_UAPI_LINUX_MOUNT_H
2467 LC_HAVE_SUNRPC_CACHE_HASH_LOCK_IS_A_SPINLOCK
2470 LC_HAS_LINUX_SELINUX_ENABLED
2471 LB_HAVE_BVEC_ITER_ALL
2474 LC_ACCOUNT_PAGE_DIRTIED
2475 LC_KEYRING_SEARCH_4ARGS
2478 LC_BIO_BI_PHYS_SEGMENTS
2479 LC_LM_COMPARE_OWNER_EXISTS
2481 # kernel patch to extend integrity interface
2482 LC_BIO_INTEGRITY_PREP_FN
2485 AS_IF([test "x$enable_server" != xno], [
2495 # Check whether to build the client side of Lustre
2497 AC_DEFUN([LC_CONFIG_CLIENT], [
2498 AC_MSG_CHECKING([whether to build Lustre client support])
2499 AC_ARG_ENABLE([client],
2500 AC_HELP_STRING([--disable-client],
2501 [disable Lustre client support]),
2502 [], [enable_client="yes"])
2503 AC_MSG_RESULT([$enable_client])
2504 ]) # LC_CONFIG_CLIENT
2509 AC_DEFUN([LB_CONFIG_MPITESTS], [
2510 AC_ARG_ENABLE([mpitests],
2511 AC_HELP_STRING([--enable-mpitests=<yes|no|mpicc wrapper>],
2512 [include mpi tests]), [
2513 enable_mpitests="yes"
2516 MPICC_WRAPPER="mpicc"
2517 MPI_BIN=$(eval which $MPICC_WRAPPER | xargs dirname)
2520 enable_mpitests="no"
2524 MPICC_WRAPPER=$enableval
2525 MPI_BIN=$(eval echo $MPICC_WRAPPER | xargs dirname)
2529 enable_mpitests="yes"
2530 MPICC_WRAPPER="mpicc"
2531 MPI_BIN=$(eval which $MPICC_WRAPPER | xargs dirname)
2534 if test "x$enable_mpitests" != "xno"; then
2537 AC_CACHE_CHECK([whether mpitests can be built],
2538 lb_cv_mpi_tests, [AC_COMPILE_IFELSE([AC_LANG_SOURCE([
2542 MPI_Initialized(&flag);
2545 ])], [lb_cv_mpi_tests="yes"], [lb_cv_mpi_tests="no"])
2547 enable_mpitests=$lb_cv_mpi_tests
2551 AC_SUBST(MPICC_WRAPPER)
2552 ]) # LB_CONFIG_MPITESTS
2557 # whether to enable quota support global control
2559 AC_DEFUN([LC_CONFIG_QUOTA], [
2560 AC_MSG_CHECKING([whether to enable quota support global control])
2561 AC_ARG_ENABLE([quota],
2562 AC_HELP_STRING([--enable-quota],
2563 [enable quota support]),
2564 [], [enable_quota="yes"])
2565 AS_IF([test "x$enable_quota" = xyes],
2566 [AC_MSG_RESULT([yes])],
2567 [AC_MSG_RESULT([no])])
2568 ]) # LC_CONFIG_QUOTA
2573 AC_DEFUN([LC_QUOTA], [
2577 AS_IF([test "x$enable_quota" != xno -a "x$enable_utils" != xno], [
2578 AC_CHECK_HEADER([sys/quota.h],
2579 [AC_DEFINE(HAVE_SYS_QUOTA_H, 1,
2580 [Define to 1 if you have <sys/quota.h>.])],
2581 [AC_MSG_ERROR([don't find <sys/quota.h> in your system])])
2588 # configure support for optional OSD implementation
2590 AC_DEFUN([LC_OSD_ADDON], [
2591 AC_MSG_CHECKING([whether to use OSD addon])
2593 AC_HELP_STRING([--with-osd=path],
2594 [set path to optional osd]),
2601 OSDADDON="$with_osd"
2608 AS_IF([test $ENABLEOSDADDON -eq 0], [
2612 OSDMODNAME=$(basename $OSDADDON)
2613 AS_IF([test -e $LUSTRE/$OSDMODNAME], [
2614 AC_MSG_RESULT([can't link])
2616 ], [ln -s $OSDADDON $LUSTRE/$OSDMODNAME], [
2617 AC_MSG_RESULT([$OSDMODNAME])
2618 OSDADDON="obj-m += $OSDMODNAME/"
2620 AC_MSG_RESULT([can't link])
2630 # Check whether to enable Lustre client crypto
2632 AC_DEFUN([LC_CONFIG_CRYPTO], [
2633 AC_MSG_CHECKING([whether to enable Lustre client crypto])
2634 AC_ARG_ENABLE([crypto],
2635 AC_HELP_STRING([--enable-crypto],
2636 [enable Lustre client crypto]),
2637 [], [enable_crypto="auto"])
2638 AS_IF([test "x$enable_crypto" != xno -a "x$enable_dist" = xno], [
2642 LC_FSCRYPT_SUPPORT])
2643 AS_IF([test "x$has_fscrypt_support" = xyes], [
2644 AC_DEFINE(HAVE_LUSTRE_CRYPTO, 1, [Enable Lustre client crypto via in-kernel fscrypt])
2646 [AS_IF([test "x$has_is_encrypted" = xyes], [
2647 AC_DEFINE(HAVE_LUSTRE_CRYPTO, 1, [Enable Lustre client crypto via embedded llcrypt])
2648 AC_DEFINE(CONFIG_LL_ENCRYPTION, 1, [embedded llcrypt])
2650 enable_llcrypt=yes], [
2651 AS_IF([test "x$enable_crypto" = xyes],
2652 [AC_MSG_ERROR([Lustre client crypto cannot be enabled because of lack of encryption support in your kernel.])])
2653 AS_IF([test "x$enable_crypto" != xno -a "x$enable_dist" = xno],
2654 [AC_MSG_WARN(Lustre client crypto cannot be enabled because of lack of encryption support in your kernel.)])
2655 enable_crypto=no])])
2656 AS_IF([test "x$enable_dist" != xno], [
2658 enable_llcrypt=yes])
2659 AC_MSG_RESULT([$enable_crypto])
2660 ]) # LC_CONFIG_CRYPTO
2665 # other configure checks
2667 AC_DEFUN([LC_CONFIGURE], [
2668 AC_MSG_NOTICE([Lustre core checks
2669 ==============================================================================])
2671 AS_IF([test $target_cpu == "i686" -o $target_cpu == "x86_64"],
2672 [CFLAGS="$CFLAGS -Wall -Werror"])
2674 # maximum MDS thread count
2677 # lustre/utils/gss/gss_util.c
2678 # lustre/utils/gss/gssd_proc.c
2679 # lustre/utils/gss/krb5_util.c
2680 # lustre/utils/llog_reader.c
2681 # lustre/utils/create_iam.c
2682 # lustre/utils/libiam.c
2683 AC_CHECK_HEADERS([netdb.h endian.h])
2684 AC_CHECK_FUNCS([gethostbyname])
2686 # lustre/utils/llverfs.c lustre/utils/libmount_utils_ldiskfs.c
2687 AC_CHECK_HEADERS([ext2fs/ext2fs.h], [], [
2688 AS_IF([test "x$enable_utils" = xyes -a "x$enable_ldiskfs" = xyes], [
2690 ext2fs.h not found. Please install e2fsprogs development package.
2695 # lustre/tests/statx_test.c
2696 AC_CHECK_FUNCS([statx])
2698 # lustre/utils/lfs.c
2699 AS_IF([test "$enable_dist" = "no"], [
2700 AC_CHECK_LIB([z], [crc32], [
2701 AC_CHECK_HEADER([zlib.h], [], [
2702 AC_MSG_ERROR([zlib.h not found.])])
2705 zlib library not found. Please install zlib development package.])
2711 AC_CHECK_LIB([selinux], [is_selinux_enabled],
2712 [AC_CHECK_HEADERS([selinux/selinux.h],
2713 [SELINUX="-lselinux"
2714 AC_DEFINE([HAVE_SELINUX], 1,
2715 [support for selinux ])],
2718 No libselinux-devel package found, unable to build selinux enabled tools
2723 No selinux package found, unable to build selinux enabled tools
2728 AC_CHECK_LIB([keyutils], [add_key])
2731 AC_MSG_CHECKING([whether to report minimum OST free space])
2732 AC_ARG_ENABLE([mindf],
2733 AC_HELP_STRING([--enable-mindf],
2734 [Make statfs report the minimum available space on any single OST instead of the sum of free space on all OSTs]),
2735 [], [enable_mindf="no"])
2736 AC_MSG_RESULT([$enable_mindf])
2737 AS_IF([test "$enable_mindf" = "yes"],
2738 [AC_DEFINE([MIN_DF], 1, [Report minimum OST free space])])
2740 AC_MSG_CHECKING([whether to randomly failing memory alloc])
2741 AC_ARG_ENABLE([fail_alloc],
2742 AC_HELP_STRING([--disable-fail-alloc],
2743 [disable randomly alloc failure]),
2744 [], [enable_fail_alloc="yes"])
2745 AC_MSG_RESULT([$enable_fail_alloc])
2746 AS_IF([test "x$enable_fail_alloc" != xno],
2747 [AC_DEFINE([RANDOM_FAIL_ALLOC], 1,
2748 [enable randomly alloc failure])])
2750 AC_MSG_CHECKING([whether to check invariants (expensive cpu-wise)])
2751 AC_ARG_ENABLE([invariants],
2752 AC_HELP_STRING([--enable-invariants],
2753 [enable invariant checking (cpu intensive)]),
2754 [], [enable_invariants="no"])
2755 AC_MSG_RESULT([$enable_invariants])
2756 AS_IF([test "x$enable_invariants" = xyes],
2757 [AC_DEFINE([CONFIG_LUSTRE_DEBUG_EXPENSIVE_CHECK], 1,
2758 [enable invariant checking])])
2760 AC_MSG_CHECKING([whether to track references with lu_ref])
2761 AC_ARG_ENABLE([lu_ref],
2762 AC_HELP_STRING([--enable-lu_ref],
2763 [enable lu_ref reference tracking code]),
2764 [], [enable_lu_ref="no"])
2765 AC_MSG_RESULT([$enable_lu_ref])
2766 AS_IF([test "x$enable_lu_ref" = xyes],
2767 [AC_DEFINE([USE_LU_REF], 1,
2768 [enable lu_ref reference tracking code])])
2770 AC_MSG_CHECKING([whether to enable page state tracking])
2771 AC_ARG_ENABLE([pgstate-track],
2772 AC_HELP_STRING([--enable-pgstate-track],
2773 [enable page state tracking]),
2774 [], [enable_pgstat_track="no"])
2775 AC_MSG_RESULT([$enable_pgstat_track])
2776 AS_IF([test "x$enable_pgstat_track" = xyes],
2777 [AC_DEFINE([CONFIG_DEBUG_PAGESTATE_TRACKING], 1,
2778 [enable page state tracking code])])
2781 AC_MSG_CHECKING([systemd unit file directory])
2782 AC_ARG_WITH([systemdsystemunitdir],
2783 [AS_HELP_STRING([--with-systemdsystemunitdir=DIR],
2784 [Directory for systemd service files])],
2785 [], [with_systemdsystemunitdir=auto])
2786 AS_IF([test "x$with_systemdsystemunitdir" = "xyes" -o "x$with_systemdsystemunitdir" = "xauto"],
2787 [def_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)
2788 AS_IF([test "x$def_systemdsystemunitdir" = "x"],
2789 [AS_IF([test "x$with_systemdsystemunitdir" = "xyes"],
2790 [AC_MSG_ERROR([systemd support requested but pkg-config unable to query systemd package])])
2791 with_systemdsystemunitdir=no],
2792 [with_systemdsystemunitdir="$def_systemdsystemunitdir"])])
2793 AS_IF([test "x$with_systemdsystemunitdir" != "xno"],
2794 [AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])])
2795 AC_MSG_RESULT([$with_systemdsystemunitdir])
2797 AC_MSG_CHECKING([bash-completion directory])
2798 AC_ARG_WITH([bash-completion-dir],
2799 AS_HELP_STRING([--with-bash-completion-dir[=PATH]],
2800 [Install the bash auto-completion script in this directory.]),
2802 [with_bash_completion_dir=yes])
2803 AS_IF([test "x$with_bash_completion_dir" = "xyes"], [
2804 BASH_COMPLETION_DIR="`pkg-config --variable=completionsdir bash-completion`"
2805 AS_IF([test "x$BASH_COMPLETION_DIR" = "x"], [
2806 [BASH_COMPLETION_DIR="/usr/share/bash-completion/completions"]
2809 BASH_COMPLETION_DIR="$with_bash_completion_dir"
2811 AC_SUBST([BASH_COMPLETION_DIR])
2812 AC_MSG_RESULT([$BASH_COMPLETION_DIR])
2818 # AM_CONDITIONALS for lustre
2820 AC_DEFUN([LC_CONDITIONALS], [
2821 AM_CONDITIONAL(MPITESTS, test x$enable_mpitests = xyes, Build MPI Tests)
2822 AM_CONDITIONAL(CLIENT, test x$enable_client = xyes)
2823 AM_CONDITIONAL(SERVER, test x$enable_server = xyes)
2824 AM_CONDITIONAL(SPLIT, test x$enable_split = xyes)
2825 AM_CONDITIONAL(EXT2FS_DEVEL, test x$ac_cv_header_ext2fs_ext2fs_h = xyes)
2826 AM_CONDITIONAL(GSS, test x$enable_gss = xyes)
2827 AM_CONDITIONAL(GSS_KEYRING, test x$enable_gss_keyring = xyes)
2828 AM_CONDITIONAL(GSS_PIPEFS, test x$enable_gss_pipefs = xyes)
2829 AM_CONDITIONAL(GSS_SSK, test x$enable_ssk = xyes)
2830 AM_CONDITIONAL(LIBPTHREAD, test x$enable_libpthread = xyes)
2831 AM_CONDITIONAL(HAVE_SYSTEMD, test "x$with_systemdsystemunitdir" != "xno")
2832 AM_CONDITIONAL(ENABLE_BASH_COMPLETION, test "x$with_bash_completion_dir" != "xno")
2833 AM_CONDITIONAL(XATTR_HANDLER, test "x$lb_cv_compile_xattr_handler_flags" = xyes)
2834 AM_CONDITIONAL(SELINUX, test "$SELINUX" = "-lselinux")
2835 AM_CONDITIONAL(GETSEPOL, test x$enable_getsepol = xyes)
2836 AM_CONDITIONAL(LLCRYPT, test x$enable_llcrypt = xyes)
2837 AM_CONDITIONAL(LIBAIO, test x$enable_libaio = xyes)
2838 ]) # LC_CONDITIONALS
2843 # files that should be generated with AC_OUTPUT
2845 AC_DEFUN([LC_CONFIG_FILES],
2849 lustre/autoconf/Makefile
2850 lustre/conf/Makefile
2851 lustre/conf/resource/Makefile
2852 lustre/contrib/Makefile
2854 lustre/include/Makefile
2855 lustre/include/lustre/Makefile
2856 lustre/include/uapi/linux/lustre/Makefile
2857 lustre/kernel_patches/targets/4.18-rhel8.3.target
2858 lustre/kernel_patches/targets/4.18-rhel8.2.target
2859 lustre/kernel_patches/targets/4.18-rhel8.1.target
2860 lustre/kernel_patches/targets/4.18-rhel8.target
2861 lustre/kernel_patches/targets/3.10-rhel7.9.target
2862 lustre/kernel_patches/targets/3.10-rhel7.8.target
2863 lustre/kernel_patches/targets/3.10-rhel7.7.target
2864 lustre/kernel_patches/targets/3.10-rhel7.6.target
2865 lustre/kernel_patches/targets/3.10-rhel7.5.target
2866 lustre/kernel_patches/targets/4.14-rhel7.5.target
2867 lustre/kernel_patches/targets/4.14-rhel7.6.target
2868 lustre/kernel_patches/targets/4.12-sles12sp4.target
2869 lustre/kernel_patches/targets/4.12-sles12sp5.target
2870 lustre/kernel_patches/targets/4.12-sles15sp1.target
2871 lustre/kernel_patches/targets/4.12-sles15sp2.target
2872 lustre/kernel_patches/targets/3.x-fc18.target
2873 lustre/ldlm/Makefile
2875 lustre/fid/autoMakefile
2876 lustre/llite/Makefile
2877 lustre/llite/autoMakefile
2879 lustre/lov/autoMakefile
2881 lustre/mdc/autoMakefile
2883 lustre/lmv/autoMakefile
2884 lustre/lfsck/Makefile
2885 lustre/lfsck/autoMakefile
2887 lustre/mdt/autoMakefile
2889 lustre/mdd/autoMakefile
2891 lustre/fld/autoMakefile
2892 lustre/obdclass/Makefile
2893 lustre/obdclass/autoMakefile
2894 lustre/obdecho/Makefile
2895 lustre/obdecho/autoMakefile
2897 lustre/ofd/autoMakefile
2899 lustre/osc/autoMakefile
2901 lustre/ost/autoMakefile
2902 lustre/osd-ldiskfs/Makefile
2903 lustre/osd-ldiskfs/autoMakefile
2904 lustre/osd-zfs/Makefile
2905 lustre/osd-zfs/autoMakefile
2907 lustre/mgc/autoMakefile
2909 lustre/mgs/autoMakefile
2910 lustre/target/Makefile
2911 lustre/ptlrpc/Makefile
2912 lustre/ptlrpc/autoMakefile
2913 lustre/ptlrpc/gss/Makefile
2914 lustre/ptlrpc/gss/autoMakefile
2915 lustre/quota/Makefile
2916 lustre/quota/autoMakefile
2917 lustre/scripts/Makefile
2918 lustre/scripts/systemd/Makefile
2919 lustre/tests/Makefile
2920 lustre/tests/mpi/Makefile
2921 lustre/tests/kernel/Makefile
2922 lustre/tests/kernel/autoMakefile
2923 lustre/utils/Makefile
2924 lustre/utils/gss/Makefile
2926 lustre/osp/autoMakefile
2928 lustre/lod/autoMakefile
2930 ]) # LC_CONFIG_FILES