4 # Wrapper for AC_CONFIG_SUBDIR
6 AC_DEFUN([LC_CONFIG_SRCDIR], [
7 AC_CONFIG_SRCDIR([lustre/obdclass/obdo.c])
15 # lustre specific paths
17 AC_DEFUN([LC_PATH_DEFAULTS], [
18 # ptlrpc kernel build requires this
26 demodir='$(docdir)/demo'
29 pkgexampledir='${pkgdatadir}/examples'
30 AC_SUBST(pkgexampledir)
36 # is the target os supported?
38 AC_DEFUN([LC_TARGET_SUPPORTED], [
47 ]) # LC_TARGET_SUPPORTED
50 # LC_GLIBC_SUPPORT_FHANDLES
52 AC_DEFUN([LC_GLIBC_SUPPORT_FHANDLES], [
53 AC_CHECK_FUNCS([name_to_handle_at],
54 [AC_DEFINE(HAVE_FHANDLE_GLIBC_SUPPORT, 1,
55 [file handle and related syscalls are supported])],
56 [AC_MSG_WARN([file handle and related syscalls are not supported])])
57 ]) # LC_GLIBC_SUPPORT_FHANDLES
62 # Ensure the stack size is at least 8k in Lustre server (all kernels)
64 AC_DEFUN([LC_STACK_SIZE], [
65 LB_CHECK_COMPILE([if stack size is at least 8k],
67 #include <linux/thread_info.h>
69 #if THREAD_SIZE < 8192
70 #error "stack size < 8192"
72 ], [], [AC_MSG_ERROR([
74 Lustre requires that Linux is configured with at least a 8KB stack.
81 # Allow the user to set the MDS thread upper limit
83 AC_DEFUN([LC_MDS_MAX_THREADS], [
84 AC_MSG_CHECKING([for maximum number of MDS threads])
85 AC_ARG_WITH([mds_max_threads],
86 AC_HELP_STRING([--with-mds-max-threads=count],
87 [maximum threads available on the MDS: (default=512)]),
88 [AC_DEFINE_UNQUOTED(MDS_MAX_THREADS, $with_mds_max_threads,
89 [maximum number of MDS threads])])
90 AC_MSG_RESULT([$with_mds_max_threads])
91 ]) # LC_MDS_MAX_THREADS
96 # the pinger is temporary, until we have the recovery node in place
98 AC_DEFUN([LC_CONFIG_PINGER], [
99 AC_MSG_CHECKING([whether to enable Lustre pinger support])
100 AC_ARG_ENABLE([pinger],
101 AC_HELP_STRING([--disable-pinger],
102 [disable recovery pinger support]),
103 [], [enable_pinger="yes"])
104 AC_MSG_RESULT([$enable_pinger])
105 AS_IF([test "x$enable_pinger" != xno],
106 [AC_DEFINE(ENABLE_PINGER, 1,[Use the Pinger])])
107 ]) # LC_CONFIG_PINGER
112 # do checksum of bulk data between client and OST
114 AC_DEFUN([LC_CONFIG_CHECKSUM], [
115 AC_MSG_CHECKING([whether to enable data checksum support])
116 AC_ARG_ENABLE([checksum],
117 AC_HELP_STRING([--disable-checksum],
118 [disable data checksum support]),
119 [], [enable_checksum="yes"])
120 AC_MSG_RESULT([$enable_checksum])
121 AS_IF([test "x$enable_checksum" != xno],
122 [AC_DEFINE(ENABLE_CHECKSUM, 1, [do data checksums])])
123 ]) # LC_CONFIG_CHECKSUM
128 # enable distributed flock by default
130 AC_DEFUN([LC_CONFIG_FLOCK], [
131 AC_MSG_CHECKING([whether to enable flock by default])
132 AC_ARG_ENABLE([flock],
133 AC_HELP_STRING([--disable-flock],
134 [disable flock by default]),
135 [], [enable_flock="yes"])
136 AC_MSG_RESULT([$enable_flock])
137 AS_IF([test "x$enable_flock" != xno],
138 [AC_DEFINE(ENABLE_FLOCK, 1, [enable flock by default])])
142 # LC_CONFIG_HEALTH_CHECK_WRITE
144 # Turn off the actual write to the disk
146 AC_DEFUN([LC_CONFIG_HEALTH_CHECK_WRITE], [
147 AC_MSG_CHECKING([whether to enable a write with the health check])
148 AC_ARG_ENABLE([health_write],
149 AC_HELP_STRING([--enable-health_write],
150 [enable disk writes when doing health check]),
151 [], [enable_health_write="no"])
152 AC_MSG_RESULT([$enable_health_write])
153 AS_IF([test "x$enable_health_write" != xno],
154 [AC_DEFINE(USE_HEALTH_CHECK_WRITE, 1, [Write when Checking Health])])
155 ]) # LC_CONFIG_HEALTH_CHECK_WRITE
158 # LC_CONFIG_LRU_RESIZE
160 AC_DEFUN([LC_CONFIG_LRU_RESIZE], [
161 AC_MSG_CHECKING([whether to enable lru self-adjusting])
162 AC_ARG_ENABLE([lru_resize],
163 AC_HELP_STRING([--enable-lru-resize],
164 [enable lru resize support]),
165 [], [enable_lru_resize="yes"])
166 AC_MSG_RESULT([$enable_lru_resize])
167 AS_IF([test "x$enable_lru_resize" != xno],
168 [AC_DEFINE(HAVE_LRU_RESIZE_SUPPORT, 1, [Enable lru resize support])])
169 ]) # LC_CONFIG_LRU_RESIZE
174 # Quota support. The kernel must support CONFIG_QUOTA.
176 AC_DEFUN([LC_QUOTA_CONFIG], [
177 LB_CHECK_CONFIG_IM([QUOTA], [],
180 Lustre quota requires that CONFIG_QUOTA is enabled in your kernel.
185 #[AC_DEFINE(CONFIG_LUSTRE_FS_POSIX_ACL, 1, [Enable POSIX acl])])
187 # LC_POSIX_ACL_CONFIG
191 AC_DEFUN([LC_POSIX_ACL_CONFIG], [
192 LB_CHECK_CONFIG_IM([FS_POSIX_ACL],
193 [AC_DEFINE(CONFIG_LUSTRE_FS_POSIX_ACL, 1, [Enable POSIX acl])
195 ]) # LC_POSIX_ACL_CONFIG
197 LB_CHECK_CONFIG_IM([CRYPTO_MD5], [],
198 [AC_MSG_WARN([kernel MD5 support is recommended by using GSS.])])
201 # LC_CONFIG_GSS_KEYRING
203 # default 'auto', tests for dependencies, if found, enables;
204 # only called if gss is enabled
206 AC_DEFUN([LC_CONFIG_GSS_KEYRING], [
207 AC_MSG_CHECKING([whether to enable gss keyring backend])
208 AC_ARG_ENABLE([gss_keyring],
209 [AC_HELP_STRING([--disable-gss-keyring],
210 [disable gss keyring backend])],
211 [], [enable_gss_keyring="auto"])
212 AC_MSG_RESULT([$enable_gss_keyring])
213 AS_IF([test "x$enable_gss_keyring" != xno], [
214 LB_CHECK_CONFIG_IM([KEYS], [], [
215 gss_keyring_conf_test="fail"
216 AC_MSG_WARN([GSS keyring backend requires that CONFIG_KEYS be enabled in your kernel.])])
218 AC_CHECK_LIB([keyutils], [keyctl_search], [], [
219 gss_keyring_conf_test="fail"
220 AC_MSG_WARN([GSS keyring backend requires libkeyutils])])
222 AS_IF([test "x$gss_keyring_conf_test" != xfail], [
223 AC_DEFINE([HAVE_GSS_KEYRING], [1],
224 [Define this if you enable gss keyring backend])
225 enable_gss_keyring="yes"
227 AS_IF([test "x$enable_gss_keyring" = xyes], [
228 AC_MSG_ERROR([Cannot enable gss_keyring. See above for details.])
232 ]) # LC_CONFIG_GSS_KEYRING
235 # LC_HAVE_CRED_TGCRED
237 # rhel7 struct cred has no member tgcred
239 AC_DEFUN([LC_HAVE_CRED_TGCRED], [
240 LB_CHECK_COMPILE([if 'struct cred' has member 'tgcred'],
242 #include <linux/cred.h>
244 ((struct cred *)0)->tgcred = NULL;
246 AC_DEFINE(HAVE_CRED_TGCRED, 1,
247 [struct cred has member tgcred])
249 ]) # LC_HAVE_CRED_TGCRED
252 # LC_KEY_TYPE_INSTANTIATE_2ARGS
254 # rhel7 key_type->instantiate takes 2 args (struct key, struct key_preparsed_payload)
256 AC_DEFUN([LC_KEY_TYPE_INSTANTIATE_2ARGS], [
257 LB_CHECK_COMPILE([if 'key_type->instantiate' has two args],
258 key_type_instantiate_2args, [
259 #include <linux/key-type.h>
261 ((struct key_type *)0)->instantiate(0, NULL);
263 AC_DEFINE(HAVE_KEY_TYPE_INSTANTIATE_2ARGS, 1,
264 [key_type->instantiate has two args])
266 ]) # LC_KEY_TYPE_INSTANTIATE_2ARGS
271 AC_DEFUN([LC_CONFIG_SUNRPC], [
272 LB_CHECK_CONFIG_IM([SUNRPC], [], [
273 AS_IF([test "x$sunrpc_required" = xyes], [
276 kernel SUNRPC support is required by using GSS.
279 ]) # LC_CONFIG_SUNRPC
282 # LC_CONFIG_GSS (default 'auto' (tests for dependencies, if found, enables))
284 # Build gss and related tools of Lustre. Currently both kernel and user space
285 # parts are depend on linux platform.
287 AC_DEFUN([LC_CONFIG_GSS], [
288 AC_MSG_CHECKING([whether to enable gss support])
290 [AC_HELP_STRING([--enable-gss], [enable gss support])],
291 [], [enable_gss="auto"])
292 AC_MSG_RESULT([$enable_gss])
294 AS_IF([test "x$enable_gss" != xno], [
295 LC_CONFIG_GSS_KEYRING
297 LC_KEY_TYPE_INSTANTIATE_2ARGS
298 sunrpc_required=$enable_gss
302 LB_CHECK_CONFIG_IM([CRYPTO_MD5], [],
303 [AC_MSG_WARN([kernel MD5 support is recommended by using GSS.])])
304 LB_CHECK_CONFIG_IM([CRYPTO_SHA1], [],
305 [AC_MSG_WARN([kernel SHA1 support is recommended by using GSS.])])
306 LB_CHECK_CONFIG_IM([CRYPTO_SHA256], [],
307 [AC_MSG_WARN([kernel SHA256 support is recommended by using GSS.])])
308 LB_CHECK_CONFIG_IM([CRYPTO_SHA512], [],
309 [AC_MSG_WARN([kernel SHA512 support is recommended by using GSS.])])
311 require_krb5=$enable_gss
315 AS_IF([test -n "$KRBDIR"], [
316 gss_conf_test="success"
318 gss_conf_test="failure"
321 AS_IF([test "x$gss_conf_test" = xsuccess && test "x$enable_gss" != xno], [
322 AC_DEFINE([HAVE_GSS], [1], [Define this is if you enable gss])
325 enable_gss_keyring="no"
329 enable_ssk=$enable_gss
331 enable_gss_keyring="no"
337 # OpenSSL 1.0+ return int for HMAC functions but older SLES11 versions do not
338 AC_DEFUN([LC_OPENSSL_SSK], [
339 AC_MSG_CHECKING([whether OpenSSL has functions needed for SSK])
340 AS_IF([test "x$enable_ssk" != xno], [
341 AC_COMPILE_IFELSE([AC_LANG_SOURCE([
342 #include <openssl/hmac.h>
343 #include <openssl/evp.h>
347 rc = HMAC_Init_ex(NULL, "test", 4, EVP_md_null(), NULL);
349 ])],[AC_DEFINE(HAVE_OPENSSL_SSK, 1,
350 [OpenSSL HMAC functions needed for SSK])],
353 AC_MSG_RESULT([$enable_ssk])
356 # LC_OPENSSL_GETSEPOL
358 # OpenSSL is needed for l_getsepol
359 AC_DEFUN([LC_OPENSSL_GETSEPOL], [
360 AC_MSG_CHECKING([whether openssl-devel is present])
361 AC_COMPILE_IFELSE([AC_LANG_SOURCE([
362 #include <openssl/evp.h>
365 EVP_MD_CTX *mdctx = EVP_MD_CTX_create();
368 AC_DEFINE(HAVE_OPENSSL_GETSEPOL, 1, [openssl-devel is present])
369 enable_getsepol="yes"
375 No openssk-devel headers found, unable to build l_getsepol and SELinux status checking
378 AC_MSG_RESULT([$enable_getsepol])
379 ]) # LC_OPENSSL_GETSEPOL
381 # LC_INODE_PERMISION_2ARGS
383 # up to v2.6.27 had a 3 arg version (inode, mask, nameidata)
384 # v2.6.27->v2.6.37 had a 2 arg version (inode, mask)
385 # v2.6.37->v3.0 had a 3 arg version (inode, mask, nameidata)
386 # v3.1 onward have a 2 arg version (inode, mask)
388 AC_DEFUN([LC_INODE_PERMISION_2ARGS], [
389 LB_CHECK_COMPILE([if 'inode_operations->permission' has two args],
390 inode_ops_permission_2args, [
391 #include <linux/fs.h>
393 struct inode *inode __attribute__ ((unused));
396 inode->i_op->permission(NULL, 0);
398 AC_DEFINE(HAVE_INODE_PERMISION_2ARGS, 1,
399 [inode_operations->permission has two args])
401 ]) # LC_INODE_PERMISION_2ARGS
404 # LC_HAVE_FSTYPE_MOUNT
406 # 2.6.39 replace get_sb with mount in struct file_system_type
408 AC_DEFUN([LC_HAVE_FSTYPE_MOUNT], [
409 LB_CHECK_COMPILE([if 'file_system_type' has 'mount' field],
410 file_system_type_mount, [
411 #include <linux/fs.h>
413 struct file_system_type fst = { };
416 mount = (void *)fst.mount;
418 AC_DEFINE(HAVE_FSTYPE_MOUNT, 1,
419 [struct file_system_type has mount field])
421 ]) # LC_HAVE_FSTYPE_MOUNT
424 # LC_HAVE_FHANDLE_SYSCALLS
426 # 2.6.39 The open_by_handle_at() and name_to_handle_at() system calls were
427 # added to Linux kernel 2.6.39.
428 # Check if client supports these functions
430 AC_DEFUN([LC_HAVE_FHANDLE_SYSCALLS], [
431 LB_CHECK_CONFIG_IM([FHANDLE],[
432 AC_DEFINE(HAVE_FHANDLE_SYSCALLS, 1,
433 [kernel supports fhandles and related syscalls])
435 ]) # LC_HAVE_FHANDLE_SYSCALLS
438 # LC_HAVE_INODE_OWNER_OR_CAPABLE
440 # 2.6.39 renames is_owner_or_cap to inode_owner_or_capable
442 AC_DEFUN([LC_HAVE_INODE_OWNER_OR_CAPABLE], [
443 LB_CHECK_COMPILE([if 'inode_owner_or_capable' exist],
444 inode_owner_or_capable, [
445 #include <linux/fs.h>
447 inode_owner_or_capable(NULL);
449 AC_DEFINE(HAVE_INODE_OWNER_OR_CAPABLE, 1,
450 [inode_owner_or_capable exist])
452 ]) # LC_HAVE_INODE_OWNER_OR_CAPABLE
455 # LC_DIRTY_INODE_WITH_FLAG
457 # 3.0 dirty_inode() has a flag parameter
458 # see kernel commit aa38572954ade525817fe88c54faebf85e5a61c0
460 AC_DEFUN([LC_DIRTY_INODE_WITH_FLAG], [
461 LB_CHECK_COMPILE([if 'dirty_inode' super_operation takes flag],
462 dirty_inode_super_operation_flag, [
463 #include <linux/fs.h>
465 struct inode *inode = NULL;
466 inode->i_sb->s_op->dirty_inode(NULL, 0);
468 AC_DEFINE(HAVE_DIRTY_INODE_HAS_FLAG, 1,
469 [dirty_inode super_operation takes flag])
471 ]) # LC_DIRTY_INODE_WITH_FLAG
476 # 3.0 introduced setns
478 AC_DEFUN([LC_SETNS], [
479 AC_CHECK_HEADERS([sched.h], [], [],
482 AC_CHECK_FUNCS([setns])
486 # LC_LM_XXX_LOCK_MANAGER_OPS
488 # 3.1 renames lock-manager ops(lock_manager_operations) from fl_xxx to lm_xxx
489 # see kernel commit 8fb47a4fbf858a164e973b8ea8ef5e83e61f2e50
491 AC_DEFUN([LC_LM_XXX_LOCK_MANAGER_OPS], [
492 LB_CHECK_COMPILE([if 'lock-manager' ops renamed to 'lm_xxx'],
493 lock_manager_ops_lm_xxx, [
494 #include <linux/fs.h>
496 struct lock_manager_operations lm_ops;
497 lm_ops.lm_notify = NULL;
499 AC_DEFINE(HAVE_LM_XXX_LOCK_MANAGER_OPS, 1,
500 [lock-manager ops renamed to lm_xxx])
502 ]) # LC_LM_XXX_LOCK_MANAGER_OPS
507 # 3.1 kills inode->i_alloc_sem, use i_dio_count and inode_dio_wait
509 # see kernel commit bd5fe6c5eb9c548d7f07fe8f89a150bb6705e8e3
511 AC_DEFUN([LC_INODE_DIO_WAIT], [
512 LB_CHECK_COMPILE([if 'inode->i_alloc_sem' is killed and use inode_dio_wait],
514 #include <linux/fs.h>
516 inode_dio_wait((struct inode *)0);
518 AC_DEFINE(HAVE_INODE_DIO_WAIT, 1,
519 [inode->i_alloc_sem is killed and use inode_dio_wait])
521 ]) # LC_INODE_DIO_WAIT
526 # 3.1 adds get_acl method to inode_operations to read ACL from disk.
527 # see kernel commit 4e34e719e457f2e031297175410fc0bd4016a085
529 AC_DEFUN([LC_IOP_GET_ACL], [
530 LB_CHECK_COMPILE([if 'inode_operations' has '.get_acl' member function],
532 #include <linux/fs.h>
534 struct inode_operations iop;
537 AC_DEFINE(HAVE_IOP_GET_ACL, 1,
538 [inode_operations has .get_acl member function])
543 # LC_FILE_LLSEEK_SIZE
545 # 3.1 introduced generic_file_llseek_size()
547 AC_DEFUN([LC_FILE_LLSEEK_SIZE], [
548 LB_CHECK_EXPORT([generic_file_llseek_size], [fs/read_write.c],
549 [AC_DEFINE(HAVE_FILE_LLSEEK_SIZE, 1,
550 [generic_file_llseek_size is exported by the kernel])])
551 ]) # LC_FILE_LLSEEK_SIZE
554 # LC_RADIX_EXCEPTION_ENTRY
555 # 3.1 adds radix_tree_exception_entry.
557 AC_DEFUN([LC_RADIX_EXCEPTION_ENTRY], [
558 LB_CHECK_COMPILE([radix_tree_exceptional_entry exist],
559 radix_tree_exceptional_entry, [
560 #include <linux/radix-tree.h>
562 radix_tree_exceptional_entry(NULL);
564 AC_DEFINE(HAVE_RADIX_EXCEPTION_ENTRY, 1,
565 [radix_tree_exceptional_entry exist])
567 ]) # LC_RADIX_EXCEPTION_ENTRY
570 # LC_HAVE_PROTECT_I_NLINK
572 # 3.2 protects inode->i_nlink from direct modification
573 # see kernel commit a78ef704a8dd430225955f0709b22d4a6ba21deb
574 # at the same time adds set_nlink(), so checks set_nlink() for it.
576 AC_DEFUN([LC_HAVE_PROTECT_I_NLINK], [
577 LB_CHECK_COMPILE([if 'inode->i_nlink' is protected from direct modification],
578 inode_i_nlink_protected, [
579 #include <linux/fs.h>
584 AC_DEFINE(HAVE_PROTECT_I_NLINK, 1,
585 [inode->i_nlink is protected from direct modification])
587 ]) # LC_HAVE_PROTECT_I_NLINK
590 # 2.6.39 security_inode_init_security takes a 'struct qstr' parameter
592 # 3.2 security_inode_init_security takes a callback to set xattrs
594 AC_DEFUN([LC_HAVE_SECURITY_IINITSEC], [
595 LB_CHECK_COMPILE([if security_inode_init_security takes a callback],
596 security_inode_init_security_callback, [
597 #include <linux/security.h>
599 security_inode_init_security(NULL, NULL, NULL, (const initxattrs)NULL, NULL);
601 AC_DEFINE(HAVE_SECURITY_IINITSEC_CALLBACK, 1,
602 [security_inode_init_security takes a callback to set xattrs])
604 LB_CHECK_COMPILE([if security_inode_init_security takes a 'struct qstr' parameter],
605 security_inode_init_security_qstr, [
606 #include <linux/security.h>
608 security_inode_init_security(NULL, NULL, (struct qstr *)NULL, NULL, NULL, NULL);
610 AC_DEFINE(HAVE_SECURITY_IINITSEC_QSTR, 1,
611 [security_inode_init_security takes a 'struct qstr' parameter])
614 ]) # LC_HAVE_SECURITY_IINITSEC
617 # 2.6.39 vfs_create takes a 'struct nameidata' parameter
619 AC_DEFUN([LC_VFS_CREATE_USE_NAMEIDATA], [
620 LB_CHECK_COMPILE([if vfs_create takes a struct nameidata parameter],
622 #include <linux/namei.h>
623 #include <linux/fs.h>
625 struct nameidata *nd;
626 vfs_create(NULL, NULL, 0, nd);
628 AC_DEFINE(HAVE_VFS_CREATE_USE_NAMEIDATA, 1,
629 [vfs_create use nameidata as parameter])
631 ]) # LC_VFS_CREATE_USE_NAMEIDATA
634 # LC_HAVE_MIGRATE_HEADER
636 # 3.3 introduces migrate_mode.h and migratepage has 4 args
638 AC_DEFUN([LC_HAVE_MIGRATE_HEADER], [
639 LB_CHECK_FILE([$LINUX/include/linux/migrate.h], [
640 AC_DEFINE(HAVE_MIGRATE_H, 1,
641 [kernel has include/linux/migrate.h])
643 LB_CHECK_FILE([$LINUX/include/linux/migrate_mode.h], [
644 AC_DEFINE(HAVE_MIGRATE_MODE_H, 1,
645 [kernel has include/linux/migrate_mode.h])
648 ]) # LC_HAVE_MIGRATE_HEADER
651 # LC_MIGRATEPAGE_4ARGS
653 AC_DEFUN([LC_MIGRATEPAGE_4ARGS], [
654 LB_CHECK_COMPILE([if 'address_space_operations.migratepage' has 4 args],
655 address_space_ops_migratepage_4args, [
656 #include <linux/fs.h>
657 #ifdef HAVE_MIGRATE_H
658 #include <linux/migrate.h>
659 #elif defined(HAVE_MIGRATE_MODE_H)
660 #include <linux/migrate_mode.h>
663 struct address_space_operations aops = { };
664 aops.migratepage(NULL, NULL, NULL, MIGRATE_ASYNC);
666 AC_DEFINE(HAVE_MIGRATEPAGE_4ARGS, 1,
667 [address_space_operations.migratepage has 4 args])
669 ]) # LC_MIGRATEPAGE_4ARGS
672 # LC_SUPEROPS_USE_DENTRY
674 # 3.3 switchs super_operations to use dentry as parameter (but not vfsmount)
675 # see kernel commit 34c80b1d93e6e20ca9dea0baf583a5b5510d92d4
677 AC_DEFUN([LC_SUPEROPS_USE_DENTRY], [
678 tmp_flags="$EXTRA_KCFLAGS"
679 EXTRA_KCFLAGS="-Werror"
680 LB_CHECK_COMPILE([if 'super_operations' use 'dentry' as parameter],
682 #include <linux/fs.h>
683 int show_options(struct seq_file *seq, struct dentry *root) {
687 struct super_operations ops;
688 ops.show_options = show_options;
690 AC_DEFINE(HAVE_SUPEROPS_USE_DENTRY, 1,
691 [super_operations use dentry as parameter])
693 EXTRA_KCFLAGS="$tmp_flags"
694 ]) # LC_SUPEROPS_USE_DENTRY
697 # LC_INODEOPS_USE_UMODE_T
699 # 3.3 switchs inode_operations to use umode_t as parameter (but not int)
700 # see kernel commit 1a67aafb5f72a436ca044293309fa7e6351d6a35
702 AC_DEFUN([LC_INODEOPS_USE_UMODE_T], [
703 tmp_flags="$EXTRA_KCFLAGS"
704 EXTRA_KCFLAGS="-Werror"
705 LB_CHECK_COMPILE([if 'inode_operations' use 'umode_t' as parameter],
707 #include <linux/fs.h>
708 #include <linux/types.h>
709 int my_mknod(struct inode *dir, struct dentry *dchild,
710 umode_t mode, dev_t dev)
715 struct inode_operations ops;
716 ops.mknod = my_mknod;
718 AC_DEFINE(HAVE_INODEOPS_USE_UMODE_T, 1,
719 [inode_operations use umode_t as parameter])
721 EXTRA_KCFLAGS="$tmp_flags"
722 ]) # LC_INODEOPS_USE_UMODE_T
725 # LC_KMAP_ATOMIC_HAS_1ARG
727 # 3.4 kmap_atomic removes second argument
728 # see kernel commit 1ec9c5ddc17aa398f05646abfcbaf315b544e62f
730 AC_DEFUN([LC_KMAP_ATOMIC_HAS_1ARG], [
731 LB_CHECK_COMPILE([if 'kmap_atomic' has only 1 argument],
733 #include <linux/highmem.h>
737 AC_DEFINE(HAVE_KMAP_ATOMIC_HAS_1ARG, 1,
738 [have kmap_atomic has only 1 argument])
740 ]) # LC_KMAP_ATOMIC_HAS_1ARG
743 # LC_HAVE_D_MAKE_ROOT
745 # 3.4 converts d_alloc_root to d_make_root
746 # see kernel commit 32991ab305ace7017c62f8eecbe5eb36dc32e13b
748 AC_DEFUN([LC_HAVE_D_MAKE_ROOT], [
749 LB_CHECK_COMPILE([if have 'd_make_root'],
751 #include <linux/fs.h>
753 d_make_root((struct inode *)NULL);
755 AC_DEFINE(HAVE_D_MAKE_ROOT, 1,
758 ]) # LC_HAVE_D_MAKE_ROOT
761 # LC_HAVE_CACHE_REGISTER
763 # 3.4 cache_register/cache_unregister are removed
764 # see kernel commit 2c5f846747526e2b83c5f1b8e69016be0e2e87c0
765 # Note, since 2.6.37 cache_register_net/cache_unregister_net
766 # are defined, but not exported.
767 # 3.3 cache_register_net/cache_unregister_net are
768 # exported and replacing cache_register/cache_unregister in 3.4
770 AC_DEFUN([LC_HAVE_CACHE_REGISTER], [
771 LB_CHECK_COMPILE([if have 'cache_register'],
773 #include <linux/sunrpc/cache.h>
775 cache_register(NULL);
777 AC_DEFINE(HAVE_CACHE_REGISTER, 1,
778 [have cache_register])
780 ]) # LC_HAVE_CACHE_REGISTER
783 # LC_HAVE_CLEAR_INODE
785 # 3.5 renames end_writeback() back to clear_inode()...
786 # see kernel commit dbd5768f87ff6fb0a4fe09c4d7b6c4a24de99430
788 AC_DEFUN([LC_HAVE_CLEAR_INODE], [
789 LB_CHECK_COMPILE([if have 'clear_inode'],
791 #include <linux/fs.h>
793 clear_inode((struct inode *)NULL);
795 AC_DEFINE(HAVE_CLEAR_INODE, 1,
798 ]) # LC_HAVE_CLEAR_INODE
801 # LC_HAVE_ENCODE_FH_PARENT
803 # 3.5 encode_fh has parent inode passed in directly
804 # see kernel commit b0b0382b
806 AC_DEFUN([LC_HAVE_ENCODE_FH_PARENT], [
807 tmp_flags="$EXTRA_KCFLAGS"
808 EXTRA_KCFLAGS="-Werror"
809 LB_CHECK_COMPILE([if 'encode_fh' have parent inode as parameter],
810 encode_fh_parent_inode, [
811 #include <linux/exportfs.h>
812 #include <linux/fs.h>
813 #include <linux/types.h>
814 int ll_encode_fh(struct inode *i, __u32 *a, int *b, struct inode *p)
819 struct export_operations exp_op;
820 exp_op.encode_fh = ll_encode_fh;
822 AC_DEFINE(HAVE_ENCODE_FH_PARENT, 1,
823 [have parent inode as parameter])
825 EXTRA_KCFLAGS="$tmp_flags"
826 ]) # LC_HAVE_ENCODE_FH_PARENT
829 # LC_FILE_LLSEEK_SIZE_5ARG
831 # 3.5 has generic_file_llseek_size with 5 args
833 AC_DEFUN([LC_FILE_LLSEEK_SIZE_5ARG], [
834 LB_CHECK_COMPILE([if Linux kernel has 'generic_file_llseek_size' with 5 args],
835 generic_file_llseek_size_5args, [
836 #include <linux/fs.h>
838 generic_file_llseek_size(NULL, 0, 0, 0, 0);
840 AC_DEFINE(HAVE_FILE_LLSEEK_SIZE_5ARGS, 1,
841 [kernel has generic_file_llseek_size with 5 args])
843 ]) # LC_FILE_LLSEEK_SIZE_5ARG
846 # LC_LLITE_DATA_IS_LIST
848 # 3.6 switch i_dentry/d_alias from list to hlist
850 # In the upstream kernels d_alias first changes
851 # to a hlist and then in later version, 3.11, gets
852 # moved to the union d_u. Due to some distros having
853 # d_alias in the d_u union as a struct list, which
854 # has never existed upstream stream, we can't test
855 # if d_alias is a list or hlist directly. If ever
856 # i_dentry and d_alias even up different combos then
857 # the build will fail. In that case then we will need
858 # to separate out the i_dentry and d_alias test below.
860 AC_DEFUN([LC_DATA_FOR_LLITE_IS_LIST], [
861 tmp_flags="$EXTRA_KCFLAGS"
862 EXTRA_KCFLAGS="-Werror"
863 LB_CHECK_COMPILE([if 'i_dentry/d_alias' uses 'list'],
864 i_dentry_d_alias_list, [
865 #include <linux/fs.h>
868 INIT_LIST_HEAD(&inode.i_dentry);
870 AC_DEFINE(DATA_FOR_LLITE_IS_LIST, 1,
871 [both i_dentry/d_alias uses list])
873 EXTRA_KCFLAGS="$tmp_flags"
874 ]) # LC_DATA_FOR_LLITE_IS_LIST
877 # LC_DENTRY_OPEN_USE_PATH
879 # 3.6 dentry_open uses struct path as first argument
880 # see kernel commit 765927b2
882 AC_DEFUN([LC_DENTRY_OPEN_USE_PATH], [
883 tmp_flags="$EXTRA_KCFLAGS"
884 EXTRA_KCFLAGS="-Werror"
885 LB_CHECK_COMPILE([if 'dentry_open' uses 'struct path' as first argument],
887 #include <linux/fs.h>
888 #include <linux/path.h>
891 dentry_open(&path, 0, NULL);
893 AC_DEFINE(HAVE_DENTRY_OPEN_USE_PATH, 1,
894 [dentry_open uses struct path as first argument])
896 EXTRA_KCFLAGS="$tmp_flags"
897 ]) # LC_DENTRY_OPEN_USE_PATH
900 # LC_HAVE_IOP_ATOMIC_OPEN
902 # 3.6 vfs adds iop->atomic_open
904 AC_DEFUN([LC_HAVE_IOP_ATOMIC_OPEN], [
905 LB_CHECK_COMPILE([if 'iop' has 'atomic_open'],
906 inode_ops_atomic_open, [
907 #include <linux/fs.h>
909 struct inode_operations iop;
910 iop.atomic_open = NULL;
912 AC_DEFINE(HAVE_IOP_ATOMIC_OPEN, 1,
913 [have iop atomic_open])
915 ]) # LC_HAVE_IOP_ATOMIC_OPEN
918 # LC_HAVE_SB_START_WRITE
920 # RHEL6 2.6.32, 3.6 or newer support wrapped FS freeze functions
922 AC_DEFUN([LC_HAVE_SB_START_WRITE], [
923 LB_CHECK_COMPILE([if kernel supports wrapped FS freeze functions],
925 #include <linux/fs.h>
927 sb_start_write(NULL);
929 AC_DEFINE(HAVE_SB_START_WRITE, 1,
930 [kernel supports wrapped FS freeze functions])
932 ]) # LC_HAVE_SB_START_WRITE
935 # LC_HAVE_POSIXACL_USER_NS
937 # 3.7 posix_acl_{to,from}_xattr take struct user_namespace
939 AC_DEFUN([LC_HAVE_POSIXACL_USER_NS], [
940 LB_CHECK_COMPILE([if 'posix_acl_to_xattr' takes 'struct user_namespace'],
941 posix_acl_to_xattr_user_namespace, [
942 #include <linux/fs.h>
943 #include <linux/posix_acl_xattr.h>
945 posix_acl_to_xattr((struct user_namespace *)NULL, NULL, NULL, 0);
947 AC_DEFINE(HAVE_POSIXACL_USER_NS, 1,
948 [posix_acl_to_xattr takes struct user_namespace])
950 ]) # LC_HAVE_POSIXACL_USER_NS
953 # LC_HAVE_FILE_F_INODE
955 # 3.8 struct file has new member f_inode
957 AC_DEFUN([LC_HAVE_FILE_F_INODE], [
958 LB_CHECK_COMPILE([if 'struct file' has member 'f_inode'],
960 #include <linux/fs.h>
962 ((struct file *)0)->f_inode = NULL;
964 AC_DEFINE(HAVE_FILE_F_INODE, 1,
965 [struct file has member f_inode])
967 ]) # LC_HAVE_FILE_F_INODE
972 # 3.8 has introduced inline function file_inode
974 AC_DEFUN([LC_HAVE_FILE_INODE], [
975 LB_CHECK_COMPILE([if file_inode() exists],
977 #include <linux/fs.h>
981 AC_DEFINE(HAVE_FILE_INODE, 1,
982 [file_inode() has been defined])
984 ]) # LC_HAVE_FILE_INODE
987 # LC_HAVE_SUNRPC_UPCALL_HAS_3ARGS
989 AC_DEFUN([LC_HAVE_SUNRPC_UPCALL_HAS_3ARGS], [
990 LB_CHECK_COMPILE([if 'sunrpc_cache_pipe_upcall' takes 3 args],
991 sunrpc_cache_pipe_upcall_3args, [
992 #include <linux/sunrpc/cache.h>
994 sunrpc_cache_pipe_upcall(NULL, NULL, NULL);
996 AC_DEFINE(HAVE_SUNRPC_UPCALL_HAS_3ARGS, 1,
997 [sunrpc_cache_pipe_upcall takes 3 args])
999 ]) # LC_HAVE_SUNRPC_UPCALL_HAS_3ARGS
1002 # LC_HAVE_HLIST_FOR_EACH_3ARG
1004 # 3.9 uses hlist_for_each_entry with 3 args
1005 # b67bfe0d42cac56c512dd5da4b1b347a23f4b70a
1007 AC_DEFUN([LC_HAVE_HLIST_FOR_EACH_3ARG], [
1008 LB_CHECK_COMPILE([if 'hlist_for_each_entry' has 3 args],
1009 hlist_for_each_entry_3args, [
1010 #include <linux/list.h>
1011 #include <linux/fs.h>
1013 struct hlist_head *head = NULL;
1014 struct inode *inode;
1016 hlist_for_each_entry(inode, head, i_hash) {
1020 AC_DEFINE(HAVE_HLIST_FOR_EACH_3ARG, 1,
1021 [hlist_for_each_entry has 3 args])
1023 ]) # LC_HAVE_HLIST_FOR_EACH_3ARG
1026 # LC_HAVE_BIO_END_SECTOR
1028 # 3.9 introduces bio_end_sector macro
1029 # f73a1c7d117d07a96d89475066188a2b79e53c48
1031 AC_DEFUN([LC_HAVE_BIO_END_SECTOR], [
1032 LB_CHECK_COMPILE([if 'bio_end_sector' is defined],
1034 #include <linux/bio.h>
1036 struct bio bio = { };
1037 unsigned long long end;
1039 end = bio_end_sector(&bio);
1041 AC_DEFINE(HAVE_BIO_END_SECTOR, 1,
1042 [bio_end_sector is defined])
1044 ]) # LC_HAVE_BIO_END_SECTOR
1047 # 3.9 created is_sxid
1049 AC_DEFUN([LC_HAVE_IS_SXID], [
1050 LB_CHECK_COMPILE([if 'is_sxid' is defined],
1052 #include <linux/fs.h>
1054 struct inode inode = { };
1056 is_sxid(inode.i_mode);
1058 AC_DEFINE(HAVE_IS_SXID, 1, [is_sxid is defined])
1060 ]) # LC_HAVE_IS_SXID
1063 # LC_HAVE_VFS_GETATTR_2ARGS
1065 AC_DEFUN([LC_HAVE_VFS_GETATTR_2ARGS], [
1066 LB_CHECK_COMPILE([if vfs_getattr takes 2 args],
1068 #include <linux/fs.h>
1072 vfs_getattr(&path, NULL);
1074 AC_DEFINE(HAVE_VFS_GETATTR_2ARGS, 1,
1075 [vfs_getattr takes 2 args])
1077 ]) # LC_HAVE_VFS_GETATTR_2ARGS
1080 # LC_HAVE_REMOVE_PROC_SUBTREE
1082 # 3.10 introduced remove_proc_subtree
1084 AC_DEFUN([LC_HAVE_REMOVE_PROC_SUBTREE], [
1085 LB_CHECK_COMPILE([if 'remove_proc_subtree' is defined],
1086 remove_proc_subtree, [
1087 #include <linux/proc_fs.h>
1089 remove_proc_subtree(NULL, NULL);
1091 AC_DEFINE(HAVE_REMOVE_PROC_SUBTREE, 1,
1092 [remove_proc_subtree is defined])
1094 ]) # LC_HAVE_REMOVE_PROC_SUBTREE
1097 # LC_HAVE_PROC_REMOVE
1099 # 3.10 introduced proc_remove
1101 AC_DEFUN([LC_HAVE_PROC_REMOVE], [
1102 LB_CHECK_COMPILE([if 'proc_remove' is defined],
1104 #include <linux/proc_fs.h>
1108 AC_DEFINE(HAVE_PROC_REMOVE, 1,
1109 [proc_remove is defined])
1111 ]) # LC_HAVE_PROC_REMOVE
1113 AC_DEFUN([LC_HAVE_PROJECT_QUOTA], [
1114 LB_CHECK_COMPILE([if get_projid exists],
1117 #include <linux/quota.h>
1119 struct dquot_operations ops = { };
1121 ops.get_projid(NULL, NULL);
1123 AC_DEFINE(HAVE_PROJECT_QUOTA, 1,
1124 [get_projid function exists])
1126 ]) # LC_HAVE_PROJECT_QUOTA
1130 # LC_HAVE_SECURITY_DENTRY_INIT_SECURITY
1132 # 3.10 introduced security_dentry_init_security()
1134 AC_DEFUN([LC_HAVE_SECURITY_DENTRY_INIT_SECURITY], [
1135 LB_CHECK_COMPILE([if 'security_dentry_init_security' is defined],
1136 security_dentry_init_security, [
1137 #include <linux/security.h>
1139 security_dentry_init_security(NULL, 0, NULL, NULL, NULL);
1141 AC_DEFINE(HAVE_SECURITY_DENTRY_INIT_SECURITY, 1,
1142 [security_dentry_init_security' is defined])
1144 ]) # LC_HAVE_SECURITY_DENTRY_INIT_SECURITY
1147 # 3.10 exports security_inode_listsecurity
1149 AC_DEFUN([LC_HAVE_SECURITY_INODE_LISTSECURITY], [
1150 LB_CHECK_COMPILE([if security_inode_listsecurity() is available/exported],
1151 security_inode_listsecurity, [
1152 #include <linux/security.h>
1154 security_inode_listsecurity(NULL, NULL, 0);
1156 AC_DEFINE(HAVE_SECURITY_INODE_LISTSECURITY, 1,
1157 [security_inode_listsecurity() is available/exported])
1159 ]) # LC_HAVE_SECURITY_INODE_LISTSECURITY
1162 # LC_INVALIDATE_RANGE
1164 # 3.11 invalidatepage requires the length of the range to invalidate
1166 AC_DEFUN([LC_INVALIDATE_RANGE], [
1167 LB_CHECK_COMPILE([if 'address_space_operations.invalidatepage' requires 3 arguments],
1168 address_space_ops_invalidatepage_3args, [
1169 #include <linux/fs.h>
1171 struct address_space_operations a_ops;
1172 a_ops.invalidatepage(NULL, 0, 0);
1174 AC_DEFINE(HAVE_INVALIDATE_RANGE, 1,
1175 [address_space_operations.invalidatepage needs 3 arguments])
1177 ]) # LC_INVALIDATE_RANGE
1180 # LC_HAVE_DIR_CONTEXT
1182 # 3.11 readdir now takes the new struct dir_context
1184 AC_DEFUN([LC_HAVE_DIR_CONTEXT], [
1185 LB_CHECK_COMPILE([if 'dir_context' exist],
1187 #include <linux/fs.h>
1189 #ifdef FMODE_KABI_ITERATE
1190 #error "back to use readdir in kabi_extand mode"
1192 struct dir_context ctx;
1197 AC_DEFINE(HAVE_DIR_CONTEXT, 1,
1198 [dir_context exist])
1200 ]) # LC_HAVE_DIR_CONTEXT
1203 # LC_D_COMPARE_5ARGS
1205 # 3.11 dentry_operations.d_compare() taken 5 arguments.
1207 AC_DEFUN([LC_D_COMPARE_5ARGS], [
1208 LB_CHECK_COMPILE([if 'd_compare' taken 5 arguments],
1210 #include <linux/dcache.h>
1212 ((struct dentry_operations*)0)->d_compare(NULL,NULL,0,NULL,NULL);
1214 AC_DEFINE(HAVE_D_COMPARE_5ARGS, 1,
1215 [d_compare need 5 arguments])
1217 ]) # LC_D_COMPARE_5ARGS
1222 # 3.11 need to access d_count to get dentry reference count
1224 AC_DEFUN([LC_HAVE_DCOUNT], [
1225 LB_CHECK_COMPILE([if 'd_count' exists],
1227 #include <linux/dcache.h>
1229 struct dentry de = { };
1232 count = d_count(&de);
1234 AC_DEFINE(HAVE_D_COUNT, 1,
1240 # LC_PID_NS_FOR_CHILDREN
1242 # 3.11 replaces pid_ns by pid_ns_for_children in struct nsproxy
1244 AC_DEFUN([LC_PID_NS_FOR_CHILDREN], [
1245 LB_CHECK_COMPILE([if 'struct nsproxy' has 'pid_ns_for_children'],
1246 pid_ns_for_children, [
1247 #include <linux/nsproxy.h>
1250 ns.pid_ns_for_children = NULL;
1252 AC_DEFINE(HAVE_PID_NS_FOR_CHILDREN, 1,
1253 ['struct nsproxy' has 'pid_ns_for_children'])
1255 ]) # LC_PID_NS_FOR_CHILDREN
1258 # LC_OLDSIZE_TRUNCATE_PAGECACHE
1260 # 3.12 truncate_pagecache without oldsize parameter
1262 AC_DEFUN([LC_OLDSIZE_TRUNCATE_PAGECACHE], [
1263 LB_CHECK_COMPILE([if 'truncate_pagecache' with 'old_size' parameter],
1264 truncate_pagecache_old_size, [
1265 #include <linux/mm.h>
1267 truncate_pagecache(NULL, 0, 0);
1269 AC_DEFINE(HAVE_OLDSIZE_TRUNCATE_PAGECACHE, 1,
1272 ]) # LC_OLDSIZE_TRUNCATE_PAGECACHE
1275 # LC_PTR_ERR_OR_ZERO
1277 # For some reason SLES11SP4 is missing the PTR_ERR_OR_ZERO macro
1278 # It was added to linux kernel 3.12
1280 AC_DEFUN([LC_PTR_ERR_OR_ZERO_MISSING], [
1281 LB_CHECK_COMPILE([if 'PTR_ERR_OR_ZERO' is missing],
1283 #include <linux/err.h>
1285 if (PTR_ERR_OR_ZERO(NULL)) return 0;
1287 AC_DEFINE(HAVE_PTR_ERR_OR_ZERO, 1,
1288 ['PTR_ERR_OR_ZERO' exist])
1290 ]) # LC_PTR_ERR_OR_ZERO_MISSING
1293 # LC_HAVE_DENTRY_D_U_D_ALIAS
1295 # 3.11 kernel moved d_alias to the union d_u in struct dentry
1297 # Some distros move d_alias to d_u but it is still a struct list
1299 AC_DEFUN([LC_HAVE_DENTRY_D_U_D_ALIAS], [
1300 AS_IF([test "x$lb_cv_compile_i_dentry_d_alias_list" = xyes], [
1301 LB_CHECK_COMPILE([if list 'dentry.d_u.d_alias' exist],
1303 #include <linux/list.h>
1304 #include <linux/dcache.h>
1307 INIT_LIST_HEAD(&de.d_u.d_alias);
1309 AC_DEFINE(HAVE_DENTRY_D_U_D_ALIAS, 1,
1310 [list dentry.d_u.d_alias exist])
1313 LB_CHECK_COMPILE([if hlist 'dentry.d_u.d_alias' exist],
1315 #include <linux/list.h>
1316 #include <linux/dcache.h>
1319 INIT_HLIST_NODE(&de.d_u.d_alias);
1321 AC_DEFINE(HAVE_DENTRY_D_U_D_ALIAS, 1,
1322 [hlist dentry.d_u.d_alias exist])
1325 ]) # LC_HAVE_DENTRY_D_U_D_ALIAS
1328 # LC_HAVE_DENTRY_D_CHILD
1330 # 3.11 kernel d_child has been moved out of the union d_u
1333 AC_DEFUN([LC_HAVE_DENTRY_D_CHILD], [
1334 LB_CHECK_COMPILE([if 'dentry.d_child' exist],
1336 #include <linux/list.h>
1337 #include <linux/dcache.h>
1340 INIT_LIST_HEAD(&de.d_child);
1342 AC_DEFINE(HAVE_DENTRY_D_CHILD, 1,
1343 [dentry.d_child exist])
1345 ]) # LC_HAVE_DENTRY_D_CHILD
1350 # 3.12 ki_left removed from struct kiocb
1352 AC_DEFUN([LC_KIOCB_KI_LEFT], [
1353 LB_CHECK_COMPILE([if 'struct kiocb' with 'ki_left' member],
1355 #include <linux/aio.h>
1357 ((struct kiocb*)0)->ki_left = 0;
1359 AC_DEFINE(HAVE_KIOCB_KI_LEFT, 1,
1362 ]) # LC_KIOCB_KI_LEFT
1365 # LC_INIT_LIST_HEAD_RCU
1367 # 3.12 added INIT_LIST_HEAD_RCU in commit 2a855b644c310d5db5
1368 # which is unfortunately an inline function and not a macro
1369 # that can be tested directly, so it needs a configure check.
1371 AC_DEFUN([LC_INIT_LIST_HEAD_RCU], [
1372 LB_CHECK_COMPILE([if 'INIT_LIST_HEAD_RCU' exists],
1373 init_list_head_rcu, [
1374 #include <linux/list.h>
1375 #include <linux/rculist.h>
1377 struct list_head list;
1378 INIT_LIST_HEAD_RCU(&list);
1380 AC_DEFINE(HAVE_INIT_LIST_HEAD_RCU, 1,
1381 [INIT_LIST_HEAD_RCU exists])
1383 ]) # LC_INIT_LIST_HEAD_RCU
1386 # LC_VFS_RENAME_5ARGS
1388 # 3.13 has vfs_rename with 5 args
1390 AC_DEFUN([LC_VFS_RENAME_5ARGS], [
1391 LB_CHECK_COMPILE([if Linux kernel has 'vfs_rename' with 5 args],
1393 #include <linux/fs.h>
1395 vfs_rename(NULL, NULL, NULL, NULL, NULL);
1397 AC_DEFINE(HAVE_VFS_RENAME_5ARGS, 1,
1398 [kernel has vfs_rename with 5 args])
1400 ]) # LC_VFS_RENAME_5ARGS
1403 # LC_VFS_UNLINK_3ARGS
1405 # 3.13 has vfs_unlink with 3 args
1407 AC_DEFUN([LC_VFS_UNLINK_3ARGS], [
1408 LB_CHECK_COMPILE([if Linux kernel has 'vfs_unlink' with 3 args],
1410 #include <linux/fs.h>
1412 vfs_unlink(NULL, NULL, NULL);
1414 AC_DEFINE(HAVE_VFS_UNLINK_3ARGS, 1,
1415 [kernel has vfs_unlink with 3 args])
1417 ]) # LC_VFS_UNLINK_3ARGS
1419 # LC_HAVE_D_IS_POSITIVE
1421 # Kernel version 3.13 b18825a7c8e37a7cf6abb97a12a6ad71af160de7
1422 # d_is_positive is added
1424 AC_DEFUN([LC_HAVE_D_IS_POSITIVE], [
1425 LB_CHECK_COMPILE([if 'd_is_positive' exist],
1427 #include <linux/dcache.h>
1429 d_is_positive(NULL);
1431 AC_DEFINE(HAVE_D_IS_POSITIVE, 1,
1432 ['d_is_positive' is available])
1434 ]) # LC_HAVE_D_IS_POSITIVE
1439 # 3.14 move some of its data in struct bio into the new
1442 AC_DEFUN([LC_HAVE_BVEC_ITER], [
1443 LB_CHECK_COMPILE([if Linux kernel has struct bvec_iter],
1445 #include <linux/bio.h>
1447 struct bvec_iter iter;
1449 iter.bi_bvec_done = 0;
1451 AC_DEFINE(HAVE_BVEC_ITER, 1,
1452 [kernel has struct bvec_iter])
1454 ]) # LC_HAVE_BVEC_ITER
1459 # 3.14 adds set_acl method to inode_operations
1460 # see kernel commit 893d46e443346370cd4ea81d9d35f72952c62a37
1462 AC_DEFUN([LC_IOP_SET_ACL], [
1463 LB_CHECK_COMPILE([if 'inode_operations' has '.set_acl' member function],
1464 inode_ops_set_acl, [
1465 #include <linux/fs.h>
1467 struct inode_operations iop;
1470 AC_DEFINE(HAVE_IOP_SET_ACL, 1,
1471 [inode_operations has .set_acl member function])
1476 # LC_HAVE_TRUNCATE_IPAGE_FINAL
1478 # 3.14 bring truncate_inode_pages_final for evict_inode
1480 AC_DEFUN([LC_HAVE_TRUNCATE_IPAGES_FINAL], [
1481 LB_CHECK_COMPILE([if Linux kernel has truncate_inode_pages_final],
1482 truncate_ipages_final, [
1483 #include <linux/mm.h>
1485 truncate_inode_pages_final(NULL);
1487 AC_DEFINE(HAVE_TRUNCATE_INODE_PAGES_FINAL, 1,
1488 [kernel has truncate_inode_pages_final])
1490 ]) # LC_HAVE_TRUNCATE_IPAGES_FINAL
1493 # LC_IOPS_RENAME_WITH_FLAGS
1495 # 3.14 has inode_operations->rename with 5 args
1496 # commit 520c8b16505236fc82daa352e6c5e73cd9870cff
1498 AC_DEFUN([LC_IOPS_RENAME_WITH_FLAGS], [
1499 LB_CHECK_COMPILE([if 'inode_operations->rename' taken flags as argument],
1500 iops_rename_with_flags, [
1501 #include <linux/fs.h>
1503 struct inode *i1 = NULL, *i2 = NULL;
1504 struct dentry *d1 = NULL, *d2 = NULL;
1506 rc = ((struct inode_operations *)0)->rename(i1, d1, i2, d2, 0);
1508 AC_DEFINE(HAVE_IOPS_RENAME_WITH_FLAGS, 1,
1509 [inode_operations->rename need flags as argument])
1511 ]) # LC_IOPS_RENAME_WITH_FLAGS
1514 # LC_VFS_RENAME_6ARGS
1516 # 3.15 has vfs_rename with 6 args
1518 AC_DEFUN([LC_VFS_RENAME_6ARGS], [
1519 LB_CHECK_COMPILE([if Linux kernel has 'vfs_rename' with 6 args],
1521 #include <linux/fs.h>
1523 vfs_rename(NULL, NULL, NULL, NULL, NULL, NULL);
1525 AC_DEFINE(HAVE_VFS_RENAME_6ARGS, 1,
1526 [kernel has vfs_rename with 6 args])
1528 ]) # LC_VFS_RENAME_6ARGS
1531 # LC_DIRECTIO_USE_ITER
1533 # 3.16 kernel changes direct IO to use iov_iter
1535 AC_DEFUN([LC_DIRECTIO_USE_ITER], [
1536 LB_CHECK_COMPILE([if direct IO uses iov_iter],
1538 #include <linux/fs.h>
1540 struct address_space_operations ops = { };
1541 struct iov_iter *iter = NULL;
1544 ops.direct_IO(0, NULL, iter, offset);
1546 AC_DEFINE(HAVE_DIRECTIO_ITER, 1,
1547 [direct IO uses iov_iter])
1549 ]) # LC_DIRECTIO_USE_ITER
1552 # LC_HAVE_IOV_ITER_INIT_DIRECTION
1555 # 3.16 linux commit 71d8e532b1549a478e6a6a8a44f309d050294d00
1556 # changed iov_iter_init api to start accepting a tag
1557 # that defines if its a read or write operation
1559 AC_DEFUN([LC_HAVE_IOV_ITER_INIT_DIRECTION], [
1560 tmp_flags="$EXTRA_KCFLAGS"
1561 EXTRA_KCFLAGS="-Werror"
1562 LB_CHECK_COMPILE([if 'iov_iter_init' takes a tag],
1564 #include <linux/uio.h>
1565 #include <linux/fs.h>
1567 const struct iovec *iov = NULL;
1569 iov_iter_init(NULL, READ, iov, 1, 0);
1571 AC_DEFINE(HAVE_IOV_ITER_INIT_DIRECTION, 1,
1572 [iov_iter_init handles directional tag])
1574 EXTRA_KCFLAGS="$tmp_flags"
1575 ]) # LC_HAVE_IOV_ITER_INIT_DIRECTION
1578 # LC_HAVE_IOV_ITER_TRUNCATE
1581 # 3.16 introduces a new API iov_iter_truncate()
1583 AC_DEFUN([LC_HAVE_IOV_ITER_TRUNCATE], [
1584 tmp_flags="$EXTRA_KCFLAGS"
1585 EXTRA_KCFLAGS="-Werror"
1586 LB_CHECK_COMPILE([if 'iov_iter_truncate' exists ],
1588 #include <linux/uio.h>
1589 #include <linux/fs.h>
1591 struct iov_iter *i = NULL;
1593 iov_iter_truncate(i, 0);
1595 AC_DEFINE(HAVE_IOV_ITER_TRUNCATE, 1, [iov_iter_truncate exists])
1597 EXTRA_KCFLAGS="$tmp_flags"
1598 ]) # LC_HAVE_IOV_ITER_TRUNCATE
1601 # LC_HAVE_FILE_OPERATIONS_READ_WRITE_ITER
1603 # 3.16 introduces [read|write]_iter to struct file_operations
1605 AC_DEFUN([LC_HAVE_FILE_OPERATIONS_READ_WRITE_ITER], [
1606 LB_CHECK_COMPILE([if 'file_operations.[read|write]_iter' exist],
1607 file_function_iter, [
1608 #include <linux/fs.h>
1610 ((struct file_operations *)NULL)->read_iter(NULL, NULL);
1611 ((struct file_operations *)NULL)->write_iter(NULL, NULL);
1613 AC_DEFINE(HAVE_FILE_OPERATIONS_READ_WRITE_ITER, 1,
1614 [file_operations.[read|write]_iter functions exist])
1616 ]) # LC_HAVE_FILE_OPERATIONS_READ_WRITE_ITER
1619 # LC_HAVE_INTERVAL_BLK_INTEGRITY
1621 # 3.17 replace sector_size with interval in struct blk_integrity
1623 AC_DEFUN([LC_HAVE_INTERVAL_BLK_INTEGRITY], [
1624 LB_CHECK_COMPILE([if 'blk_integrity.interval' exist],
1625 interval_blk_integrity, [
1626 #include <linux/blkdev.h>
1628 ((struct blk_integrity *)0)->interval = 0;
1630 AC_DEFINE(HAVE_INTERVAL_BLK_INTEGRITY, 1,
1631 [blk_integrity.interval exist])
1633 ]) # LC_HAVE_INTERVAL_BLK_INTEGRITY
1638 # 3.17 replaces key_type::match with match_preparse
1639 # and has new struct key_match_data
1641 AC_DEFUN([LC_KEY_MATCH_DATA], [
1642 LB_CHECK_COMPILE([if struct key_match field exist],
1644 #include <linux/key-type.h>
1646 struct key_match_data data;
1648 data.raw_data = NULL;
1650 AC_DEFINE(HAVE_KEY_MATCH_DATA, 1,
1651 [struct key_match_data exist])
1653 ]) # LC_KEY_MATCH_DATA
1656 # LC_NFS_FILLDIR_USE_CTX
1658 # 3.18 kernel moved from void cookie to struct dir_context
1660 AC_DEFUN([LC_NFS_FILLDIR_USE_CTX], [
1661 tmp_flags="$EXTRA_KCFLAGS"
1662 EXTRA_KCFLAGS="-Werror"
1663 LB_CHECK_COMPILE([if filldir_t uses struct dir_context],
1665 #include <linux/fs.h>
1667 int filldir(struct dir_context *ctx, const char* name,
1668 int i, loff_t off, u64 tmp, unsigned temp)
1673 struct dir_context ctx = {
1677 ctx.actor(NULL, "test", 0, (loff_t) 0, 0, 0);
1679 AC_DEFINE(HAVE_FILLDIR_USE_CTX, 1,
1680 [filldir_t needs struct dir_context as argument])
1682 EXTRA_KCFLAGS="$tmp_flags"
1683 ]) # LC_NFS_FILLDIR_USE_CTX
1686 # LC_PERCPU_COUNTER_INIT
1688 # 3.18 For kernels 3.18 and after percpu_counter_init starts
1689 # to pass a GFP_* memory allocation flag for internal
1690 # memory allocation purposes.
1692 AC_DEFUN([LC_PERCPU_COUNTER_INIT], [
1693 LB_CHECK_COMPILE([if percpu_counter_init uses GFP_* flag as argument],
1694 percpu_counter_init, [
1695 #include <linux/percpu_counter.h>
1697 percpu_counter_init(NULL, 0, GFP_KERNEL);
1699 AC_DEFINE(HAVE_PERCPU_COUNTER_INIT_GFP_FLAG, 1,
1700 [percpu_counter_init uses GFP_* flag])
1702 ]) # LC_PERCPU_COUNTER_INIT
1705 # LC_KIOCB_HAS_NBYTES
1707 # 3.19 kernel removed ki_nbytes from struct kiocb
1709 AC_DEFUN([LC_KIOCB_HAS_NBYTES], [
1710 LB_CHECK_COMPILE([if struct kiocb has ki_nbytes field],
1712 #include <linux/fs.h>
1714 struct kiocb iocb = { };
1718 AC_DEFINE(HAVE_KI_NBYTES, 1, [ki_nbytes field exist])
1720 ]) # LC_KIOCB_HAS_NBYTES
1723 # LC_HAVE_DQUOT_QC_DQBLK
1725 # 3.19 has quotactl_ops->[sg]et_dqblk that take struct kqid and qc_dqblk
1726 # Added in commit 14bf61ffe
1728 AC_DEFUN([LC_HAVE_DQUOT_QC_DQBLK], [
1729 tmp_flags="$EXTRA_KCFLAGS"
1730 EXTRA_KCFLAGS="-Werror"
1731 LB_CHECK_COMPILE([if 'quotactl_ops.set_dqblk' takes struct qc_dqblk],
1733 #include <linux/fs.h>
1734 #include <linux/quota.h>
1736 ((struct quotactl_ops *)0)->set_dqblk(NULL, *((struct kqid*)0), (struct qc_dqblk*)0);
1738 AC_DEFINE(HAVE_DQUOT_QC_DQBLK, 1,
1739 [quotactl_ops.set_dqblk takes struct qc_dqblk])
1740 AC_DEFINE(HAVE_DQUOT_KQID, 1,
1741 [quotactl_ops.set_dqblk takes struct kqid])
1743 EXTRA_KCFLAGS="$tmp_flags"
1744 ]) # LC_HAVE_DQUOT_QC_DQBLK
1747 # LC_BACKING_DEV_INFO_REMOVAL
1749 # 3.20 kernel removed backing_dev_info from address_space
1751 AC_DEFUN([LC_BACKING_DEV_INFO_REMOVAL], [
1752 LB_CHECK_COMPILE([if struct address_space has backing_dev_info],
1754 #include <linux/fs.h>
1756 struct address_space mapping;
1758 mapping.backing_dev_info = NULL;
1760 AC_DEFINE(HAVE_BACKING_DEV_INFO, 1, [backing_dev_info exist])
1762 ]) # LC_BACKING_DEV_INFO_REMOVAL
1765 # LC_HAVE_BDI_CAP_MAP_COPY
1767 # 3.20 removed mmap handling for backing devices since
1768 # it breaks on non-MMU systems. See kernel commit
1769 # b4caecd48005fbed3949dde6c1cb233142fd69e9
1771 AC_DEFUN([LC_HAVE_BDI_CAP_MAP_COPY], [
1772 LB_CHECK_COMPILE([if have 'BDI_CAP_MAP_COPY'],
1774 #include <linux/backing-dev.h>
1776 struct backing_dev_info info;
1778 info.capabilities = BDI_CAP_MAP_COPY;
1780 AC_DEFINE(HAVE_BDI_CAP_MAP_COPY, 1,
1781 [BDI_CAP_MAP_COPY exist])
1783 ]) # LC_HAVE_BDI_CAP_MAP_COPY
1788 # 4.1 kernel has iov_iter_rw
1790 AC_DEFUN([LC_IOV_ITER_RW], [
1791 LB_CHECK_COMPILE([if iov_iter_rw exist],
1793 #include <linux/fs.h>
1794 #include <linux/uio.h>
1796 struct iov_iter *iter = NULL;
1800 AC_DEFINE(HAVE_IOV_ITER_RW, 1,
1801 [iov_iter_rw exist])
1806 # LC_HAVE_SYNC_READ_WRITE
1808 # 4.1 new_sync_[read|write] no longer exported
1810 AC_DEFUN([LC_HAVE_SYNC_READ_WRITE], [
1811 LB_CHECK_EXPORT([new_sync_read], [fs/read_write.c],
1812 [AC_DEFINE(HAVE_SYNC_READ_WRITE, 1,
1813 [new_sync_[read|write] is exported by the kernel])])
1814 ]) # LC_HAVE_SYNC_READ_WRITE
1819 # 4.1 redefined bi_cnt as __bi_cnt in commit dac56212e8127dbc0
1821 AC_DEFUN([LC_HAVE___BI_CNT], [
1822 LB_CHECK_COMPILE([if Linux kernel has __bi_cnt in struct bio],
1824 #include <asm/atomic.h>
1825 #include <linux/bio.h>
1826 #include <linux/blk_types.h>
1828 struct bio bio = { };
1830 cnt = atomic_read(&bio.__bi_cnt);
1832 AC_DEFINE(HAVE___BI_CNT, 1,
1833 [struct bio has __bi_cnt])
1835 ]) # LC_HAVE___BI_CNT
1838 # LC_SYMLINK_OPS_USE_NAMEIDATA
1840 # For the 4.2+ kernels the file system internal symlink api no
1841 # longer uses struct nameidata as a argument
1843 AC_DEFUN([LC_SYMLINK_OPS_USE_NAMEIDATA], [
1844 LB_CHECK_COMPILE([if symlink inode operations have struct nameidata argument],
1845 symlink_use_nameidata, [
1846 #include <linux/namei.h>
1847 #include <linux/fs.h>
1849 struct nameidata *nd = NULL;
1851 ((struct inode_operations *)0)->follow_link(NULL, nd);
1852 ((struct inode_operations *)0)->put_link(NULL, nd, NULL);
1854 AC_DEFINE(HAVE_SYMLINK_OPS_USE_NAMEIDATA, 1,
1855 [symlink inode operations need struct nameidata argument])
1857 ]) # LC_SYMLINK_OPS_USE_NAMEIDATA
1860 # LC_BIO_ENDIO_USES_ONE_ARG
1862 # 4.2 kernel bio_endio now only takes one argument
1864 AC_DEFUN([LC_BIO_ENDIO_USES_ONE_ARG], [
1865 LB_CHECK_COMPILE([if 'bio_endio' with one argument exist],
1867 #include <linux/bio.h>
1871 AC_DEFINE(HAVE_BIO_ENDIO_USES_ONE_ARG, 1,
1872 [bio_endio takes only one argument])
1874 ]) # LC_BIO_ENDIO_USES_ONE_ARG
1877 # LC_ACCOUNT_PAGE_DIRTIED_3ARGS
1879 # 4.2 [to 4.5] kernel page dirtied takes 3 arguments
1881 AC_DEFUN([LC_ACCOUNT_PAGE_DIRTIED_3ARGS], [
1882 LB_CHECK_COMPILE([if 'account_page_dirtied' with 3 args exists],
1883 account_page_dirtied, [
1884 #include <linux/mm.h>
1886 account_page_dirtied(NULL, NULL, NULL);
1888 AC_DEFINE(HAVE_ACCOUNT_PAGE_DIRTIED_3ARGS, 1,
1889 [account_page_dirtied takes three arguments])
1891 ]) # LC_ACCOUNT_PAGE_DIRTIED_3ARGS
1894 # LC_HAVE_INTERVAL_EXP_BLK_INTEGRITY
1896 # 4.3 replace interval with interval_exp in 'struct blk_integrity'
1897 # 'struct blk_integrity_profile' is also added in this version,
1898 # thus use this to determine whether 'struct blk_integrity' has profile
1900 AC_DEFUN([LC_HAVE_INTERVAL_EXP_BLK_INTEGRITY], [
1901 LB_CHECK_COMPILE([if 'blk_integrity.interval_exp' exist],
1902 blk_integrity_interval_exp, [
1903 #include <linux/blkdev.h>
1905 ((struct blk_integrity *)0)->interval_exp = 0;
1907 AC_DEFINE(HAVE_INTERVAL_EXP_BLK_INTEGRITY, 1,
1908 [blk_integrity.interval_exp exist])
1910 ]) # LC_HAVE_INTERVAL_EXP_BLK_INTEGRITY
1913 # LC_HAVE_LOOP_CTL_GET_FREE
1915 # 4.x kernel have moved userspace APIs to
1916 # the separate directory and all of them
1917 # support LOOP_CTL_GET_FREE
1919 AC_DEFUN([LC_HAVE_LOOP_CTL_GET_FREE], [
1920 LB_CHECK_FILE([$LINUX/include/linux/loop.h], [
1921 LB_CHECK_COMPILE([if have 'HAVE_LOOP_CTL_GET_FREE'],
1922 LOOP_CTL_GET_FREE, [
1923 #include <linux/loop.h>
1927 i = LOOP_CTL_GET_FREE;
1929 AC_DEFINE(HAVE_LOOP_CTL_GET_FREE, 1,
1930 [LOOP_CTL_GET_FREE exist])
1933 AC_DEFINE(HAVE_LOOP_CTL_GET_FREE, 1,
1934 [kernel has LOOP_CTL_GET_FREE])
1936 ]) # LC_HAVE_LOOP_CTL_GET_FREE
1939 # LC_HAVE_CACHE_HEAD_HLIST
1941 # 4.3 kernel swiched to hlist for cache_head
1943 AC_DEFUN([LC_HAVE_CACHE_HEAD_HLIST], [
1944 LB_CHECK_COMPILE([if 'struct cache_head' has 'cache_list' field],
1945 cache_head_has_hlist, [
1946 #include <linux/sunrpc/cache.h>
1948 do {} while(sizeof(((struct cache_head *)0)->cache_list));
1950 AC_DEFINE(HAVE_CACHE_HEAD_HLIST, 1,
1951 [cache_head has hlist cache_list])
1953 ]) # LC_HAVE_CACHE_HEAD_HLIST
1956 # LC_HAVE_XATTR_HANDLER_SIMPLIFIED
1958 # Kernel version 4.3 commit e409de992e3ea3674393465f07cc71c948edd87a
1959 # simplified xattr_handler handling by passing in the handler pointer
1961 AC_DEFUN([LC_HAVE_XATTR_HANDLER_SIMPLIFIED], [
1962 tmp_flags="$EXTRA_KCFLAGS"
1963 EXTRA_KCFLAGS="-Werror"
1964 LB_CHECK_COMPILE([if 'struct xattr_handler' functions pass in handler pointer],
1965 xattr_handler_simplified, [
1966 #include <linux/xattr.h>
1968 struct xattr_handler handler;
1970 ((struct xattr_handler *)0)->get(&handler, NULL, NULL, NULL, 0);
1971 ((struct xattr_handler *)0)->set(&handler, NULL, NULL, NULL, 0, 0);
1973 AC_DEFINE(HAVE_XATTR_HANDLER_SIMPLIFIED, 1, [handler pointer is parameter])
1975 EXTRA_KCFLAGS="$tmp_flags"
1976 ]) # LC_HAVE_XATTR_HANDLER_SIMPLIFIED
1979 # LC_HAVE_BIP_ITER_BIO_INTEGRITY_PAYLOAD
1981 # 4.3 replace interval with interval_exp in 'struct blk_integrity'.
1983 AC_DEFUN([LC_HAVE_BIP_ITER_BIO_INTEGRITY_PAYLOAD], [
1984 LB_CHECK_COMPILE([if 'bio_integrity_payload.bip_iter' exist],
1985 bio_integrity_payload_bip_iter, [
1986 #include <linux/bio.h>
1988 ((struct bio_integrity_payload *)0)->bip_iter.bi_size = 0;
1990 AC_DEFINE(HAVE_BIP_ITER_BIO_INTEGRITY_PAYLOAD, 1,
1991 [bio_integrity_payload.bip_iter exist])
1993 ]) # LC_HAVE_BIP_ITER_BIO_INTEGRITY_PAYLOAD
1996 # LC_BIO_INTEGRITY_PREP_FN
1998 # Lustre kernel patch extents bio_integrity_prep to accept optional
1999 # generate/verify_fn as extra args.
2001 AC_DEFUN([LC_BIO_INTEGRITY_PREP_FN], [
2002 LB_CHECK_COMPILE([if 'bio_integrity_prep_fn' exists],
2003 bio_integrity_prep_fn, [
2004 #include <linux/bio.h>
2006 bio_integrity_prep_fn(NULL, NULL, NULL);
2008 AC_DEFINE(HAVE_BIO_INTEGRITY_PREP_FN, 1,
2009 [kernel has bio_integrity_prep_fn])
2010 AC_SUBST(PATCHED_INTEGRITY_INTF)
2012 AC_SUBST(PATCHED_INTEGRITY_INTF, [#])
2014 ]) # LC_BIO_INTEGRITY_PREP_FN
2019 # 4.4/4.8 redefined bi_rw as bi_opf (SLES12/kernel commit 4382e33ad37486)
2021 AC_DEFUN([LC_HAVE_BI_OPF], [
2022 LB_CHECK_COMPILE([if Linux kernel has bi_opf in struct bio],
2024 #include <linux/bio.h>
2030 AC_DEFINE(HAVE_BI_OPF, 1,
2031 [struct bio has bi_opf])
2036 # LC_HAVE_SUBMIT_BIO_2ARGS
2038 # 4.4 removed an argument from submit_bio
2040 AC_DEFUN([LC_HAVE_SUBMIT_BIO_2ARGS], [
2041 LB_CHECK_COMPILE([if submit_bio takes two arguments],
2042 have_submit_bio_2args, [
2043 #include <linux/bio.h>
2046 submit_bio(READ, &bio);
2048 AC_DEFINE(HAVE_SUBMIT_BIO_2ARGS, 1,
2049 [submit_bio takes two arguments])
2051 ]) # LC_HAVE_SUBMIT_BIO_2_ARGS
2054 # LC_HAVE_CLEAN_BDEV_ALIASES
2056 # 4.4/4.9 unmap_underlying_metadata was replaced by clean_bdev_aliases
2057 # (SLES12/kernel commit 29f3ad7d8380364c)
2059 AC_DEFUN([LC_HAVE_CLEAN_BDEV_ALIASES], [
2060 LB_CHECK_COMPILE([if kernel has clean_bdev_aliases],
2061 have_clean_bdev_aliases, [
2062 #include <linux/buffer_head.h>
2064 struct block_device bdev;
2065 clean_bdev_aliases(&bdev,1,1);
2067 AC_DEFINE(HAVE_CLEAN_BDEV_ALIASES, 1,
2068 [kernel has clean_bdev_aliases])
2070 ]) # LC_HAVE_CLEAN_BDEV_ALIASES
2073 # LC_HAVE_LOCKS_LOCK_FILE_WAIT
2075 # 4.4 kernel have moved locks API users to
2076 # locks_lock_inode_wait()
2078 AC_DEFUN([LC_HAVE_LOCKS_LOCK_FILE_WAIT], [
2079 LB_CHECK_COMPILE([if 'locks_lock_file_wait' exists],
2080 locks_lock_file_wait, [
2081 #include <linux/fs.h>
2083 locks_lock_file_wait(NULL, NULL);
2085 AC_DEFINE(HAVE_LOCKS_LOCK_FILE_WAIT, 1,
2086 [kernel has locks_lock_file_wait])
2088 ]) # LC_HAVE_LOCKS_LOCK_FILE_WAIT
2091 # LC_HAVE_KEY_PAYLOAD_DATA_ARRAY
2093 # 4.4 kernel merged type-specific data with the payload data for keys
2095 AC_DEFUN([LC_HAVE_KEY_PAYLOAD_DATA_ARRAY], [
2096 LB_CHECK_COMPILE([if 'struct key' has 'payload.data' as an array],
2097 key_payload_data_array, [
2098 #include <linux/key.h>
2100 struct key key = { };
2102 key.payload.data[0] = NULL;
2104 AC_DEFINE(HAVE_KEY_PAYLOAD_DATA_ARRAY, 1, [payload.data is an array])
2106 ]) #LC_HAVE_KEY_PAYLOAD_DATA_ARRAY
2109 # LC_HAVE_XATTR_HANDLER_NAME
2111 # Kernel version 4.4 commit 98e9cb5711c68223f0e4d5201b9a6add255ec550
2112 # add a name member to struct xattr_handler
2114 AC_DEFUN([LC_HAVE_XATTR_HANDLER_NAME], [
2115 tmp_flags="$EXTRA_KCFLAGS"
2116 EXTRA_KCFLAGS="-Werror"
2117 LB_CHECK_COMPILE([if 'struct xattr_handler' has a name member],
2118 xattr_handler_name, [
2119 #include <linux/xattr.h>
2121 ((struct xattr_handler *)NULL)->name = NULL;
2123 AC_DEFINE(HAVE_XATTR_HANDLER_NAME, 1, [xattr_handler has a name member])
2125 EXTRA_KCFLAGS="$tmp_flags"
2126 ]) # LC_HAVE_XATTR_HANDLER_NAME
2129 # LC_HAVE_FILE_DENTRY
2131 # 4.5 adds wrapper file_dentry
2133 AC_DEFUN([LC_HAVE_FILE_DENTRY], [
2134 LB_CHECK_COMPILE([if Linux kernel has 'file_dentry'],
2136 #include <linux/fs.h>
2140 AC_DEFINE(HAVE_FILE_DENTRY, 1,
2141 [kernel has file_dentry])
2143 ]) # LC_HAVE_FILE_DENTRY
2146 # LC_HAVE_INODE_LOCK
2148 # 4.5 introduced inode_lock
2150 AC_DEFUN([LC_HAVE_INODE_LOCK], [
2151 LB_CHECK_COMPILE([if 'inode_lock' is defined],
2153 #include <linux/fs.h>
2157 AC_DEFINE(HAVE_INODE_LOCK, 1,
2158 [inode_lock is defined])
2160 ]) # LC_HAVE_INODE_LOCK
2163 # LC_HAVE_IOP_GET_LINK
2165 # 4.5 vfs replaced iop->follow_link with
2168 AC_DEFUN([LC_HAVE_IOP_GET_LINK], [
2169 LB_CHECK_COMPILE([if 'iop' has 'get_link'],
2170 inode_ops_get_link, [
2171 #include <linux/fs.h>
2173 struct inode_operations iop;
2174 iop.get_link = NULL;
2176 AC_DEFINE(HAVE_IOP_GET_LINK, 1,
2177 [have iop get_link])
2179 ]) # LC_HAVE_IOP_GET_LINK
2182 # LC_HAVE_IN_COMPAT_SYSCALL
2184 # 4.6 renamed is_compat_task to in_compat_syscall
2186 AC_DEFUN([LC_HAVE_IN_COMPAT_SYSCALL], [
2187 LB_CHECK_COMPILE([if 'in_compat_syscall' is defined],
2188 in_compat_syscall, [
2189 #include <linux/compat.h>
2191 in_compat_syscall();
2193 AC_DEFINE(HAVE_IN_COMPAT_SYSCALL, 1,
2194 [have in_compat_syscall])
2196 ]) # LC_HAVE_IN_COMPAT_SYSCALL
2199 # LC_HAVE_XATTR_HANDLER_INODE_PARAM
2201 # Kernel version 4.6 commit b296821a7c42fa58baa17513b2b7b30ae66f3336
2202 # and commit 5930122683dff58f0846b0f0405b4bd598a3ba6a added inode parameter
2203 # to xattr_handler functions
2205 AC_DEFUN([LC_HAVE_XATTR_HANDLER_INODE_PARAM], [
2206 tmp_flags="$EXTRA_KCFLAGS"
2207 EXTRA_KCFLAGS="-Werror"
2208 LB_CHECK_COMPILE([if 'struct xattr_handler' functions have inode parameter],
2209 xattr_handler_inode_param, [
2210 #include <linux/xattr.h>
2212 const struct xattr_handler handler;
2214 ((struct xattr_handler *)0)->get(&handler, NULL, NULL, NULL, NULL, 0);
2215 ((struct xattr_handler *)0)->set(&handler, NULL, NULL, NULL, NULL, 0, 0);
2217 AC_DEFINE(HAVE_XATTR_HANDLER_INODE_PARAM, 1, [needs inode parameter])
2219 EXTRA_KCFLAGS="$tmp_flags"
2220 ]) # LC_HAVE_XATTR_HANDLER_INODE_PARAM
2225 # Kernel version 4.6 commit 85c7f81041d57cfe9dc97f4680d5586b54534a39
2226 # introduced parallel lookups in the VFS layer. The inline function
2227 # d_in_lookup was added to notify when the same item was being queried
2230 AC_DEFUN([LC_D_IN_LOOKUP], [
2231 tmp_flags="$EXTRA_KCFLAGS"
2232 EXTRA_KCFLAGS="-Werror"
2233 LB_CHECK_COMPILE([if 'd_in_lookup' is defined],
2235 #include <linux/dcache.h>
2239 AC_DEFINE(HAVE_D_IN_LOOKUP, 1, [d_in_lookup is defined])
2241 EXTRA_KCFLAGS="$tmp_flags"
2245 # LC_LOCK_PAGE_MEMCG
2247 # Kernel version 4.6 adds lock_page_memcg
2249 AC_DEFUN([LC_LOCK_PAGE_MEMCG], [
2250 LB_CHECK_COMPILE([if 'lock_page_memcg' is defined],
2252 #include <linux/memcontrol.h>
2254 lock_page_memcg(NULL);
2256 AC_DEFINE(HAVE_LOCK_PAGE_MEMCG, 1,
2257 [lock_page_memcg is defined])
2259 ]) # LC_LOCK_PAGE_MEMCG
2264 # Kernel version 4.7 commit c8b8e32d700fe943a935e435ae251364d016c497
2265 # direct-io: eliminate the offset argument to ->direct_IO
2267 AC_DEFUN([LC_DIRECTIO_2ARGS], [
2268 LB_CHECK_COMPILE([if '->direct_IO()' taken 2 arguments],
2270 #include <linux/fs.h>
2272 struct address_space_operations ops = { };
2273 struct iov_iter *iter = NULL;
2274 struct kiocb *iocb = NULL;
2277 rc = ops.direct_IO(iocb, iter);
2279 AC_DEFINE(HAVE_DIRECTIO_2ARGS, 1,
2280 [direct_IO need 2 arguments])
2282 ]) # LC_DIRECTIO_2ARGS
2285 # LC_GENERIC_WRITE_SYNC_2ARGS
2287 # Kernel version 4.7 commit dde0c2e79848298cc25621ad080d47f94dbd7cce
2288 # fs: add IOCB_SYNC and IOCB_DSYNC
2290 AC_DEFUN([LC_GENERIC_WRITE_SYNC_2ARGS], [
2291 LB_CHECK_COMPILE([if 'generic_write_sync()' taken 2 arguments],
2292 generic_write_sync_2args, [
2293 #include <linux/fs.h>
2295 struct kiocb *iocb = NULL;
2298 rc = generic_write_sync(iocb, 0);
2300 AC_DEFINE(HAVE_GENERIC_WRITE_SYNC_2ARGS, 1,
2301 [generic_write_sync need 2 arguments])
2303 ]) # LC_GENERIC_WRITE_SYNC_2ARGS
2306 # LC_FOP_ITERATE_SHARED
2308 # Kernel v4.6-rc3-29-g6192269 adds iterate_shared method to file_operations
2310 AC_DEFUN([LC_FOP_ITERATE_SHARED], [
2311 LB_CHECK_COMPILE([if 'file_operations' has 'iterate_shared'],
2312 fop_iterate_shared, [
2313 #include <linux/fs.h>
2315 struct file_operations fop;
2316 fop.iterate_shared = NULL;
2318 AC_DEFINE(HAVE_FOP_ITERATE_SHARED, 1,
2319 [file_operations has iterate_shared])
2321 ]) # LC_FOP_ITERATE_SHARED
2324 # LC_HAVE_POSIX_ACL_VALID_USER_NS
2326 # 4.8 posix_acl_valid takes struct user_namespace
2328 AC_DEFUN([LC_HAVE_POSIX_ACL_VALID_USER_NS], [
2329 LB_CHECK_COMPILE([if 'posix_acl_valid' takes 'struct user_namespace'],
2331 #include <linux/fs.h>
2332 #include <linux/posix_acl.h>
2334 posix_acl_valid((struct user_namespace*)NULL, (const struct posix_acl*)NULL);
2336 AC_DEFINE(HAVE_POSIX_ACL_VALID_USER_NS, 1,
2337 [posix_acl_valid takes struct user_namespace])
2339 ]) # LC_HAVE_POSIX_ACL_VALID_USER_NS
2342 # LC_D_COMPARE_4ARGS
2344 # Kernel version 4.8 commit 6fa67e707559303e086303aeecc9e8b91ef497d5
2345 # get rid of 'parent' argument of ->d_compare()
2347 AC_DEFUN([LC_D_COMPARE_4ARGS], [
2348 LB_CHECK_COMPILE([if 'd_compare' taken 4 arguments],
2350 #include <linux/dcache.h>
2352 ((struct dentry_operations*)0)->d_compare(NULL,0,NULL,NULL);
2354 AC_DEFINE(HAVE_D_COMPARE_4ARGS, 1,
2355 [d_compare need 4 arguments])
2357 ]) # LC_D_COMPARE_4ARGS
2360 # LC_FULL_NAME_HASH_3ARGS
2362 # Kernel version 4.8 commit 8387ff2577eb9ed245df9a39947f66976c6bcd02
2363 # vfs: make the string hashes salt the hash
2365 AC_DEFUN([LC_FULL_NAME_HASH_3ARGS], [
2366 LB_CHECK_COMPILE([if 'full_name_hash' taken 3 arguments],
2367 full_name_hash_3args, [
2368 #include <linux/stringhash.h>
2371 hash = full_name_hash(NULL,NULL,0);
2373 AC_DEFINE(HAVE_FULL_NAME_HASH_3ARGS, 1,
2374 [full_name_hash need 3 arguments])
2376 ]) # LC_FULL_NAME_HASH_3ARGS
2379 # LC_STRUCT_POSIX_ACL_XATTR
2381 # Kernel version 4.8 commit 2211d5ba5c6c4e972ba6dbc912b2897425ea6621
2382 # posix_acl: xattr representation cleanups
2384 AC_DEFUN([LC_STRUCT_POSIX_ACL_XATTR], [
2385 LB_CHECK_COMPILE([if 'struct posix_acl_xattr_{header,entry}' defined],
2386 struct_posix_acl_xattr, [
2387 #include <linux/fs.h>
2388 #include <linux/posix_acl_xattr.h>
2390 struct posix_acl_xattr_header *h = NULL;
2391 struct posix_acl_xattr_entry *e;
2392 e = (void *)(h + 1);
2394 AC_DEFINE(HAVE_STRUCT_POSIX_ACL_XATTR, 1,
2395 [struct posix_acl_xattr_{header,entry} defined])
2397 ]) # LC_STRUCT_POSIX_ACL_XATTR
2402 # Kernel version 4.8 commit fd50ecaddf8372a1d96e0daeaac0f93cf04e4d42
2403 # removed {get,set,remove}xattr inode operations
2405 AC_DEFUN([LC_IOP_XATTR], [
2406 LB_CHECK_COMPILE([if 'inode_operations' has {get,set,remove}xattr members],
2408 #include <linux/fs.h>
2410 struct inode_operations iop;
2411 iop.setxattr = NULL;
2412 iop.getxattr = NULL;
2413 iop.removexattr = NULL;
2415 AC_DEFINE(HAVE_IOP_XATTR, 1,
2416 [inode_operations has {get,set,remove}xattr members])
2423 # Kernel version 4.9 commit 81243eacfa400f5f7b89f4c2323d0de9982bb0fb
2424 # cred: simpler, 1D supplementary groups
2426 AC_DEFUN([LC_GROUP_INFO_GID], [
2427 LB_CHECK_COMPILE([if 'struct group_info' has member 'gid'],
2429 #include <linux/cred.h>
2432 p = ((struct group_info *)0)->gid;
2434 AC_DEFINE(HAVE_GROUP_INFO_GID, 1,
2435 [struct group_info has member gid])
2437 ]) # LC_GROUP_INFO_GID
2442 # Kernel version 4.9 commit 5d6c31910bc0713e37628dc0ce677dcb13c8ccf4
2443 # added __vfs_{get,set,remove}xattr helpers
2445 AC_DEFUN([LC_VFS_SETXATTR], [
2446 LB_CHECK_COMPILE([if '__vfs_setxattr' helper is available],
2448 #include <linux/xattr.h>
2450 __vfs_setxattr(NULL, NULL, NULL, NULL, 0, 0);
2452 AC_DEFINE(HAVE_VFS_SETXATTR, 1,
2453 ['__vfs_setxattr is available])
2455 ]) # LC_VFS_SETXATTR
2458 # LC_POSIX_ACL_UPDATE_MODE
2460 # Kernel version 4.9 commit 073931017b49d9458aa351605b43a7e34598caef
2461 # posix_acl: Clear SGID bit when setting file permissions
2463 AC_DEFUN([LC_POSIX_ACL_UPDATE_MODE], [
2464 LB_CHECK_COMPILE([if 'posix_acl_update_mode' exists],
2465 posix_acl_update_mode, [
2466 #include <linux/fs.h>
2467 #include <linux/posix_acl.h>
2469 posix_acl_update_mode(NULL, NULL, NULL);
2471 AC_DEFINE(HAVE_POSIX_ACL_UPDATE_MODE, 1,
2472 ['posix_acl_update_mode' is available])
2474 ]) # LC_POSIX_ACL_UPDATE_MODE
2477 # LC_IOP_GENERIC_READLINK
2479 # Kernel version 4.10 commit dfeef68862edd7d4bafe68ef7aeb5f658ef24bb5
2480 # removed generic_readlink from individual file systems
2482 AC_DEFUN([LC_IOP_GENERIC_READLINK], [
2483 LB_CHECK_COMPILE([if 'generic_readlink' still exist],
2484 inode_ops_readlink, [
2485 #include <linux/fs.h>
2487 struct inode_operations iop;
2488 iop.readlink = generic_readlink;
2490 AC_DEFINE(HAVE_IOP_GENERIC_READLINK, 1,
2491 [generic_readlink has been removed])
2493 ]) # LC_IOP_GENERIC_READLINK
2496 # LC_HAVE_VM_FAULT_ADDRESS
2498 # Kernel version 4.10 commit 1a29d85eb0f19b7d8271923d8917d7b4f5540b3e
2499 # removed virtual_address field. Need to use address field instead
2501 AC_DEFUN([LC_HAVE_VM_FAULT_ADDRESS], [
2502 LB_CHECK_COMPILE([if 'struct vm_fault' replaced virtual_address with address field],
2504 #include <linux/mm.h>
2506 struct vm_fault vmf;
2509 AC_DEFINE(HAVE_VM_FAULT_ADDRESS, 1,
2510 [virtual_address has been replaced by address field])
2512 ]) # LC_HAVE_VM_FAULT_ADDRESS
2515 # LC_INODEOPS_ENHANCED_GETATTR
2517 # Kernel version 4.11 commit a528d35e8bfcc521d7cb70aaf03e1bd296c8493f
2518 # expanded getattr to be able to get more stat information.
2520 AC_DEFUN([LC_INODEOPS_ENHANCED_GETATTR], [
2521 LB_CHECK_COMPILE([if 'inode_operations' getattr member can gather advance stats],
2523 #include <linux/fs.h>
2527 ((struct inode_operations *)1)->getattr(&path, NULL, 0, 0);
2529 AC_DEFINE(HAVE_INODEOPS_ENHANCED_GETATTR, 1,
2530 [inode_operations .getattr member function can gather advance stats])
2532 ]) # LC_INODEOPS_ENHANCED_GETATTR
2535 # LC_VM_OPERATIONS_REMOVE_VMF_ARG
2537 # Kernel version 4.11 commit 11bac80004499ea59f361ef2a5516c84b6eab675
2538 # removed struct vm_area_struct as an argument for vm_operations since
2539 # in the same kernel version struct vma_area_struct was folded into
2542 AC_DEFUN([LC_VM_OPERATIONS_REMOVE_VMF_ARG], [
2543 LB_CHECK_COMPILE([if 'struct vm_operations' removed struct vm_area_struct],
2544 vm_operations_no_vm_area_struct, [
2545 #include <linux/mm.h>
2547 struct vm_fault vmf;
2549 ((struct vm_operations_struct *)0)->fault(&vmf);
2550 ((struct vm_operations_struct *)0)->page_mkwrite(&vmf);
2552 AC_DEFINE(HAVE_VM_OPS_USE_VM_FAULT_ONLY, 1,
2553 ['struct vm_operations' remove struct vm_area_struct argument])
2555 ]) # LC_VM_OPERATIONS_REMOVE_VMF_ARG
2558 # LC_HAVE_KEY_USAGE_REFCOUNT
2560 # Kernel version 4.11 commit fff292914d3a2f1efd05ca71c2ba72a3c663201e
2561 # converted key.usage from atomic_t to refcount_t.
2563 AC_DEFUN([LC_HAVE_KEY_USAGE_REFCOUNT], [
2564 LB_CHECK_COMPILE([if 'key.usage' is refcount_t],
2565 key_usage_refcount, [
2566 #include <linux/key.h>
2568 struct key key = { };
2570 refcount_read(&key.usage);
2572 AC_DEFINE(HAVE_KEY_USAGE_REFCOUNT, 1, [key.usage is of type refcount_t])
2574 ]) #LC_HAVE_KEY_USAGE_REFCOUNT
2577 # LC_HAVE_CRYPTO_MAX_ALG_NAME_128
2579 # Kernel version 4.11 commit f437a3f477cce402dbec6537b29e9e33962c9f73
2580 # switched CRYPTO_MAX_ALG_NAME from 64 to 128.
2582 AC_DEFUN([LC_HAVE_CRYPTO_MAX_ALG_NAME_128], [
2583 LB_CHECK_COMPILE([if 'CRYPTO_MAX_ALG_NAME' is 128],
2584 crypto_max_alg_name, [
2585 #include <linux/crypto.h>
2587 #if CRYPTO_MAX_ALG_NAME != 128
2591 AC_DEFINE(HAVE_CRYPTO_MAX_ALG_NAME_128, 1,
2592 ['CRYPTO_MAX_ALG_NAME' is 128])
2594 ]) # LC_HAVE_CRYPTO_MAX_ALG_NAME_128
2597 # Kernel version 4.12 commit 47f38c539e9a42344ff5a664942075bd4df93876
2598 # CURRENT_TIME is not 64 bit time safe so it was replaced with
2601 AC_DEFUN([LC_CURRENT_TIME], [
2602 LB_CHECK_COMPILE([if CURRENT_TIME has been replaced with current_time],
2604 #include <linux/fs.h>
2608 attr.ia_atime = current_time(NULL);
2610 AC_DEFINE(HAVE_CURRENT_TIME, 1,
2611 [current_time() has replaced CURRENT_TIME])
2613 ]) # LIBCFS_CURRENT_TIME
2616 # Kernel version 4.12-rc3 85787090a21eb749d8b347eaf9ff1a455637473c
2617 # changed struct super_block s_uuid into a proper uuid_t
2619 AC_DEFUN([LC_SUPER_BLOCK_S_UUID], [
2620 LB_CHECK_COMPILE([if 'struct super_block' s_uuid is uuid_t],
2621 super_block_s_uuid, [
2622 #include <linux/fs.h>
2624 struct super_block sb;
2626 uuid_parse(NULL, &sb.s_uuid);
2628 AC_DEFINE(HAVE_S_UUID_AS_UUID_T, 1, ['s_uuid' is an uuid_t])
2630 ]) # LC_SUPER_BLOCK_S_UUID
2633 # LC_SUPER_SETUP_BDI_NAME
2635 # Kernel version 4.12 commit 9594caf216dc0fe3e318b34af0127276db661241
2636 # unified bdi handling
2638 AC_DEFUN([LC_SUPER_SETUP_BDI_NAME], [
2639 LB_CHECK_COMPILE([if 'super_setup_bdi_name' exist],
2640 super_setup_bdi_name, [
2641 #include <linux/fs.h>
2643 super_setup_bdi_name(NULL, "lustre");
2645 AC_DEFINE(HAVE_SUPER_SETUP_BDI_NAME, 1,
2646 ['super_setup_bdi_name' is available])
2648 ]) # LC_SUPER_SETUP_BDI_NAME
2653 # 4.12 replace bi_error to bi_status
2655 AC_DEFUN([LC_BI_STATUS], [
2656 LB_CHECK_COMPILE([if 'bi_status' exist],
2658 #include <linux/blk_types.h>
2660 ((struct bio *)0)->bi_status = 0;
2662 AC_DEFINE(HAVE_BI_STATUS, 1,
2663 ['bi_status' is available])
2668 # LC_BIO_INTEGRITY_ENABLED
2670 # 4.13 removed bio_integrity_enabled
2672 AC_DEFUN([LC_BIO_INTEGRITY_ENABLED], [
2673 LB_CHECK_COMPILE([if 'bio_integrity_enabled' exist],
2674 bio_integrity_enabled, [
2675 #include <linux/bio.h>
2677 bio_integrity_enabled(NULL);
2679 AC_DEFINE(HAVE_BIO_INTEGRITY_ENABLED, 1,
2680 ['bio_integrity_enabled' is available])
2682 ]) # LC_BIO_INTEGRITY_ENABLED
2685 # LC_PAGEVEC_INIT_ONE_PARAM
2687 # 4.14 pagevec_init takes one parameter
2689 AC_DEFUN([LC_PAGEVEC_INIT_ONE_PARAM], [
2690 LB_CHECK_COMPILE([if 'pagevec_init' takes one parameter],
2692 #include <linux/pagevec.h>
2696 AC_DEFINE(HAVE_PAGEVEC_INIT_ONE_PARAM, 1,
2697 ['pagevec_init' takes one parameter])
2699 ]) # LC_PAGEVEC_INIT_ONE_PARAM
2704 # 4.14 replaced bi_bdev to bi_disk
2706 AC_DEFUN([LC_BI_BDEV], [
2707 LB_CHECK_COMPILE([if 'bi_bdev' exist],
2709 #include <linux/bio.h>
2711 ((struct bio *)0)->bi_bdev = NULL;
2713 AC_DEFINE(HAVE_BI_BDEV, 1,
2714 ['bi_bdev' is available])
2721 # kernel 4.17 commit b93b016313b3ba8003c3b8bb71f569af91f19fc7
2723 AC_DEFUN([LC_I_PAGES], [
2724 LB_CHECK_COMPILE([if struct address_space has i_pages],
2726 #include <linux/fs.h>
2728 struct address_space mapping = {};
2731 i_pages = &mapping.i_pages;
2733 AC_DEFINE(HAVE_I_PAGES, 1,
2734 [struct address_space has i_pages])
2741 # kernel 4.17 commit 3d3539018d2cbd12e5af4a132636ee7fd8d43ef0
2742 # mm: create the new vm_fault_t type
2744 AC_DEFUN([LC_VM_FAULT_T], [
2745 LB_CHECK_COMPILE([if vm_fault_t type exists],
2747 #include <linux/mm_types.h>
2749 vm_fault_t x = VM_FAULT_SIGBUS;
2752 AC_DEFINE(HAVE_VM_FAULT_T, 1,
2753 [if vm_fault_t type exists])
2758 # LC_INODE_TIMESPEC64
2760 # kernel 4.17-rc7 commit 8efd6894ff089adeeac7cb9f32125b85d963d1bc
2761 # fs: add timespec64_truncate()
2762 # kernel 4.18 commit 95582b00838837fc07e042979320caf917ce3fe6
2763 # inode timestamps switched to timespec64
2764 # kernel 4.19-rc2 commit 976516404ff3fab2a8caa8bd6f5efc1437fed0b8
2765 # y2038: remove unused time interfaces
2769 # When inode times are timespec64 stop using the deprecated
2772 AC_DEFUN([LC_INODE_TIMESPEC64], [
2773 tmp_flags="$EXTRA_KCFLAGS"
2774 EXTRA_KCFLAGS="-Werror"
2775 LB_CHECK_COMPILE([if inode timestamps are struct timespec64],
2777 #include <linux/fs.h>
2779 struct inode *inode = NULL;
2780 struct timespec64 ts = {};
2782 inode->i_atime = timespec64_trunc(ts, 1);
2785 AC_DEFINE(HAVE_INODE_TIMESPEC64, 1,
2786 [inode times are using timespec64])
2788 EXTRA_KCFLAGS="$tmp_flags"
2789 ]) # LC_INODE_TIMESPEC64
2794 # kernel 4.20 commit v4.19-rc5-248-g9b89a0355144
2795 # xarray: Add XArray marks
2797 AC_DEFUN([LC___XA_SET_MARK], [
2798 LB_CHECK_COMPILE([if '__xa_set_mark' exists],
2800 #include <linux/xarray.h>
2801 #include <linux/fs.h>
2803 struct xarray *xa = NULL;
2805 __xa_set_mark(xa, 0, PAGECACHE_TAG_DIRTY);
2807 AC_DEFINE(HAVE___XA_SET_MARK, 1,
2808 [__xa_set_mark exists])
2810 ]) # LC___XA_SET_MARK
2813 # LC_UAPI_LINUX_MOUNT_H
2815 # kernel 4.20 commit e262e32d6bde0f77fb0c95d977482fc872c51996
2816 # vfs: Suppress MS_* flag defs within the kernel ...
2818 AC_DEFUN([LC_UAPI_LINUX_MOUNT_H], [
2819 tmp_flags="$EXTRA_KCFLAGS"
2820 EXTRA_KCFLAGS="-Werror"
2821 LB_CHECK_COMPILE([if MS_RDONLY was moved to uapi/linux/mount.h],
2823 #include <uapi/linux/mount.h>
2828 AC_DEFINE(HAVE_UAPI_LINUX_MOUNT_H, 1,
2829 [if MS_RDONLY was moved to uapi/linux/mount.h])
2831 EXTRA_KCFLAGS="$tmp_flags"
2832 ]) # LC_UAPI_LINUX_MOUNT_H
2835 # LC_HAVE_SUNRPC_CACHE_HASH_LOCK_IS_A_SPINLOCK
2837 # kernel 4.20 commit 1863d77f15da0addcd293a1719fa5d3ef8cde3ca
2838 # SUNRPC: Replace the cache_detail->hash_lock with a regular spinlock
2840 # Now that the reader functions are all RCU protected, use a regular
2841 # spinlock rather than a reader/writer lock.
2843 AC_DEFUN([LC_HAVE_SUNRPC_CACHE_HASH_LOCK_IS_A_SPINLOCK], [
2844 tmp_flags="$EXTRA_KCFLAGS"
2845 EXTRA_KCFLAGS="-Werror"
2846 LB_CHECK_COMPILE([if cache_detail->hash_lock is a spinlock],
2847 hash_lock_isa_spinlock_t, [
2848 #include <linux/sunrpc/cache.h>
2850 spinlock_t *lock = &(((struct cache_detail *)0)->hash_lock);
2853 AC_DEFINE(HAVE_CACHE_HASH_SPINLOCK, 1,
2854 [if cache_detail->hash_lock is a spinlock])
2856 EXTRA_KCFLAGS="$tmp_flags"
2857 ]) # LC_HAVE_SUNRPC_CACHE_HASH_LOCK_IS_A_SPINLOCK
2860 # LC_HAS_LINUX_SELINUX_ENABLED
2862 # kernel 5.1 commit 3d252529480c68bfd6a6774652df7c8968b28e41
2863 # SELinux: Remove unused selinux_is_enabled
2865 AC_DEFUN([LC_HAS_LINUX_SELINUX_ENABLED], [
2866 tmp_flags="$EXTRA_KCFLAGS"
2867 EXTRA_KCFLAGS="-Werror"
2868 LB_CHECK_COMPILE([if linux/selinux.h exists],
2869 selinux_is_enabled, [
2870 #include <linux/selinux.h>
2872 bool has_selinux = selinux_is_enabled();
2875 AC_DEFINE(HAVE_LINUX_SELINUX_IS_ENABLED, 1,
2876 [if linux/selinux.h exists])
2878 EXTRA_KCFLAGS="$tmp_flags"
2879 ]) # LC_HAS_LINUX_SELINUX_ENABLED
2882 # LC_ACCOUNT_PAGE_DIRTIED
2884 # After 5.2 kernel page dirtied is not exported
2886 AC_DEFUN([LC_ACCOUNT_PAGE_DIRTIED], [
2887 LB_CHECK_COMPILE([if 'account_page_dirtied' is exported],
2888 account_page_dirtied, [
2889 #include <linux/mm.h>
2891 account_page_dirtied(NULL, NULL);
2893 AC_DEFINE(HAVE_ACCOUNT_PAGE_DIRTIED, 1,
2894 [account_page_dirtied is available])
2896 ]) # LC_ACCOUNT_PAGE_DIRTIED
2899 # LC_BIO_BI_PHYS_SEGMENTS
2901 # kernel 5.3-rc1 commit 14ccb66b3f585b2bc21e7256c96090abed5a512c
2902 # block: remove the bi_phys_segments field in struct bio
2904 AC_DEFUN([LC_BIO_BI_PHYS_SEGMENTS], [
2905 tmp_flags="$EXTRA_KCFLAGS"
2906 EXTRA_KCFLAGS="-Werror"
2907 LB_CHECK_COMPILE([if struct bio has bi_phys_segments member],
2908 bye_bio_bi_phys_segments, [
2909 #include <linux/bio.h>
2911 struct bio *bio = NULL;
2912 bio->bi_phys_segments++;
2914 AC_DEFINE(HAVE_BIO_BI_PHYS_SEGMENTS, 1,
2915 [struct bio has bi_phys_segments member])
2917 EXTRA_KCFLAGS="$tmp_flags"
2918 ]) # LC_BIO_BI_PHYS_SEGMENTS
2921 # LC_LM_COMPARE_OWNER_EXISTS
2923 # kernel 5.3-rc3 commit f85d93385e9fe6886a751f647f6812a89bf6bee3
2924 # locks: Cleanup lm_compare_owner and lm_owner_key
2925 # removed lm_compare_owner
2927 AC_DEFUN([LC_LM_COMPARE_OWNER_EXISTS], [
2928 tmp_flags="$EXTRA_KCFLAGS"
2929 EXTRA_KCFLAGS="-Werror"
2930 LB_CHECK_COMPILE([if lock_manager_operations has lm_compare_owner],
2931 lock_manager_ops_lm_compare_owner, [
2932 #include <linux/fs.h>
2934 struct lock_manager_operations lm_ops;
2935 lm_ops.lm_compare_owner = NULL;
2937 AC_DEFINE(HAVE_LM_COMPARE_OWNER, 1,
2938 [lock_manager_operations has lm_compare_owner])
2940 EXTRA_KCFLAGS="$tmp_flags"
2941 ]) # LC_LM_COMPARE_OWNER_EXISTS
2946 # Lustre linux kernel checks
2948 AC_DEFUN([LC_PROG_LINUX], [
2949 AC_MSG_NOTICE([Lustre kernel checks
2950 ==============================================================================])
2955 LC_CONFIG_HEALTH_CHECK_WRITE
2956 LC_CONFIG_LRU_RESIZE
2958 LC_GLIBC_SUPPORT_FHANDLES
2964 LC_HAVE_FHANDLE_SYSCALLS
2965 LC_HAVE_FSTYPE_MOUNT
2966 LC_HAVE_INODE_OWNER_OR_CAPABLE
2967 LC_HAVE_SECURITY_IINITSEC
2968 LC_VFS_CREATE_USE_NAMEIDATA
2971 LC_DIRTY_INODE_WITH_FLAG
2975 LC_LM_XXX_LOCK_MANAGER_OPS
2979 LC_INODE_PERMISION_2ARGS
2980 LC_RADIX_EXCEPTION_ENTRY
2981 LC_HAVE_LOOP_CTL_GET_FREE
2984 LC_HAVE_PROTECT_I_NLINK
2987 LC_HAVE_MIGRATE_HEADER
2988 LC_MIGRATEPAGE_4ARGS
2989 LC_SUPEROPS_USE_DENTRY
2990 LC_INODEOPS_USE_UMODE_T
2991 LC_HAVE_CACHE_REGISTER
2995 LC_KMAP_ATOMIC_HAS_1ARG
2999 LC_HAVE_ENCODE_FH_PARENT
3000 LC_FILE_LLSEEK_SIZE_5ARG
3003 LC_DATA_FOR_LLITE_IS_LIST
3004 LC_DENTRY_OPEN_USE_PATH
3005 LC_HAVE_IOP_ATOMIC_OPEN
3006 LC_HAVE_SB_START_WRITE
3009 LC_HAVE_POSIXACL_USER_NS
3012 LC_HAVE_FILE_F_INODE
3014 LC_HAVE_SUNRPC_UPCALL_HAS_3ARGS
3017 LC_HAVE_HLIST_FOR_EACH_3ARG
3018 LC_HAVE_BIO_END_SECTOR
3020 LC_HAVE_VFS_GETATTR_2ARGS
3023 LC_HAVE_REMOVE_PROC_SUBTREE
3025 LC_HAVE_PROJECT_QUOTA
3026 LC_HAVE_SECURITY_DENTRY_INIT_SECURITY
3027 LC_HAVE_SECURITY_INODE_LISTSECURITY
3034 LC_HAVE_DENTRY_D_U_D_ALIAS
3035 LC_HAVE_DENTRY_D_CHILD
3036 LC_PID_NS_FOR_CHILDREN
3039 LC_OLDSIZE_TRUNCATE_PAGECACHE
3040 LC_PTR_ERR_OR_ZERO_MISSING
3042 LC_INIT_LIST_HEAD_RCU
3047 LC_HAVE_D_IS_POSITIVE
3051 LC_HAVE_TRUNCATE_IPAGES_FINAL
3052 LC_IOPS_RENAME_WITH_FLAGS
3059 LC_DIRECTIO_USE_ITER
3060 LC_HAVE_IOV_ITER_INIT_DIRECTION
3061 LC_HAVE_IOV_ITER_TRUNCATE
3062 LC_HAVE_FILE_OPERATIONS_READ_WRITE_ITER
3065 LC_HAVE_INTERVAL_BLK_INTEGRITY
3069 LC_PERCPU_COUNTER_INIT
3070 LC_NFS_FILLDIR_USE_CTX
3074 LC_HAVE_DQUOT_QC_DQBLK
3077 LC_BACKING_DEV_INFO_REMOVAL
3078 LC_HAVE_BDI_CAP_MAP_COPY
3082 LC_HAVE_SYNC_READ_WRITE
3086 LC_BIO_ENDIO_USES_ONE_ARG
3087 LC_SYMLINK_OPS_USE_NAMEIDATA
3088 LC_ACCOUNT_PAGE_DIRTIED_3ARGS
3091 LC_HAVE_INTERVAL_EXP_BLK_INTEGRITY
3092 LC_HAVE_BIP_ITER_BIO_INTEGRITY_PAYLOAD
3093 LC_HAVE_CACHE_HEAD_HLIST
3094 LC_HAVE_XATTR_HANDLER_SIMPLIFIED
3097 LC_HAVE_LOCKS_LOCK_FILE_WAIT
3098 LC_HAVE_KEY_PAYLOAD_DATA_ARRAY
3099 LC_HAVE_XATTR_HANDLER_NAME
3101 LC_HAVE_SUBMIT_BIO_2ARGS
3102 LC_HAVE_CLEAN_BDEV_ALIASES
3109 LC_HAVE_IOP_GET_LINK
3112 LC_HAVE_IN_COMPAT_SYSCALL
3113 LC_HAVE_XATTR_HANDLER_INODE_PARAM
3119 LC_GENERIC_WRITE_SYNC_2ARGS
3120 LC_FOP_ITERATE_SHARED
3123 LC_HAVE_POSIX_ACL_VALID_USER_NS
3125 LC_FULL_NAME_HASH_3ARGS
3126 LC_STRUCT_POSIX_ACL_XATTR
3132 LC_POSIX_ACL_UPDATE_MODE
3135 LC_IOP_GENERIC_READLINK
3136 LC_HAVE_VM_FAULT_ADDRESS
3139 LC_INODEOPS_ENHANCED_GETATTR
3140 LC_VM_OPERATIONS_REMOVE_VMF_ARG
3141 LC_HAVE_KEY_USAGE_REFCOUNT
3142 LC_HAVE_CRYPTO_MAX_ALG_NAME_128
3146 LC_SUPER_BLOCK_S_UUID
3147 LC_SUPER_SETUP_BDI_NAME
3151 LC_BIO_INTEGRITY_ENABLED
3154 LC_PAGEVEC_INIT_ONE_PARAM
3166 LC_UAPI_LINUX_MOUNT_H
3167 LC_HAVE_SUNRPC_CACHE_HASH_LOCK_IS_A_SPINLOCK
3170 LC_HAS_LINUX_SELINUX_ENABLED
3173 LC_ACCOUNT_PAGE_DIRTIED
3176 LC_BIO_BI_PHYS_SEGMENTS
3177 LC_LM_COMPARE_OWNER_EXISTS
3179 # kernel patch to extend integrity interface
3180 LC_BIO_INTEGRITY_PREP_FN
3183 AS_IF([test "x$enable_server" != xno], [
3193 # Check whether to build the client side of Lustre
3195 AC_DEFUN([LC_CONFIG_CLIENT], [
3196 AC_MSG_CHECKING([whether to build Lustre client support])
3197 AC_ARG_ENABLE([client],
3198 AC_HELP_STRING([--disable-client],
3199 [disable Lustre client support]),
3200 [], [enable_client="yes"])
3201 AC_MSG_RESULT([$enable_client])
3202 ]) # LC_CONFIG_CLIENT
3207 AC_DEFUN([LB_CONFIG_MPITESTS], [
3208 AC_ARG_ENABLE([mpitests],
3209 AC_HELP_STRING([--enable-mpitests=<yes|no|mpicc wrapper>],
3210 [include mpi tests]), [
3211 enable_mpitests="yes"
3214 MPICC_WRAPPER="mpicc"
3215 MPI_BIN=$(eval which $MPICC_WRAPPER | xargs dirname)
3218 enable_mpitests="no"
3222 MPICC_WRAPPER=$enableval
3223 MPI_BIN=$(eval echo $MPICC_WRAPPER | xargs dirname)
3227 enable_mpitests="yes"
3228 MPICC_WRAPPER="mpicc"
3229 MPI_BIN=$(eval which $MPICC_WRAPPER | xargs dirname)
3232 if test "x$enable_mpitests" != "xno"; then
3235 AC_CACHE_CHECK([whether mpitests can be built],
3236 lb_cv_mpi_tests, [AC_COMPILE_IFELSE([AC_LANG_SOURCE([
3240 MPI_Initialized(&flag);
3243 ])], [lb_cv_mpi_tests="yes"], [lb_cv_mpi_tests="no"])
3245 enable_mpitests=$lb_cv_mpi_tests
3249 AC_SUBST(MPICC_WRAPPER)
3250 ]) # LB_CONFIG_MPITESTS
3255 # whether to enable quota support global control
3257 AC_DEFUN([LC_CONFIG_QUOTA], [
3258 AC_MSG_CHECKING([whether to enable quota support global control])
3259 AC_ARG_ENABLE([quota],
3260 AC_HELP_STRING([--enable-quota],
3261 [enable quota support]),
3262 [], [enable_quota="yes"])
3263 AS_IF([test "x$enable_quota" = xyes],
3264 [AC_MSG_RESULT([yes])],
3265 [AC_MSG_RESULT([no])])
3266 ]) # LC_CONFIG_QUOTA
3271 AC_DEFUN([LC_QUOTA], [
3275 AS_IF([test "x$enable_quota" != xno -a "x$enable_utils" != xno], [
3276 AC_CHECK_HEADER([sys/quota.h],
3277 [AC_DEFINE(HAVE_SYS_QUOTA_H, 1,
3278 [Define to 1 if you have <sys/quota.h>.])],
3279 [AC_MSG_ERROR([don't find <sys/quota.h> in your system])])
3286 # configure support for optional OSD implementation
3288 AC_DEFUN([LC_OSD_ADDON], [
3289 AC_MSG_CHECKING([whether to use OSD addon])
3291 AC_HELP_STRING([--with-osd=path],
3292 [set path to optional osd]),
3299 OSDADDON="$with_osd"
3306 AS_IF([test $ENABLEOSDADDON -eq 0], [
3310 OSDMODNAME=$(basename $OSDADDON)
3311 AS_IF([test -e $LUSTRE/$OSDMODNAME], [
3312 AC_MSG_RESULT([can't link])
3314 ], [ln -s $OSDADDON $LUSTRE/$OSDMODNAME], [
3315 AC_MSG_RESULT([$OSDMODNAME])
3316 OSDADDON="obj-m += $OSDMODNAME/"
3318 AC_MSG_RESULT([can't link])
3328 # other configure checks
3330 AC_DEFUN([LC_CONFIGURE], [
3331 AC_MSG_NOTICE([Lustre core checks
3332 ==============================================================================])
3334 AS_IF([test $target_cpu == "i686" -o $target_cpu == "x86_64"],
3335 [CFLAGS="$CFLAGS -Wall -Werror"])
3337 # maximum MDS thread count
3340 # lustre/utils/gss/gss_util.c
3341 # lustre/utils/gss/gssd_proc.c
3342 # lustre/utils/gss/krb5_util.c
3343 # lustre/utils/llog_reader.c
3344 # lustre/utils/create_iam.c
3345 # lustre/utils/libiam.c
3346 AC_CHECK_HEADERS([netdb.h endian.h])
3347 AC_CHECK_FUNCS([gethostbyname])
3349 # lustre/utils/llverfs.c
3350 AC_CHECK_HEADERS([ext2fs/ext2fs.h])
3352 # lustre/utils/lfs.c
3353 AS_IF([test "$enable_dist" = "no"], [
3354 AC_CHECK_LIB([z], [crc32], [
3355 AC_CHECK_HEADER([zlib.h], [], [
3356 AC_MSG_ERROR([zlib.h not found.])])
3359 zlib library not found. Please install zlib development package.])
3365 AC_CHECK_LIB([selinux], [is_selinux_enabled],
3366 [AC_CHECK_HEADERS([selinux/selinux.h],
3367 [SELINUX="-lselinux"
3368 AC_DEFINE([HAVE_SELINUX], 1,
3369 [support for selinux ])],
3372 No libselinux-devel package found, unable to build selinux enabled tools
3377 No selinux package found, unable to build selinux enabled tools
3383 AC_MSG_CHECKING([whether to report minimum OST free space])
3384 AC_ARG_ENABLE([mindf],
3385 AC_HELP_STRING([--enable-mindf],
3386 [Make statfs report the minimum available space on any single OST instead of the sum of free space on all OSTs]),
3387 [], [enable_mindf="no"])
3388 AC_MSG_RESULT([$enable_mindf])
3389 AS_IF([test "$enable_mindf" = "yes"],
3390 [AC_DEFINE([MIN_DF], 1, [Report minimum OST free space])])
3392 AC_MSG_CHECKING([whether to randomly failing memory alloc])
3393 AC_ARG_ENABLE([fail_alloc],
3394 AC_HELP_STRING([--disable-fail-alloc],
3395 [disable randomly alloc failure]),
3396 [], [enable_fail_alloc="yes"])
3397 AC_MSG_RESULT([$enable_fail_alloc])
3398 AS_IF([test "x$enable_fail_alloc" != xno],
3399 [AC_DEFINE([RANDOM_FAIL_ALLOC], 1,
3400 [enable randomly alloc failure])])
3402 AC_MSG_CHECKING([whether to check invariants (expensive cpu-wise)])
3403 AC_ARG_ENABLE([invariants],
3404 AC_HELP_STRING([--enable-invariants],
3405 [enable invariant checking (cpu intensive)]),
3406 [], [enable_invariants="no"])
3407 AC_MSG_RESULT([$enable_invariants])
3408 AS_IF([test "x$enable_invariants" = xyes],
3409 [AC_DEFINE([CONFIG_LUSTRE_DEBUG_EXPENSIVE_CHECK], 1,
3410 [enable invariant checking])])
3412 AC_MSG_CHECKING([whether to track references with lu_ref])
3413 AC_ARG_ENABLE([lu_ref],
3414 AC_HELP_STRING([--enable-lu_ref],
3415 [enable lu_ref reference tracking code]),
3416 [], [enable_lu_ref="no"])
3417 AC_MSG_RESULT([$enable_lu_ref])
3418 AS_IF([test "x$enable_lu_ref" = xyes],
3419 [AC_DEFINE([USE_LU_REF], 1,
3420 [enable lu_ref reference tracking code])])
3422 AC_MSG_CHECKING([whether to enable page state tracking])
3423 AC_ARG_ENABLE([pgstate-track],
3424 AC_HELP_STRING([--enable-pgstate-track],
3425 [enable page state tracking]),
3426 [], [enable_pgstat_track="no"])
3427 AC_MSG_RESULT([$enable_pgstat_track])
3428 AS_IF([test "x$enable_pgstat_track" = xyes],
3429 [AC_DEFINE([CONFIG_DEBUG_PAGESTATE_TRACKING], 1,
3430 [enable page state tracking code])])
3433 AC_MSG_CHECKING([systemd unit file directory])
3434 AC_ARG_WITH([systemdsystemunitdir],
3435 [AS_HELP_STRING([--with-systemdsystemunitdir=DIR],
3436 [Directory for systemd service files])],
3437 [], [with_systemdsystemunitdir=auto])
3438 AS_IF([test "x$with_systemdsystemunitdir" = "xyes" -o "x$with_systemdsystemunitdir" = "xauto"],
3439 [def_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)
3440 AS_IF([test "x$def_systemdsystemunitdir" = "x"],
3441 [AS_IF([test "x$with_systemdsystemunitdir" = "xyes"],
3442 [AC_MSG_ERROR([systemd support requested but pkg-config unable to query systemd package])])
3443 with_systemdsystemunitdir=no],
3444 [with_systemdsystemunitdir="$def_systemdsystemunitdir"])])
3445 AS_IF([test "x$with_systemdsystemunitdir" != "xno"],
3446 [AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])])
3447 AC_MSG_RESULT([$with_systemdsystemunitdir])
3449 AC_MSG_CHECKING([bash-completion directory])
3450 AC_ARG_WITH([bash-completion-dir],
3451 AS_HELP_STRING([--with-bash-completion-dir[=PATH]],
3452 [Install the bash auto-completion script in this directory.]),
3454 [with_bash_completion_dir=yes])
3455 AS_IF([test "x$with_bash_completion_dir" = "xyes"], [
3456 BASH_COMPLETION_DIR="`pkg-config --variable=completionsdir bash-completion`"
3457 AS_IF([test "x$BASH_COMPLETION_DIR" = "x"], [
3458 [BASH_COMPLETION_DIR="$datadir/bash-completion/completions"]
3461 BASH_COMPLETION_DIR="$with_bash_completion_dir"
3463 AC_SUBST([BASH_COMPLETION_DIR])
3464 AC_MSG_RESULT([$BASH_COMPLETION_DIR])
3470 # AM_CONDITIONALS for lustre
3472 AC_DEFUN([LC_CONDITIONALS], [
3473 AM_CONDITIONAL(MPITESTS, test x$enable_mpitests = xyes, Build MPI Tests)
3474 AM_CONDITIONAL(CLIENT, test x$enable_client = xyes)
3475 AM_CONDITIONAL(SERVER, test x$enable_server = xyes)
3476 AM_CONDITIONAL(SPLIT, test x$enable_split = xyes)
3477 AM_CONDITIONAL(EXT2FS_DEVEL, test x$ac_cv_header_ext2fs_ext2fs_h = xyes)
3478 AM_CONDITIONAL(GSS, test x$enable_gss = xyes)
3479 AM_CONDITIONAL(GSS_KEYRING, test x$enable_gss_keyring = xyes)
3480 AM_CONDITIONAL(GSS_PIPEFS, test x$enable_gss_pipefs = xyes)
3481 AM_CONDITIONAL(GSS_SSK, test x$enable_ssk = xyes)
3482 AM_CONDITIONAL(LIBPTHREAD, test x$enable_libpthread = xyes)
3483 AM_CONDITIONAL(HAVE_SYSTEMD, test "x$with_systemdsystemunitdir" != "xno")
3484 AM_CONDITIONAL(ENABLE_BASH_COMPLETION, test "x$with_bash_completion_dir" != "xno")
3485 AM_CONDITIONAL(XATTR_HANDLER, test "x$lb_cv_compile_xattr_handler_flags" = xyes)
3486 AM_CONDITIONAL(SELINUX, test "$SELINUX" = "-lselinux")
3487 AM_CONDITIONAL(GETSEPOL, test x$enable_getsepol = xyes)
3488 ]) # LC_CONDITIONALS
3493 # files that should be generated with AC_OUTPUT
3495 AC_DEFUN([LC_CONFIG_FILES],
3499 lustre/autoconf/Makefile
3500 lustre/conf/Makefile
3501 lustre/conf/resource/Makefile
3502 lustre/contrib/Makefile
3504 lustre/include/Makefile
3505 lustre/include/lustre/Makefile
3506 lustre/include/uapi/linux/lustre/Makefile
3507 lustre/kernel_patches/targets/4.18-rhel8.1.target
3508 lustre/kernel_patches/targets/4.18-rhel8.target
3509 lustre/kernel_patches/targets/3.10-rhel7.7.target
3510 lustre/kernel_patches/targets/3.10-rhel7.6.target
3511 lustre/kernel_patches/targets/3.10-rhel7.5.target
3512 lustre/kernel_patches/targets/4.14-rhel7.5.target
3513 lustre/kernel_patches/targets/4.14-rhel7.6.target
3514 lustre/kernel_patches/targets/3.0-sles11.target
3515 lustre/kernel_patches/targets/3.0-sles11sp3.target
3516 lustre/kernel_patches/targets/3.0-sles11sp4.target
3517 lustre/kernel_patches/targets/3.12-sles12.target
3518 lustre/kernel_patches/targets/4.4-sles12.target
3519 lustre/kernel_patches/targets/4.4-sles12sp3.target
3520 lustre/kernel_patches/targets/4.12-sles12sp4.target
3521 lustre/kernel_patches/targets/3.x-fc18.target
3522 lustre/ldlm/Makefile
3524 lustre/fid/autoMakefile
3525 lustre/llite/Makefile
3526 lustre/llite/autoMakefile
3528 lustre/lov/autoMakefile
3530 lustre/mdc/autoMakefile
3532 lustre/lmv/autoMakefile
3533 lustre/lfsck/Makefile
3534 lustre/lfsck/autoMakefile
3536 lustre/mdt/autoMakefile
3538 lustre/mdd/autoMakefile
3540 lustre/fld/autoMakefile
3541 lustre/obdclass/Makefile
3542 lustre/obdclass/autoMakefile
3543 lustre/obdecho/Makefile
3544 lustre/obdecho/autoMakefile
3546 lustre/ofd/autoMakefile
3548 lustre/osc/autoMakefile
3550 lustre/ost/autoMakefile
3551 lustre/osd-ldiskfs/Makefile
3552 lustre/osd-ldiskfs/autoMakefile
3553 lustre/osd-zfs/Makefile
3554 lustre/osd-zfs/autoMakefile
3556 lustre/mgc/autoMakefile
3558 lustre/mgs/autoMakefile
3559 lustre/target/Makefile
3560 lustre/ptlrpc/Makefile
3561 lustre/ptlrpc/autoMakefile
3562 lustre/ptlrpc/gss/Makefile
3563 lustre/ptlrpc/gss/autoMakefile
3564 lustre/quota/Makefile
3565 lustre/quota/autoMakefile
3566 lustre/scripts/Makefile
3567 lustre/scripts/systemd/Makefile
3568 lustre/tests/Makefile
3569 lustre/tests/mpi/Makefile
3570 lustre/tests/kernel/Makefile
3571 lustre/tests/kernel/autoMakefile
3572 lustre/utils/Makefile
3573 lustre/utils/gss/Makefile
3575 lustre/osp/autoMakefile
3577 lustre/lod/autoMakefile
3579 ]) # LC_CONFIG_FILES