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_KEY_TYPE_INSTANTIATE_2ARGS
237 # rhel7 key_type->instantiate takes 2 args (struct key, struct key_preparsed_payload)
239 AC_DEFUN([LC_KEY_TYPE_INSTANTIATE_2ARGS], [
240 LB_CHECK_COMPILE([if 'key_type->instantiate' has two args],
241 key_type_instantiate_2args, [
242 #include <linux/key-type.h>
244 ((struct key_type *)0)->instantiate(0, NULL);
246 AC_DEFINE(HAVE_KEY_TYPE_INSTANTIATE_2ARGS, 1,
247 [key_type->instantiate has two args])
249 ]) # LC_KEY_TYPE_INSTANTIATE_2ARGS
254 AC_DEFUN([LC_CONFIG_SUNRPC], [
255 LB_CHECK_CONFIG_IM([SUNRPC], [], [
256 AS_IF([test "x$sunrpc_required" = xyes], [
259 kernel SUNRPC support is required by using GSS.
262 ]) # LC_CONFIG_SUNRPC
265 # LC_CONFIG_GSS (default 'auto' (tests for dependencies, if found, enables))
267 # Build gss and related tools of Lustre. Currently both kernel and user space
268 # parts are depend on linux platform.
270 AC_DEFUN([LC_CONFIG_GSS], [
271 AC_MSG_CHECKING([whether to enable gss support])
273 [AC_HELP_STRING([--enable-gss], [enable gss support])],
274 [], [enable_gss="auto"])
275 AC_MSG_RESULT([$enable_gss])
277 AS_IF([test "x$enable_gss" != xno], [
278 LC_CONFIG_GSS_KEYRING
279 LC_KEY_TYPE_INSTANTIATE_2ARGS
280 sunrpc_required=$enable_gss
284 LB_CHECK_CONFIG_IM([CRYPTO_MD5], [],
285 [AC_MSG_WARN([kernel MD5 support is recommended by using GSS.])])
286 LB_CHECK_CONFIG_IM([CRYPTO_SHA1], [],
287 [AC_MSG_WARN([kernel SHA1 support is recommended by using GSS.])])
288 LB_CHECK_CONFIG_IM([CRYPTO_SHA256], [],
289 [AC_MSG_WARN([kernel SHA256 support is recommended by using GSS.])])
290 LB_CHECK_CONFIG_IM([CRYPTO_SHA512], [],
291 [AC_MSG_WARN([kernel SHA512 support is recommended by using GSS.])])
293 require_krb5=$enable_gss
297 AS_IF([test -n "$KRBDIR"], [
298 gss_conf_test="success"
300 gss_conf_test="failure"
303 AS_IF([test "x$gss_conf_test" = xsuccess && test "x$enable_gss" != xno], [
304 AC_DEFINE([HAVE_GSS], [1], [Define this is if you enable gss])
307 enable_gss_keyring="no"
311 enable_ssk=$enable_gss
313 enable_gss_keyring="no"
319 # OpenSSL 1.0+ return int for HMAC functions but older SLES11 versions do not
320 AC_DEFUN([LC_OPENSSL_SSK], [
321 AC_MSG_CHECKING([whether OpenSSL has functions needed for SSK])
322 AS_IF([test "x$enable_ssk" != xno], [
323 AC_COMPILE_IFELSE([AC_LANG_SOURCE([
324 #include <openssl/hmac.h>
325 #include <openssl/evp.h>
329 rc = HMAC_Init_ex(NULL, "test", 4, EVP_md_null(), NULL);
331 ])],[AC_DEFINE(HAVE_OPENSSL_SSK, 1,
332 [OpenSSL HMAC functions needed for SSK])],
335 AC_MSG_RESULT([$enable_ssk])
338 # LC_OPENSSL_GETSEPOL
340 # OpenSSL is needed for l_getsepol
341 AC_DEFUN([LC_OPENSSL_GETSEPOL], [
342 AC_MSG_CHECKING([whether openssl-devel is present])
343 AC_COMPILE_IFELSE([AC_LANG_SOURCE([
344 #include <openssl/evp.h>
347 EVP_MD_CTX *mdctx = EVP_MD_CTX_create();
350 AC_DEFINE(HAVE_OPENSSL_GETSEPOL, 1, [openssl-devel is present])
351 enable_getsepol="yes"
357 No openssk-devel headers found, unable to build l_getsepol and SELinux status checking
360 AC_MSG_RESULT([$enable_getsepol])
361 ]) # LC_OPENSSL_GETSEPOL
363 # LC_INODE_PERMISION_2ARGS
365 # up to v2.6.27 had a 3 arg version (inode, mask, nameidata)
366 # v2.6.27->v2.6.37 had a 2 arg version (inode, mask)
367 # v2.6.37->v3.0 had a 3 arg version (inode, mask, nameidata)
368 # v3.1 onward have a 2 arg version (inode, mask)
370 AC_DEFUN([LC_INODE_PERMISION_2ARGS], [
371 LB_CHECK_COMPILE([if 'inode_operations->permission' has two args],
372 inode_ops_permission_2args, [
373 #include <linux/fs.h>
375 struct inode *inode __attribute__ ((unused));
378 inode->i_op->permission(NULL, 0);
380 AC_DEFINE(HAVE_INODE_PERMISION_2ARGS, 1,
381 [inode_operations->permission has two args])
383 ]) # LC_INODE_PERMISION_2ARGS
386 # LC_HAVE_FSTYPE_MOUNT
388 # 2.6.39 replace get_sb with mount in struct file_system_type
390 AC_DEFUN([LC_HAVE_FSTYPE_MOUNT], [
391 LB_CHECK_COMPILE([if 'file_system_type' has 'mount' field],
392 file_system_type_mount, [
393 #include <linux/fs.h>
395 struct file_system_type fst = { };
398 mount = (void *)fst.mount;
400 AC_DEFINE(HAVE_FSTYPE_MOUNT, 1,
401 [struct file_system_type has mount field])
403 ]) # LC_HAVE_FSTYPE_MOUNT
406 # LC_HAVE_FHANDLE_SYSCALLS
408 # 2.6.39 The open_by_handle_at() and name_to_handle_at() system calls were
409 # added to Linux kernel 2.6.39.
410 # Check if client supports these functions
412 AC_DEFUN([LC_HAVE_FHANDLE_SYSCALLS], [
413 LB_CHECK_CONFIG_IM([FHANDLE],[
414 AC_DEFINE(HAVE_FHANDLE_SYSCALLS, 1,
415 [kernel supports fhandles and related syscalls])
417 ]) # LC_HAVE_FHANDLE_SYSCALLS
420 # LC_HAVE_INODE_OWNER_OR_CAPABLE
422 # 2.6.39 renames is_owner_or_cap to inode_owner_or_capable
424 AC_DEFUN([LC_HAVE_INODE_OWNER_OR_CAPABLE], [
425 LB_CHECK_COMPILE([if 'inode_owner_or_capable' exist],
426 inode_owner_or_capable, [
427 #include <linux/fs.h>
429 inode_owner_or_capable(NULL);
431 AC_DEFINE(HAVE_INODE_OWNER_OR_CAPABLE, 1,
432 [inode_owner_or_capable exist])
434 ]) # LC_HAVE_INODE_OWNER_OR_CAPABLE
437 # LC_DIRTY_INODE_WITH_FLAG
439 # 3.0 dirty_inode() has a flag parameter
440 # see kernel commit aa38572954ade525817fe88c54faebf85e5a61c0
442 AC_DEFUN([LC_DIRTY_INODE_WITH_FLAG], [
443 LB_CHECK_COMPILE([if 'dirty_inode' super_operation takes flag],
444 dirty_inode_super_operation_flag, [
445 #include <linux/fs.h>
447 struct inode *inode = NULL;
448 inode->i_sb->s_op->dirty_inode(NULL, 0);
450 AC_DEFINE(HAVE_DIRTY_INODE_HAS_FLAG, 1,
451 [dirty_inode super_operation takes flag])
453 ]) # LC_DIRTY_INODE_WITH_FLAG
458 # 3.0 introduced setns
460 AC_DEFUN([LC_SETNS], [
461 AC_CHECK_HEADERS([sched.h], [], [],
464 AC_CHECK_FUNCS([setns])
468 # LC_LM_XXX_LOCK_MANAGER_OPS
470 # 3.1 renames lock-manager ops(lock_manager_operations) from fl_xxx to lm_xxx
471 # see kernel commit 8fb47a4fbf858a164e973b8ea8ef5e83e61f2e50
473 AC_DEFUN([LC_LM_XXX_LOCK_MANAGER_OPS], [
474 LB_CHECK_COMPILE([if 'lock-manager' ops renamed to 'lm_xxx'],
475 lock_manager_ops_lm_xxx, [
476 #include <linux/fs.h>
478 struct lock_manager_operations lm_ops;
479 lm_ops.lm_notify = NULL;
481 AC_DEFINE(HAVE_LM_XXX_LOCK_MANAGER_OPS, 1,
482 [lock-manager ops renamed to lm_xxx])
484 ]) # LC_LM_XXX_LOCK_MANAGER_OPS
489 # 3.1 kills inode->i_alloc_sem, use i_dio_count and inode_dio_wait
491 # see kernel commit bd5fe6c5eb9c548d7f07fe8f89a150bb6705e8e3
493 AC_DEFUN([LC_INODE_DIO_WAIT], [
494 LB_CHECK_COMPILE([if 'inode->i_alloc_sem' is killed and use inode_dio_wait],
496 #include <linux/fs.h>
498 inode_dio_wait((struct inode *)0);
500 AC_DEFINE(HAVE_INODE_DIO_WAIT, 1,
501 [inode->i_alloc_sem is killed and use inode_dio_wait])
503 ]) # LC_INODE_DIO_WAIT
508 # 3.1 adds get_acl method to inode_operations to read ACL from disk.
509 # see kernel commit 4e34e719e457f2e031297175410fc0bd4016a085
511 AC_DEFUN([LC_IOP_GET_ACL], [
512 LB_CHECK_COMPILE([if 'inode_operations' has '.get_acl' member function],
514 #include <linux/fs.h>
516 struct inode_operations iop;
519 AC_DEFINE(HAVE_IOP_GET_ACL, 1,
520 [inode_operations has .get_acl member function])
525 # LC_FILE_LLSEEK_SIZE
527 # 3.1 introduced generic_file_llseek_size()
529 AC_DEFUN([LC_FILE_LLSEEK_SIZE], [
530 LB_CHECK_EXPORT([generic_file_llseek_size], [fs/read_write.c],
531 [AC_DEFINE(HAVE_FILE_LLSEEK_SIZE, 1,
532 [generic_file_llseek_size is exported by the kernel])])
533 ]) # LC_FILE_LLSEEK_SIZE
536 # LC_RADIX_EXCEPTION_ENTRY
537 # 3.1 adds radix_tree_exception_entry.
539 AC_DEFUN([LC_RADIX_EXCEPTION_ENTRY], [
540 LB_CHECK_COMPILE([radix_tree_exceptional_entry exist],
541 radix_tree_exceptional_entry, [
542 #include <linux/radix-tree.h>
544 radix_tree_exceptional_entry(NULL);
546 AC_DEFINE(HAVE_RADIX_EXCEPTION_ENTRY, 1,
547 [radix_tree_exceptional_entry exist])
549 ]) # LC_RADIX_EXCEPTION_ENTRY
552 # LC_HAVE_PROTECT_I_NLINK
554 # 3.2 protects inode->i_nlink from direct modification
555 # see kernel commit a78ef704a8dd430225955f0709b22d4a6ba21deb
556 # at the same time adds set_nlink(), so checks set_nlink() for it.
558 AC_DEFUN([LC_HAVE_PROTECT_I_NLINK], [
559 LB_CHECK_COMPILE([if 'inode->i_nlink' is protected from direct modification],
560 inode_i_nlink_protected, [
561 #include <linux/fs.h>
566 AC_DEFINE(HAVE_PROTECT_I_NLINK, 1,
567 [inode->i_nlink is protected from direct modification])
569 ]) # LC_HAVE_PROTECT_I_NLINK
572 # 2.6.39 security_inode_init_security takes a 'struct qstr' parameter
574 # 3.2 security_inode_init_security takes a callback to set xattrs
576 AC_DEFUN([LC_HAVE_SECURITY_IINITSEC], [
577 LB_CHECK_COMPILE([if security_inode_init_security takes a callback],
578 security_inode_init_security_callback, [
579 #include <linux/security.h>
581 security_inode_init_security(NULL, NULL, NULL, (const initxattrs)NULL, NULL);
583 AC_DEFINE(HAVE_SECURITY_IINITSEC_CALLBACK, 1,
584 [security_inode_init_security takes a callback to set xattrs])
586 LB_CHECK_COMPILE([if security_inode_init_security takes a 'struct qstr' parameter],
587 security_inode_init_security_qstr, [
588 #include <linux/security.h>
590 security_inode_init_security(NULL, NULL, (struct qstr *)NULL, NULL, NULL, NULL);
592 AC_DEFINE(HAVE_SECURITY_IINITSEC_QSTR, 1,
593 [security_inode_init_security takes a 'struct qstr' parameter])
596 ]) # LC_HAVE_SECURITY_IINITSEC
599 # 2.6.39 vfs_create takes a 'struct nameidata' parameter
601 AC_DEFUN([LC_VFS_CREATE_USE_NAMEIDATA], [
602 LB_CHECK_COMPILE([if vfs_create takes a struct nameidata parameter],
604 #include <linux/namei.h>
605 #include <linux/fs.h>
607 struct nameidata *nd;
608 vfs_create(NULL, NULL, 0, nd);
610 AC_DEFINE(HAVE_VFS_CREATE_USE_NAMEIDATA, 1,
611 [vfs_create use nameidata as parameter])
613 ]) # LC_VFS_CREATE_USE_NAMEIDATA
616 # LC_HAVE_MIGRATE_HEADER
618 # 3.3 introduces migrate_mode.h and migratepage has 4 args
620 AC_DEFUN([LC_HAVE_MIGRATE_HEADER], [
621 LB_CHECK_FILE([$LINUX/include/linux/migrate.h], [
622 AC_DEFINE(HAVE_MIGRATE_H, 1,
623 [kernel has include/linux/migrate.h])
625 LB_CHECK_FILE([$LINUX/include/linux/migrate_mode.h], [
626 AC_DEFINE(HAVE_MIGRATE_MODE_H, 1,
627 [kernel has include/linux/migrate_mode.h])
630 ]) # LC_HAVE_MIGRATE_HEADER
633 # LC_MIGRATEPAGE_4ARGS
635 AC_DEFUN([LC_MIGRATEPAGE_4ARGS], [
636 LB_CHECK_COMPILE([if 'address_space_operations.migratepage' has 4 args],
637 address_space_ops_migratepage_4args, [
638 #include <linux/fs.h>
639 #ifdef HAVE_MIGRATE_H
640 #include <linux/migrate.h>
641 #elif defined(HAVE_MIGRATE_MODE_H)
642 #include <linux/migrate_mode.h>
645 struct address_space_operations aops = { };
646 aops.migratepage(NULL, NULL, NULL, MIGRATE_ASYNC);
648 AC_DEFINE(HAVE_MIGRATEPAGE_4ARGS, 1,
649 [address_space_operations.migratepage has 4 args])
651 ]) # LC_MIGRATEPAGE_4ARGS
654 # LC_SUPEROPS_USE_DENTRY
656 # 3.3 switchs super_operations to use dentry as parameter (but not vfsmount)
657 # see kernel commit 34c80b1d93e6e20ca9dea0baf583a5b5510d92d4
659 AC_DEFUN([LC_SUPEROPS_USE_DENTRY], [
660 tmp_flags="$EXTRA_KCFLAGS"
661 EXTRA_KCFLAGS="-Werror"
662 LB_CHECK_COMPILE([if 'super_operations' use 'dentry' as parameter],
664 #include <linux/fs.h>
665 int show_options(struct seq_file *seq, struct dentry *root) {
669 struct super_operations ops;
670 ops.show_options = show_options;
672 AC_DEFINE(HAVE_SUPEROPS_USE_DENTRY, 1,
673 [super_operations use dentry as parameter])
675 EXTRA_KCFLAGS="$tmp_flags"
676 ]) # LC_SUPEROPS_USE_DENTRY
679 # LC_INODEOPS_USE_UMODE_T
681 # 3.3 switchs inode_operations to use umode_t as parameter (but not int)
682 # see kernel commit 1a67aafb5f72a436ca044293309fa7e6351d6a35
684 AC_DEFUN([LC_INODEOPS_USE_UMODE_T], [
685 tmp_flags="$EXTRA_KCFLAGS"
686 EXTRA_KCFLAGS="-Werror"
687 LB_CHECK_COMPILE([if 'inode_operations' use 'umode_t' as parameter],
689 #include <linux/fs.h>
690 #include <linux/types.h>
691 int my_mknod(struct inode *dir, struct dentry *dchild,
692 umode_t mode, dev_t dev)
697 struct inode_operations ops;
698 ops.mknod = my_mknod;
700 AC_DEFINE(HAVE_INODEOPS_USE_UMODE_T, 1,
701 [inode_operations use umode_t as parameter])
703 EXTRA_KCFLAGS="$tmp_flags"
704 ]) # LC_INODEOPS_USE_UMODE_T
707 # LC_KMAP_ATOMIC_HAS_1ARG
709 # 3.4 kmap_atomic removes second argument
710 # see kernel commit 1ec9c5ddc17aa398f05646abfcbaf315b544e62f
712 AC_DEFUN([LC_KMAP_ATOMIC_HAS_1ARG], [
713 LB_CHECK_COMPILE([if 'kmap_atomic' has only 1 argument],
715 #include <linux/highmem.h>
719 AC_DEFINE(HAVE_KMAP_ATOMIC_HAS_1ARG, 1,
720 [have kmap_atomic has only 1 argument])
722 ]) # LC_KMAP_ATOMIC_HAS_1ARG
725 # LC_HAVE_D_MAKE_ROOT
727 # 3.4 converts d_alloc_root to d_make_root
728 # see kernel commit 32991ab305ace7017c62f8eecbe5eb36dc32e13b
730 AC_DEFUN([LC_HAVE_D_MAKE_ROOT], [
731 LB_CHECK_COMPILE([if have 'd_make_root'],
733 #include <linux/fs.h>
735 d_make_root((struct inode *)NULL);
737 AC_DEFINE(HAVE_D_MAKE_ROOT, 1,
740 ]) # LC_HAVE_D_MAKE_ROOT
743 # LC_HAVE_CACHE_REGISTER
745 # 3.4 cache_register/cache_unregister are removed
746 # see kernel commit 2c5f846747526e2b83c5f1b8e69016be0e2e87c0
747 # Note, since 2.6.37 cache_register_net/cache_unregister_net
748 # are defined, but not exported.
749 # 3.3 cache_register_net/cache_unregister_net are
750 # exported and replacing cache_register/cache_unregister in 3.4
752 AC_DEFUN([LC_HAVE_CACHE_REGISTER], [
753 LB_CHECK_COMPILE([if have 'cache_register'],
755 #include <linux/sunrpc/cache.h>
757 cache_register(NULL);
759 AC_DEFINE(HAVE_CACHE_REGISTER, 1,
760 [have cache_register])
762 ]) # LC_HAVE_CACHE_REGISTER
765 # LC_HAVE_CLEAR_INODE
767 # 3.5 renames end_writeback() back to clear_inode()...
768 # see kernel commit dbd5768f87ff6fb0a4fe09c4d7b6c4a24de99430
770 AC_DEFUN([LC_HAVE_CLEAR_INODE], [
771 LB_CHECK_COMPILE([if have 'clear_inode'],
773 #include <linux/fs.h>
775 clear_inode((struct inode *)NULL);
777 AC_DEFINE(HAVE_CLEAR_INODE, 1,
780 ]) # LC_HAVE_CLEAR_INODE
783 # LC_HAVE_ENCODE_FH_PARENT
785 # 3.5 encode_fh has parent inode passed in directly
786 # see kernel commit b0b0382b
788 AC_DEFUN([LC_HAVE_ENCODE_FH_PARENT], [
789 tmp_flags="$EXTRA_KCFLAGS"
790 EXTRA_KCFLAGS="-Werror"
791 LB_CHECK_COMPILE([if 'encode_fh' have parent inode as parameter],
792 encode_fh_parent_inode, [
793 #include <linux/exportfs.h>
794 #include <linux/fs.h>
795 #include <linux/types.h>
796 int ll_encode_fh(struct inode *i, __u32 *a, int *b, struct inode *p)
801 struct export_operations exp_op;
802 exp_op.encode_fh = ll_encode_fh;
804 AC_DEFINE(HAVE_ENCODE_FH_PARENT, 1,
805 [have parent inode as parameter])
807 EXTRA_KCFLAGS="$tmp_flags"
808 ]) # LC_HAVE_ENCODE_FH_PARENT
811 # LC_FILE_LLSEEK_SIZE_5ARG
813 # 3.5 has generic_file_llseek_size with 5 args
815 AC_DEFUN([LC_FILE_LLSEEK_SIZE_5ARG], [
816 LB_CHECK_COMPILE([if Linux kernel has 'generic_file_llseek_size' with 5 args],
817 generic_file_llseek_size_5args, [
818 #include <linux/fs.h>
820 generic_file_llseek_size(NULL, 0, 0, 0, 0);
822 AC_DEFINE(HAVE_FILE_LLSEEK_SIZE_5ARGS, 1,
823 [kernel has generic_file_llseek_size with 5 args])
825 ]) # LC_FILE_LLSEEK_SIZE_5ARG
828 # LC_LLITE_DATA_IS_LIST
830 # 3.6 switch i_dentry/d_alias from list to hlist
832 # In the upstream kernels d_alias first changes
833 # to a hlist and then in later version, 3.11, gets
834 # moved to the union d_u. Due to some distros having
835 # d_alias in the d_u union as a struct list, which
836 # has never existed upstream stream, we can't test
837 # if d_alias is a list or hlist directly. If ever
838 # i_dentry and d_alias even up different combos then
839 # the build will fail. In that case then we will need
840 # to separate out the i_dentry and d_alias test below.
842 AC_DEFUN([LC_DATA_FOR_LLITE_IS_LIST], [
843 tmp_flags="$EXTRA_KCFLAGS"
844 EXTRA_KCFLAGS="-Werror"
845 LB_CHECK_COMPILE([if 'i_dentry/d_alias' uses 'list'],
846 i_dentry_d_alias_list, [
847 #include <linux/fs.h>
850 INIT_LIST_HEAD(&inode.i_dentry);
852 AC_DEFINE(DATA_FOR_LLITE_IS_LIST, 1,
853 [both i_dentry/d_alias uses list])
855 EXTRA_KCFLAGS="$tmp_flags"
856 ]) # LC_DATA_FOR_LLITE_IS_LIST
859 # LC_DENTRY_OPEN_USE_PATH
861 # 3.6 dentry_open uses struct path as first argument
862 # see kernel commit 765927b2
864 AC_DEFUN([LC_DENTRY_OPEN_USE_PATH], [
865 tmp_flags="$EXTRA_KCFLAGS"
866 EXTRA_KCFLAGS="-Werror"
867 LB_CHECK_COMPILE([if 'dentry_open' uses 'struct path' as first argument],
869 #include <linux/fs.h>
870 #include <linux/path.h>
873 dentry_open(&path, 0, NULL);
875 AC_DEFINE(HAVE_DENTRY_OPEN_USE_PATH, 1,
876 [dentry_open uses struct path as first argument])
878 EXTRA_KCFLAGS="$tmp_flags"
879 ]) # LC_DENTRY_OPEN_USE_PATH
882 # LC_HAVE_IOP_ATOMIC_OPEN
884 # 3.6 vfs adds iop->atomic_open
886 AC_DEFUN([LC_HAVE_IOP_ATOMIC_OPEN], [
887 LB_CHECK_COMPILE([if 'iop' has 'atomic_open'],
888 inode_ops_atomic_open, [
889 #include <linux/fs.h>
891 struct inode_operations iop;
892 iop.atomic_open = NULL;
894 AC_DEFINE(HAVE_IOP_ATOMIC_OPEN, 1,
895 [have iop atomic_open])
897 ]) # LC_HAVE_IOP_ATOMIC_OPEN
900 # LC_HAVE_SB_START_WRITE
902 # RHEL6 2.6.32, 3.6 or newer support wrapped FS freeze functions
904 AC_DEFUN([LC_HAVE_SB_START_WRITE], [
905 LB_CHECK_COMPILE([if kernel supports wrapped FS freeze functions],
907 #include <linux/fs.h>
909 sb_start_write(NULL);
911 AC_DEFINE(HAVE_SB_START_WRITE, 1,
912 [kernel supports wrapped FS freeze functions])
914 ]) # LC_HAVE_SB_START_WRITE
917 # LC_HAVE_POSIXACL_USER_NS
919 # 3.7 posix_acl_{to,from}_xattr take struct user_namespace
921 AC_DEFUN([LC_HAVE_POSIXACL_USER_NS], [
922 LB_CHECK_COMPILE([if 'posix_acl_to_xattr' takes 'struct user_namespace'],
923 posix_acl_to_xattr_user_namespace, [
924 #include <linux/fs.h>
925 #include <linux/posix_acl_xattr.h>
927 posix_acl_to_xattr((struct user_namespace *)NULL, NULL, NULL, 0);
929 AC_DEFINE(HAVE_POSIXACL_USER_NS, 1,
930 [posix_acl_to_xattr takes struct user_namespace])
932 ]) # LC_HAVE_POSIXACL_USER_NS
935 # LC_HAVE_FILE_F_INODE
937 # 3.8 struct file has new member f_inode
939 AC_DEFUN([LC_HAVE_FILE_F_INODE], [
940 LB_CHECK_COMPILE([if 'struct file' has member 'f_inode'],
942 #include <linux/fs.h>
944 ((struct file *)0)->f_inode = NULL;
946 AC_DEFINE(HAVE_FILE_F_INODE, 1,
947 [struct file has member f_inode])
949 ]) # LC_HAVE_FILE_F_INODE
954 # 3.8 has introduced inline function file_inode
956 AC_DEFUN([LC_HAVE_FILE_INODE], [
957 LB_CHECK_COMPILE([if file_inode() exists],
959 #include <linux/fs.h>
963 AC_DEFINE(HAVE_FILE_INODE, 1,
964 [file_inode() has been defined])
966 ]) # LC_HAVE_FILE_INODE
969 # LC_HAVE_SUNRPC_UPCALL_HAS_3ARGS
971 AC_DEFUN([LC_HAVE_SUNRPC_UPCALL_HAS_3ARGS], [
972 LB_CHECK_COMPILE([if 'sunrpc_cache_pipe_upcall' takes 3 args],
973 sunrpc_cache_pipe_upcall_3args, [
974 #include <linux/sunrpc/cache.h>
976 sunrpc_cache_pipe_upcall(NULL, NULL, NULL);
978 AC_DEFINE(HAVE_SUNRPC_UPCALL_HAS_3ARGS, 1,
979 [sunrpc_cache_pipe_upcall takes 3 args])
981 ]) # LC_HAVE_SUNRPC_UPCALL_HAS_3ARGS
984 # LC_HAVE_HLIST_FOR_EACH_3ARG
986 # 3.9 uses hlist_for_each_entry with 3 args
987 # b67bfe0d42cac56c512dd5da4b1b347a23f4b70a
989 AC_DEFUN([LC_HAVE_HLIST_FOR_EACH_3ARG], [
990 LB_CHECK_COMPILE([if 'hlist_for_each_entry' has 3 args],
991 hlist_for_each_entry_3args, [
992 #include <linux/list.h>
993 #include <linux/fs.h>
995 struct hlist_head *head = NULL;
998 hlist_for_each_entry(inode, head, i_hash) {
1002 AC_DEFINE(HAVE_HLIST_FOR_EACH_3ARG, 1,
1003 [hlist_for_each_entry has 3 args])
1005 ]) # LC_HAVE_HLIST_FOR_EACH_3ARG
1008 # LC_HAVE_BIO_END_SECTOR
1010 # 3.9 introduces bio_end_sector macro
1011 # f73a1c7d117d07a96d89475066188a2b79e53c48
1013 AC_DEFUN([LC_HAVE_BIO_END_SECTOR], [
1014 LB_CHECK_COMPILE([if 'bio_end_sector' is defined],
1016 #include <linux/bio.h>
1018 struct bio bio = { };
1019 unsigned long long end;
1021 end = bio_end_sector(&bio);
1023 AC_DEFINE(HAVE_BIO_END_SECTOR, 1,
1024 [bio_end_sector is defined])
1026 ]) # LC_HAVE_BIO_END_SECTOR
1029 # 3.9 created is_sxid
1031 AC_DEFUN([LC_HAVE_IS_SXID], [
1032 LB_CHECK_COMPILE([if 'is_sxid' is defined],
1034 #include <linux/fs.h>
1036 struct inode inode = { };
1038 is_sxid(inode.i_mode);
1040 AC_DEFINE(HAVE_IS_SXID, 1, [is_sxid is defined])
1042 ]) # LC_HAVE_IS_SXID
1045 # LC_HAVE_VFS_GETATTR_2ARGS
1047 AC_DEFUN([LC_HAVE_VFS_GETATTR_2ARGS], [
1048 LB_CHECK_COMPILE([if vfs_getattr takes 2 args],
1050 #include <linux/fs.h>
1054 vfs_getattr(&path, NULL);
1056 AC_DEFINE(HAVE_VFS_GETATTR_2ARGS, 1,
1057 [vfs_getattr takes 2 args])
1059 ]) # LC_HAVE_VFS_GETATTR_2ARGS
1062 # LC_HAVE_REMOVE_PROC_SUBTREE
1064 # 3.10 introduced remove_proc_subtree
1066 AC_DEFUN([LC_HAVE_REMOVE_PROC_SUBTREE], [
1067 LB_CHECK_COMPILE([if 'remove_proc_subtree' is defined],
1068 remove_proc_subtree, [
1069 #include <linux/proc_fs.h>
1071 remove_proc_subtree(NULL, NULL);
1073 AC_DEFINE(HAVE_REMOVE_PROC_SUBTREE, 1,
1074 [remove_proc_subtree is defined])
1076 ]) # LC_HAVE_REMOVE_PROC_SUBTREE
1079 # LC_HAVE_PROC_REMOVE
1081 # 3.10 introduced proc_remove
1083 AC_DEFUN([LC_HAVE_PROC_REMOVE], [
1084 LB_CHECK_COMPILE([if 'proc_remove' is defined],
1086 #include <linux/proc_fs.h>
1090 AC_DEFINE(HAVE_PROC_REMOVE, 1,
1091 [proc_remove is defined])
1093 ]) # LC_HAVE_PROC_REMOVE
1095 AC_DEFUN([LC_HAVE_PROJECT_QUOTA], [
1096 LB_CHECK_COMPILE([if get_projid exists],
1099 #include <linux/quota.h>
1101 struct dquot_operations ops = { };
1103 ops.get_projid(NULL, NULL);
1105 AC_DEFINE(HAVE_PROJECT_QUOTA, 1,
1106 [get_projid function exists])
1108 ]) # LC_HAVE_PROJECT_QUOTA
1112 # LC_HAVE_SECURITY_DENTRY_INIT_SECURITY
1114 # 3.10 introduced security_dentry_init_security()
1116 AC_DEFUN([LC_HAVE_SECURITY_DENTRY_INIT_SECURITY], [
1117 LB_CHECK_COMPILE([if 'security_dentry_init_security' is defined],
1118 security_dentry_init_security, [
1119 #include <linux/security.h>
1121 security_dentry_init_security(NULL, 0, NULL, NULL, NULL);
1123 AC_DEFINE(HAVE_SECURITY_DENTRY_INIT_SECURITY, 1,
1124 [security_dentry_init_security' is defined])
1126 ]) # LC_HAVE_SECURITY_DENTRY_INIT_SECURITY
1129 # 3.10 exports security_inode_listsecurity
1131 AC_DEFUN([LC_HAVE_SECURITY_INODE_LISTSECURITY], [
1132 LB_CHECK_COMPILE([if security_inode_listsecurity() is available/exported],
1133 security_inode_listsecurity, [
1134 #include <linux/security.h>
1136 security_inode_listsecurity(NULL, NULL, 0);
1138 AC_DEFINE(HAVE_SECURITY_INODE_LISTSECURITY, 1,
1139 [security_inode_listsecurity() is available/exported])
1141 ]) # LC_HAVE_SECURITY_INODE_LISTSECURITY
1144 # LC_INVALIDATE_RANGE
1146 # 3.11 invalidatepage requires the length of the range to invalidate
1148 AC_DEFUN([LC_INVALIDATE_RANGE], [
1149 LB_CHECK_COMPILE([if 'address_space_operations.invalidatepage' requires 3 arguments],
1150 address_space_ops_invalidatepage_3args, [
1151 #include <linux/fs.h>
1153 struct address_space_operations a_ops;
1154 a_ops.invalidatepage(NULL, 0, 0);
1156 AC_DEFINE(HAVE_INVALIDATE_RANGE, 1,
1157 [address_space_operations.invalidatepage needs 3 arguments])
1159 ]) # LC_INVALIDATE_RANGE
1162 # LC_HAVE_DIR_CONTEXT
1164 # 3.11 readdir now takes the new struct dir_context
1166 AC_DEFUN([LC_HAVE_DIR_CONTEXT], [
1167 LB_CHECK_COMPILE([if 'dir_context' exist],
1169 #include <linux/fs.h>
1171 #ifdef FMODE_KABI_ITERATE
1172 #error "back to use readdir in kabi_extand mode"
1174 struct dir_context ctx;
1179 AC_DEFINE(HAVE_DIR_CONTEXT, 1,
1180 [dir_context exist])
1182 ]) # LC_HAVE_DIR_CONTEXT
1185 # LC_D_COMPARE_5ARGS
1187 # 3.11 dentry_operations.d_compare() taken 5 arguments.
1189 AC_DEFUN([LC_D_COMPARE_5ARGS], [
1190 LB_CHECK_COMPILE([if 'd_compare' taken 5 arguments],
1192 #include <linux/dcache.h>
1194 ((struct dentry_operations*)0)->d_compare(NULL,NULL,0,NULL,NULL);
1196 AC_DEFINE(HAVE_D_COMPARE_5ARGS, 1,
1197 [d_compare need 5 arguments])
1199 ]) # LC_D_COMPARE_5ARGS
1204 # 3.11 need to access d_count to get dentry reference count
1206 AC_DEFUN([LC_HAVE_DCOUNT], [
1207 LB_CHECK_COMPILE([if 'd_count' exists],
1209 #include <linux/dcache.h>
1211 struct dentry de = { };
1214 count = d_count(&de);
1216 AC_DEFINE(HAVE_D_COUNT, 1,
1222 # LC_PID_NS_FOR_CHILDREN
1224 # 3.11 replaces pid_ns by pid_ns_for_children in struct nsproxy
1226 AC_DEFUN([LC_PID_NS_FOR_CHILDREN], [
1227 LB_CHECK_COMPILE([if 'struct nsproxy' has 'pid_ns_for_children'],
1228 pid_ns_for_children, [
1229 #include <linux/nsproxy.h>
1232 ns.pid_ns_for_children = NULL;
1234 AC_DEFINE(HAVE_PID_NS_FOR_CHILDREN, 1,
1235 ['struct nsproxy' has 'pid_ns_for_children'])
1237 ]) # LC_PID_NS_FOR_CHILDREN
1240 # LC_OLDSIZE_TRUNCATE_PAGECACHE
1242 # 3.12 truncate_pagecache without oldsize parameter
1244 AC_DEFUN([LC_OLDSIZE_TRUNCATE_PAGECACHE], [
1245 LB_CHECK_COMPILE([if 'truncate_pagecache' with 'old_size' parameter],
1246 truncate_pagecache_old_size, [
1247 #include <linux/mm.h>
1249 truncate_pagecache(NULL, 0, 0);
1251 AC_DEFINE(HAVE_OLDSIZE_TRUNCATE_PAGECACHE, 1,
1254 ]) # LC_OLDSIZE_TRUNCATE_PAGECACHE
1257 # LC_PTR_ERR_OR_ZERO
1259 # For some reason SLES11SP4 is missing the PTR_ERR_OR_ZERO macro
1260 # It was added to linux kernel 3.12
1262 AC_DEFUN([LC_PTR_ERR_OR_ZERO_MISSING], [
1263 LB_CHECK_COMPILE([if 'PTR_ERR_OR_ZERO' is missing],
1265 #include <linux/err.h>
1267 if (PTR_ERR_OR_ZERO(NULL)) return 0;
1269 AC_DEFINE(HAVE_PTR_ERR_OR_ZERO, 1,
1270 ['PTR_ERR_OR_ZERO' exist])
1272 ]) # LC_PTR_ERR_OR_ZERO_MISSING
1275 # LC_HAVE_DENTRY_D_U_D_ALIAS
1277 # 3.11 kernel moved d_alias to the union d_u in struct dentry
1279 # Some distros move d_alias to d_u but it is still a struct list
1281 AC_DEFUN([LC_HAVE_DENTRY_D_U_D_ALIAS], [
1282 AS_IF([test "x$lb_cv_compile_i_dentry_d_alias_list" = xyes], [
1283 LB_CHECK_COMPILE([if list 'dentry.d_u.d_alias' exist],
1285 #include <linux/list.h>
1286 #include <linux/dcache.h>
1289 INIT_LIST_HEAD(&de.d_u.d_alias);
1291 AC_DEFINE(HAVE_DENTRY_D_U_D_ALIAS, 1,
1292 [list dentry.d_u.d_alias exist])
1295 LB_CHECK_COMPILE([if hlist 'dentry.d_u.d_alias' exist],
1297 #include <linux/list.h>
1298 #include <linux/dcache.h>
1301 INIT_HLIST_NODE(&de.d_u.d_alias);
1303 AC_DEFINE(HAVE_DENTRY_D_U_D_ALIAS, 1,
1304 [hlist dentry.d_u.d_alias exist])
1307 ]) # LC_HAVE_DENTRY_D_U_D_ALIAS
1310 # LC_HAVE_DENTRY_D_CHILD
1312 # 3.11 kernel d_child has been moved out of the union d_u
1315 AC_DEFUN([LC_HAVE_DENTRY_D_CHILD], [
1316 LB_CHECK_COMPILE([if 'dentry.d_child' exist],
1318 #include <linux/list.h>
1319 #include <linux/dcache.h>
1322 INIT_LIST_HEAD(&de.d_child);
1324 AC_DEFINE(HAVE_DENTRY_D_CHILD, 1,
1325 [dentry.d_child exist])
1327 ]) # LC_HAVE_DENTRY_D_CHILD
1332 # 3.12 ki_left removed from struct kiocb
1334 AC_DEFUN([LC_KIOCB_KI_LEFT], [
1335 LB_CHECK_COMPILE([if 'struct kiocb' with 'ki_left' member],
1337 #include <linux/aio.h>
1339 ((struct kiocb*)0)->ki_left = 0;
1341 AC_DEFINE(HAVE_KIOCB_KI_LEFT, 1,
1344 ]) # LC_KIOCB_KI_LEFT
1347 # LC_INIT_LIST_HEAD_RCU
1349 # 3.12 added INIT_LIST_HEAD_RCU in commit 2a855b644c310d5db5
1350 # which is unfortunately an inline function and not a macro
1351 # that can be tested directly, so it needs a configure check.
1353 AC_DEFUN([LC_INIT_LIST_HEAD_RCU], [
1354 LB_CHECK_COMPILE([if 'INIT_LIST_HEAD_RCU' exists],
1355 init_list_head_rcu, [
1356 #include <linux/list.h>
1357 #include <linux/rculist.h>
1359 struct list_head list;
1360 INIT_LIST_HEAD_RCU(&list);
1362 AC_DEFINE(HAVE_INIT_LIST_HEAD_RCU, 1,
1363 [INIT_LIST_HEAD_RCU exists])
1365 ]) # LC_INIT_LIST_HEAD_RCU
1368 # LC_VFS_RENAME_5ARGS
1370 # 3.13 has vfs_rename with 5 args
1372 AC_DEFUN([LC_VFS_RENAME_5ARGS], [
1373 LB_CHECK_COMPILE([if Linux kernel has 'vfs_rename' with 5 args],
1375 #include <linux/fs.h>
1377 vfs_rename(NULL, NULL, NULL, NULL, NULL);
1379 AC_DEFINE(HAVE_VFS_RENAME_5ARGS, 1,
1380 [kernel has vfs_rename with 5 args])
1382 ]) # LC_VFS_RENAME_5ARGS
1385 # LC_VFS_UNLINK_3ARGS
1387 # 3.13 has vfs_unlink with 3 args
1389 AC_DEFUN([LC_VFS_UNLINK_3ARGS], [
1390 LB_CHECK_COMPILE([if Linux kernel has 'vfs_unlink' with 3 args],
1392 #include <linux/fs.h>
1394 vfs_unlink(NULL, NULL, NULL);
1396 AC_DEFINE(HAVE_VFS_UNLINK_3ARGS, 1,
1397 [kernel has vfs_unlink with 3 args])
1399 ]) # LC_VFS_UNLINK_3ARGS
1401 # LC_HAVE_D_IS_POSITIVE
1403 # Kernel version 3.13 b18825a7c8e37a7cf6abb97a12a6ad71af160de7
1404 # d_is_positive is added
1406 AC_DEFUN([LC_HAVE_D_IS_POSITIVE], [
1407 LB_CHECK_COMPILE([if 'd_is_positive' exist],
1409 #include <linux/dcache.h>
1411 d_is_positive(NULL);
1413 AC_DEFINE(HAVE_D_IS_POSITIVE, 1,
1414 ['d_is_positive' is available])
1416 ]) # LC_HAVE_D_IS_POSITIVE
1421 # 3.14 move some of its data in struct bio into the new
1424 AC_DEFUN([LC_HAVE_BVEC_ITER], [
1425 LB_CHECK_COMPILE([if Linux kernel has struct bvec_iter],
1427 #include <linux/bio.h>
1429 struct bvec_iter iter;
1431 iter.bi_bvec_done = 0;
1433 AC_DEFINE(HAVE_BVEC_ITER, 1,
1434 [kernel has struct bvec_iter])
1436 ]) # LC_HAVE_BVEC_ITER
1441 # 3.14 adds set_acl method to inode_operations
1442 # see kernel commit 893d46e443346370cd4ea81d9d35f72952c62a37
1444 AC_DEFUN([LC_IOP_SET_ACL], [
1445 LB_CHECK_COMPILE([if 'inode_operations' has '.set_acl' member function],
1446 inode_ops_set_acl, [
1447 #include <linux/fs.h>
1449 struct inode_operations iop;
1452 AC_DEFINE(HAVE_IOP_SET_ACL, 1,
1453 [inode_operations has .set_acl member function])
1458 # LC_HAVE_TRUNCATE_IPAGE_FINAL
1460 # 3.14 bring truncate_inode_pages_final for evict_inode
1462 AC_DEFUN([LC_HAVE_TRUNCATE_IPAGES_FINAL], [
1463 LB_CHECK_COMPILE([if Linux kernel has truncate_inode_pages_final],
1464 truncate_ipages_final, [
1465 #include <linux/mm.h>
1467 truncate_inode_pages_final(NULL);
1469 AC_DEFINE(HAVE_TRUNCATE_INODE_PAGES_FINAL, 1,
1470 [kernel has truncate_inode_pages_final])
1472 ]) # LC_HAVE_TRUNCATE_IPAGES_FINAL
1475 # LC_IOPS_RENAME_WITH_FLAGS
1477 # 3.14 has inode_operations->rename with 5 args
1478 # commit 520c8b16505236fc82daa352e6c5e73cd9870cff
1480 AC_DEFUN([LC_IOPS_RENAME_WITH_FLAGS], [
1481 LB_CHECK_COMPILE([if 'inode_operations->rename' taken flags as argument],
1482 iops_rename_with_flags, [
1483 #include <linux/fs.h>
1485 struct inode *i1 = NULL, *i2 = NULL;
1486 struct dentry *d1 = NULL, *d2 = NULL;
1488 rc = ((struct inode_operations *)0)->rename(i1, d1, i2, d2, 0);
1490 AC_DEFINE(HAVE_IOPS_RENAME_WITH_FLAGS, 1,
1491 [inode_operations->rename need flags as argument])
1493 ]) # LC_IOPS_RENAME_WITH_FLAGS
1496 # LC_VFS_RENAME_6ARGS
1498 # 3.15 has vfs_rename with 6 args
1500 AC_DEFUN([LC_VFS_RENAME_6ARGS], [
1501 LB_CHECK_COMPILE([if Linux kernel has 'vfs_rename' with 6 args],
1503 #include <linux/fs.h>
1505 vfs_rename(NULL, NULL, NULL, NULL, NULL, NULL);
1507 AC_DEFINE(HAVE_VFS_RENAME_6ARGS, 1,
1508 [kernel has vfs_rename with 6 args])
1510 ]) # LC_VFS_RENAME_6ARGS
1513 # LC_DIRECTIO_USE_ITER
1515 # 3.16 kernel changes direct IO to use iov_iter
1517 AC_DEFUN([LC_DIRECTIO_USE_ITER], [
1518 LB_CHECK_COMPILE([if direct IO uses iov_iter],
1520 #include <linux/fs.h>
1522 struct address_space_operations ops = { };
1523 struct iov_iter *iter = NULL;
1526 ops.direct_IO(0, NULL, iter, offset);
1528 AC_DEFINE(HAVE_DIRECTIO_ITER, 1,
1529 [direct IO uses iov_iter])
1531 ]) # LC_DIRECTIO_USE_ITER
1534 # LC_HAVE_IOV_ITER_INIT_DIRECTION
1537 # 3.16 linux commit 71d8e532b1549a478e6a6a8a44f309d050294d00
1538 # changed iov_iter_init api to start accepting a tag
1539 # that defines if its a read or write operation
1541 AC_DEFUN([LC_HAVE_IOV_ITER_INIT_DIRECTION], [
1542 tmp_flags="$EXTRA_KCFLAGS"
1543 EXTRA_KCFLAGS="-Werror"
1544 LB_CHECK_COMPILE([if 'iov_iter_init' takes a tag],
1546 #include <linux/uio.h>
1547 #include <linux/fs.h>
1549 const struct iovec *iov = NULL;
1551 iov_iter_init(NULL, READ, iov, 1, 0);
1553 AC_DEFINE(HAVE_IOV_ITER_INIT_DIRECTION, 1,
1554 [iov_iter_init handles directional tag])
1556 EXTRA_KCFLAGS="$tmp_flags"
1557 ]) # LC_HAVE_IOV_ITER_INIT_DIRECTION
1560 # LC_HAVE_IOV_ITER_TRUNCATE
1563 # 3.16 introduces a new API iov_iter_truncate()
1565 AC_DEFUN([LC_HAVE_IOV_ITER_TRUNCATE], [
1566 tmp_flags="$EXTRA_KCFLAGS"
1567 EXTRA_KCFLAGS="-Werror"
1568 LB_CHECK_COMPILE([if 'iov_iter_truncate' exists ],
1570 #include <linux/uio.h>
1571 #include <linux/fs.h>
1573 struct iov_iter *i = NULL;
1575 iov_iter_truncate(i, 0);
1577 AC_DEFINE(HAVE_IOV_ITER_TRUNCATE, 1, [iov_iter_truncate exists])
1579 EXTRA_KCFLAGS="$tmp_flags"
1580 ]) # LC_HAVE_IOV_ITER_TRUNCATE
1583 # LC_HAVE_FILE_OPERATIONS_READ_WRITE_ITER
1585 # 3.16 introduces [read|write]_iter to struct file_operations
1587 AC_DEFUN([LC_HAVE_FILE_OPERATIONS_READ_WRITE_ITER], [
1588 LB_CHECK_COMPILE([if 'file_operations.[read|write]_iter' exist],
1589 file_function_iter, [
1590 #include <linux/fs.h>
1592 ((struct file_operations *)NULL)->read_iter(NULL, NULL);
1593 ((struct file_operations *)NULL)->write_iter(NULL, NULL);
1595 AC_DEFINE(HAVE_FILE_OPERATIONS_READ_WRITE_ITER, 1,
1596 [file_operations.[read|write]_iter functions exist])
1598 ]) # LC_HAVE_FILE_OPERATIONS_READ_WRITE_ITER
1601 # LC_HAVE_INTERVAL_BLK_INTEGRITY
1603 # 3.17 replace sector_size with interval in struct blk_integrity
1605 AC_DEFUN([LC_HAVE_INTERVAL_BLK_INTEGRITY], [
1606 LB_CHECK_COMPILE([if 'blk_integrity.interval' exist],
1607 interval_blk_integrity, [
1608 #include <linux/blkdev.h>
1610 ((struct blk_integrity *)0)->interval = 0;
1612 AC_DEFINE(HAVE_INTERVAL_BLK_INTEGRITY, 1,
1613 [blk_integrity.interval exist])
1615 ]) # LC_HAVE_INTERVAL_BLK_INTEGRITY
1620 # 3.17 replaces key_type::match with match_preparse
1621 # and has new struct key_match_data
1623 AC_DEFUN([LC_KEY_MATCH_DATA], [
1624 LB_CHECK_COMPILE([if struct key_match field exist],
1626 #include <linux/key-type.h>
1628 struct key_match_data data;
1630 data.raw_data = NULL;
1632 AC_DEFINE(HAVE_KEY_MATCH_DATA, 1,
1633 [struct key_match_data exist])
1635 ]) # LC_KEY_MATCH_DATA
1638 # LC_NFS_FILLDIR_USE_CTX
1640 # 3.18 kernel moved from void cookie to struct dir_context
1642 AC_DEFUN([LC_NFS_FILLDIR_USE_CTX], [
1643 tmp_flags="$EXTRA_KCFLAGS"
1644 EXTRA_KCFLAGS="-Werror"
1645 LB_CHECK_COMPILE([if filldir_t uses struct dir_context],
1647 #include <linux/fs.h>
1649 int filldir(struct dir_context *ctx, const char* name,
1650 int i, loff_t off, u64 tmp, unsigned temp)
1655 struct dir_context ctx = {
1659 ctx.actor(NULL, "test", 0, (loff_t) 0, 0, 0);
1661 AC_DEFINE(HAVE_FILLDIR_USE_CTX, 1,
1662 [filldir_t needs struct dir_context as argument])
1664 EXTRA_KCFLAGS="$tmp_flags"
1665 ]) # LC_NFS_FILLDIR_USE_CTX
1668 # LC_PERCPU_COUNTER_INIT
1670 # 3.18 For kernels 3.18 and after percpu_counter_init starts
1671 # to pass a GFP_* memory allocation flag for internal
1672 # memory allocation purposes.
1674 AC_DEFUN([LC_PERCPU_COUNTER_INIT], [
1675 LB_CHECK_COMPILE([if percpu_counter_init uses GFP_* flag as argument],
1676 percpu_counter_init, [
1677 #include <linux/percpu_counter.h>
1679 percpu_counter_init(NULL, 0, GFP_KERNEL);
1681 AC_DEFINE(HAVE_PERCPU_COUNTER_INIT_GFP_FLAG, 1,
1682 [percpu_counter_init uses GFP_* flag])
1684 ]) # LC_PERCPU_COUNTER_INIT
1687 # LC_KIOCB_HAS_NBYTES
1689 # 3.19 kernel removed ki_nbytes from struct kiocb
1691 AC_DEFUN([LC_KIOCB_HAS_NBYTES], [
1692 LB_CHECK_COMPILE([if struct kiocb has ki_nbytes field],
1694 #include <linux/fs.h>
1696 struct kiocb iocb = { };
1700 AC_DEFINE(HAVE_KI_NBYTES, 1, [ki_nbytes field exist])
1702 ]) # LC_KIOCB_HAS_NBYTES
1705 # LC_HAVE_DQUOT_QC_DQBLK
1707 # 3.19 has quotactl_ops->[sg]et_dqblk that take struct kqid and qc_dqblk
1708 # Added in commit 14bf61ffe
1710 AC_DEFUN([LC_HAVE_DQUOT_QC_DQBLK], [
1711 tmp_flags="$EXTRA_KCFLAGS"
1712 EXTRA_KCFLAGS="-Werror"
1713 LB_CHECK_COMPILE([if 'quotactl_ops.set_dqblk' takes struct qc_dqblk],
1715 #include <linux/fs.h>
1716 #include <linux/quota.h>
1718 ((struct quotactl_ops *)0)->set_dqblk(NULL, *((struct kqid*)0), (struct qc_dqblk*)0);
1720 AC_DEFINE(HAVE_DQUOT_QC_DQBLK, 1,
1721 [quotactl_ops.set_dqblk takes struct qc_dqblk])
1722 AC_DEFINE(HAVE_DQUOT_KQID, 1,
1723 [quotactl_ops.set_dqblk takes struct kqid])
1725 EXTRA_KCFLAGS="$tmp_flags"
1726 ]) # LC_HAVE_DQUOT_QC_DQBLK
1729 # LC_BACKING_DEV_INFO_REMOVAL
1731 # 3.20 kernel removed backing_dev_info from address_space
1733 AC_DEFUN([LC_BACKING_DEV_INFO_REMOVAL], [
1734 LB_CHECK_COMPILE([if struct address_space has backing_dev_info],
1736 #include <linux/fs.h>
1738 struct address_space mapping;
1740 mapping.backing_dev_info = NULL;
1742 AC_DEFINE(HAVE_BACKING_DEV_INFO, 1, [backing_dev_info exist])
1744 ]) # LC_BACKING_DEV_INFO_REMOVAL
1747 # LC_HAVE_BDI_CAP_MAP_COPY
1749 # 3.20 removed mmap handling for backing devices since
1750 # it breaks on non-MMU systems. See kernel commit
1751 # b4caecd48005fbed3949dde6c1cb233142fd69e9
1753 AC_DEFUN([LC_HAVE_BDI_CAP_MAP_COPY], [
1754 LB_CHECK_COMPILE([if have 'BDI_CAP_MAP_COPY'],
1756 #include <linux/backing-dev.h>
1758 struct backing_dev_info info;
1760 info.capabilities = BDI_CAP_MAP_COPY;
1762 AC_DEFINE(HAVE_BDI_CAP_MAP_COPY, 1,
1763 [BDI_CAP_MAP_COPY exist])
1765 ]) # LC_HAVE_BDI_CAP_MAP_COPY
1770 # 4.1 kernel has iov_iter_rw
1772 AC_DEFUN([LC_IOV_ITER_RW], [
1773 LB_CHECK_COMPILE([if iov_iter_rw exist],
1775 #include <linux/fs.h>
1776 #include <linux/uio.h>
1778 struct iov_iter *iter = NULL;
1782 AC_DEFINE(HAVE_IOV_ITER_RW, 1,
1783 [iov_iter_rw exist])
1788 # LC_HAVE_SYNC_READ_WRITE
1790 # 4.1 new_sync_[read|write] no longer exported
1792 AC_DEFUN([LC_HAVE_SYNC_READ_WRITE], [
1793 LB_CHECK_EXPORT([new_sync_read], [fs/read_write.c],
1794 [AC_DEFINE(HAVE_SYNC_READ_WRITE, 1,
1795 [new_sync_[read|write] is exported by the kernel])])
1796 ]) # LC_HAVE_SYNC_READ_WRITE
1801 # 4.1 redefined bi_cnt as __bi_cnt in commit dac56212e8127dbc0
1803 AC_DEFUN([LC_HAVE___BI_CNT], [
1804 LB_CHECK_COMPILE([if Linux kernel has __bi_cnt in struct bio],
1806 #include <asm/atomic.h>
1807 #include <linux/bio.h>
1808 #include <linux/blk_types.h>
1810 struct bio bio = { };
1812 cnt = atomic_read(&bio.__bi_cnt);
1814 AC_DEFINE(HAVE___BI_CNT, 1,
1815 [struct bio has __bi_cnt])
1817 ]) # LC_HAVE___BI_CNT
1820 # LC_SYMLINK_OPS_USE_NAMEIDATA
1822 # For the 4.2+ kernels the file system internal symlink api no
1823 # longer uses struct nameidata as a argument
1825 AC_DEFUN([LC_SYMLINK_OPS_USE_NAMEIDATA], [
1826 LB_CHECK_COMPILE([if symlink inode operations have struct nameidata argument],
1827 symlink_use_nameidata, [
1828 #include <linux/namei.h>
1829 #include <linux/fs.h>
1831 struct nameidata *nd = NULL;
1833 ((struct inode_operations *)0)->follow_link(NULL, nd);
1834 ((struct inode_operations *)0)->put_link(NULL, nd, NULL);
1836 AC_DEFINE(HAVE_SYMLINK_OPS_USE_NAMEIDATA, 1,
1837 [symlink inode operations need struct nameidata argument])
1839 ]) # LC_SYMLINK_OPS_USE_NAMEIDATA
1842 # LC_BIO_ENDIO_USES_ONE_ARG
1844 # 4.2 kernel bio_endio now only takes one argument
1846 AC_DEFUN([LC_BIO_ENDIO_USES_ONE_ARG], [
1847 LB_CHECK_COMPILE([if 'bio_endio' with one argument exist],
1849 #include <linux/bio.h>
1853 AC_DEFINE(HAVE_BIO_ENDIO_USES_ONE_ARG, 1,
1854 [bio_endio takes only one argument])
1856 ]) # LC_BIO_ENDIO_USES_ONE_ARG
1859 # LC_ACCOUNT_PAGE_DIRTIED_3ARGS
1861 # 4.2 [to 4.5] kernel page dirtied takes 3 arguments
1863 AC_DEFUN([LC_ACCOUNT_PAGE_DIRTIED_3ARGS], [
1864 LB_CHECK_COMPILE([if 'account_page_dirtied' with 3 args exists],
1865 account_page_dirtied, [
1866 #include <linux/mm.h>
1868 account_page_dirtied(NULL, NULL, NULL);
1870 AC_DEFINE(HAVE_ACCOUNT_PAGE_DIRTIED_3ARGS, 1,
1871 [account_page_dirtied takes three arguments])
1873 ]) # LC_ACCOUNT_PAGE_DIRTIED_3ARGS
1876 # LC_HAVE_INTERVAL_EXP_BLK_INTEGRITY
1878 # 4.3 replace interval with interval_exp in 'struct blk_integrity'
1879 # 'struct blk_integrity_profile' is also added in this version,
1880 # thus use this to determine whether 'struct blk_integrity' has profile
1882 AC_DEFUN([LC_HAVE_INTERVAL_EXP_BLK_INTEGRITY], [
1883 LB_CHECK_COMPILE([if 'blk_integrity.interval_exp' exist],
1884 blk_integrity_interval_exp, [
1885 #include <linux/blkdev.h>
1887 ((struct blk_integrity *)0)->interval_exp = 0;
1889 AC_DEFINE(HAVE_INTERVAL_EXP_BLK_INTEGRITY, 1,
1890 [blk_integrity.interval_exp exist])
1892 ]) # LC_HAVE_INTERVAL_EXP_BLK_INTEGRITY
1895 # LC_HAVE_LOOP_CTL_GET_FREE
1897 # 4.x kernel have moved userspace APIs to
1898 # the separate directory and all of them
1899 # support LOOP_CTL_GET_FREE
1901 AC_DEFUN([LC_HAVE_LOOP_CTL_GET_FREE], [
1902 LB_CHECK_FILE([$LINUX/include/linux/loop.h], [
1903 LB_CHECK_COMPILE([if have 'HAVE_LOOP_CTL_GET_FREE'],
1904 LOOP_CTL_GET_FREE, [
1905 #include <linux/loop.h>
1909 i = LOOP_CTL_GET_FREE;
1911 AC_DEFINE(HAVE_LOOP_CTL_GET_FREE, 1,
1912 [LOOP_CTL_GET_FREE exist])
1915 AC_DEFINE(HAVE_LOOP_CTL_GET_FREE, 1,
1916 [kernel has LOOP_CTL_GET_FREE])
1918 ]) # LC_HAVE_LOOP_CTL_GET_FREE
1921 # LC_HAVE_CACHE_HEAD_HLIST
1923 # 4.3 kernel swiched to hlist for cache_head
1925 AC_DEFUN([LC_HAVE_CACHE_HEAD_HLIST], [
1926 LB_CHECK_COMPILE([if 'struct cache_head' has 'cache_list' field],
1927 cache_head_has_hlist, [
1928 #include <linux/sunrpc/cache.h>
1930 do {} while(sizeof(((struct cache_head *)0)->cache_list));
1932 AC_DEFINE(HAVE_CACHE_HEAD_HLIST, 1,
1933 [cache_head has hlist cache_list])
1935 ]) # LC_HAVE_CACHE_HEAD_HLIST
1938 # LC_HAVE_XATTR_HANDLER_SIMPLIFIED
1940 # Kernel version 4.3 commit e409de992e3ea3674393465f07cc71c948edd87a
1941 # simplified xattr_handler handling by passing in the handler pointer
1943 AC_DEFUN([LC_HAVE_XATTR_HANDLER_SIMPLIFIED], [
1944 tmp_flags="$EXTRA_KCFLAGS"
1945 EXTRA_KCFLAGS="-Werror"
1946 LB_CHECK_COMPILE([if 'struct xattr_handler' functions pass in handler pointer],
1947 xattr_handler_simplified, [
1948 #include <linux/xattr.h>
1950 struct xattr_handler handler;
1952 ((struct xattr_handler *)0)->get(&handler, NULL, NULL, NULL, 0);
1953 ((struct xattr_handler *)0)->set(&handler, NULL, NULL, NULL, 0, 0);
1955 AC_DEFINE(HAVE_XATTR_HANDLER_SIMPLIFIED, 1, [handler pointer is parameter])
1957 EXTRA_KCFLAGS="$tmp_flags"
1958 ]) # LC_HAVE_XATTR_HANDLER_SIMPLIFIED
1961 # LC_HAVE_BIP_ITER_BIO_INTEGRITY_PAYLOAD
1963 # 4.3 replace interval with interval_exp in 'struct blk_integrity'.
1965 AC_DEFUN([LC_HAVE_BIP_ITER_BIO_INTEGRITY_PAYLOAD], [
1966 LB_CHECK_COMPILE([if 'bio_integrity_payload.bip_iter' exist],
1967 bio_integrity_payload_bip_iter, [
1968 #include <linux/bio.h>
1970 ((struct bio_integrity_payload *)0)->bip_iter.bi_size = 0;
1972 AC_DEFINE(HAVE_BIP_ITER_BIO_INTEGRITY_PAYLOAD, 1,
1973 [bio_integrity_payload.bip_iter exist])
1975 ]) # LC_HAVE_BIP_ITER_BIO_INTEGRITY_PAYLOAD
1978 # LC_BIO_INTEGRITY_PREP_FN
1980 # Lustre kernel patch extents bio_integrity_prep to accept optional
1981 # generate/verify_fn as extra args.
1983 AC_DEFUN([LC_BIO_INTEGRITY_PREP_FN], [
1984 LB_CHECK_COMPILE([if 'bio_integrity_prep_fn' exists],
1985 bio_integrity_prep_fn, [
1986 #include <linux/bio.h>
1988 bio_integrity_prep_fn(NULL, NULL, NULL);
1990 AC_DEFINE(HAVE_BIO_INTEGRITY_PREP_FN, 1,
1991 [kernel has bio_integrity_prep_fn])
1992 AC_SUBST(PATCHED_INTEGRITY_INTF)
1994 AC_SUBST(PATCHED_INTEGRITY_INTF, [#])
1996 ]) # LC_BIO_INTEGRITY_PREP_FN
2001 # 4.4/4.8 redefined bi_rw as bi_opf (SLES12/kernel commit 4382e33ad37486)
2003 AC_DEFUN([LC_HAVE_BI_OPF], [
2004 LB_CHECK_COMPILE([if Linux kernel has bi_opf in struct bio],
2006 #include <linux/bio.h>
2012 AC_DEFINE(HAVE_BI_OPF, 1,
2013 [struct bio has bi_opf])
2018 # LC_HAVE_SUBMIT_BIO_2ARGS
2020 # 4.4 removed an argument from submit_bio
2022 AC_DEFUN([LC_HAVE_SUBMIT_BIO_2ARGS], [
2023 LB_CHECK_COMPILE([if submit_bio takes two arguments],
2024 have_submit_bio_2args, [
2025 #include <linux/bio.h>
2028 submit_bio(READ, &bio);
2030 AC_DEFINE(HAVE_SUBMIT_BIO_2ARGS, 1,
2031 [submit_bio takes two arguments])
2033 ]) # LC_HAVE_SUBMIT_BIO_2_ARGS
2036 # LC_HAVE_CLEAN_BDEV_ALIASES
2038 # 4.4/4.9 unmap_underlying_metadata was replaced by clean_bdev_aliases
2039 # (SLES12/kernel commit 29f3ad7d8380364c)
2041 AC_DEFUN([LC_HAVE_CLEAN_BDEV_ALIASES], [
2042 LB_CHECK_COMPILE([if kernel has clean_bdev_aliases],
2043 have_clean_bdev_aliases, [
2044 #include <linux/buffer_head.h>
2046 struct block_device bdev;
2047 clean_bdev_aliases(&bdev,1,1);
2049 AC_DEFINE(HAVE_CLEAN_BDEV_ALIASES, 1,
2050 [kernel has clean_bdev_aliases])
2052 ]) # LC_HAVE_CLEAN_BDEV_ALIASES
2055 # LC_HAVE_LOCKS_LOCK_FILE_WAIT
2057 # 4.4 kernel have moved locks API users to
2058 # locks_lock_inode_wait()
2060 AC_DEFUN([LC_HAVE_LOCKS_LOCK_FILE_WAIT], [
2061 LB_CHECK_COMPILE([if 'locks_lock_file_wait' exists],
2062 locks_lock_file_wait, [
2063 #include <linux/fs.h>
2065 locks_lock_file_wait(NULL, NULL);
2067 AC_DEFINE(HAVE_LOCKS_LOCK_FILE_WAIT, 1,
2068 [kernel has locks_lock_file_wait])
2070 ]) # LC_HAVE_LOCKS_LOCK_FILE_WAIT
2073 # LC_HAVE_KEY_PAYLOAD_DATA_ARRAY
2075 # 4.4 kernel merged type-specific data with the payload data for keys
2077 AC_DEFUN([LC_HAVE_KEY_PAYLOAD_DATA_ARRAY], [
2078 LB_CHECK_COMPILE([if 'struct key' has 'payload.data' as an array],
2079 key_payload_data_array, [
2080 #include <linux/key.h>
2082 struct key key = { };
2084 key.payload.data[0] = NULL;
2086 AC_DEFINE(HAVE_KEY_PAYLOAD_DATA_ARRAY, 1, [payload.data is an array])
2088 ]) #LC_HAVE_KEY_PAYLOAD_DATA_ARRAY
2091 # LC_HAVE_XATTR_HANDLER_NAME
2093 # Kernel version 4.4 commit 98e9cb5711c68223f0e4d5201b9a6add255ec550
2094 # add a name member to struct xattr_handler
2096 AC_DEFUN([LC_HAVE_XATTR_HANDLER_NAME], [
2097 tmp_flags="$EXTRA_KCFLAGS"
2098 EXTRA_KCFLAGS="-Werror"
2099 LB_CHECK_COMPILE([if 'struct xattr_handler' has a name member],
2100 xattr_handler_name, [
2101 #include <linux/xattr.h>
2103 ((struct xattr_handler *)NULL)->name = NULL;
2105 AC_DEFINE(HAVE_XATTR_HANDLER_NAME, 1, [xattr_handler has a name member])
2107 EXTRA_KCFLAGS="$tmp_flags"
2108 ]) # LC_HAVE_XATTR_HANDLER_NAME
2111 # LC_HAVE_FILE_DENTRY
2113 # 4.5 adds wrapper file_dentry
2115 AC_DEFUN([LC_HAVE_FILE_DENTRY], [
2116 LB_CHECK_COMPILE([if Linux kernel has 'file_dentry'],
2118 #include <linux/fs.h>
2122 AC_DEFINE(HAVE_FILE_DENTRY, 1,
2123 [kernel has file_dentry])
2125 ]) # LC_HAVE_FILE_DENTRY
2128 # LC_HAVE_INODE_LOCK
2130 # 4.5 introduced inode_lock
2132 AC_DEFUN([LC_HAVE_INODE_LOCK], [
2133 LB_CHECK_COMPILE([if 'inode_lock' is defined],
2135 #include <linux/fs.h>
2139 AC_DEFINE(HAVE_INODE_LOCK, 1,
2140 [inode_lock is defined])
2142 ]) # LC_HAVE_INODE_LOCK
2145 # LC_HAVE_IOP_GET_LINK
2147 # 4.5 vfs replaced iop->follow_link with
2150 AC_DEFUN([LC_HAVE_IOP_GET_LINK], [
2151 LB_CHECK_COMPILE([if 'iop' has 'get_link'],
2152 inode_ops_get_link, [
2153 #include <linux/fs.h>
2155 struct inode_operations iop;
2156 iop.get_link = NULL;
2158 AC_DEFINE(HAVE_IOP_GET_LINK, 1,
2159 [have iop get_link])
2161 ]) # LC_HAVE_IOP_GET_LINK
2164 # LC_HAVE_IN_COMPAT_SYSCALL
2166 # 4.6 renamed is_compat_task to in_compat_syscall
2168 AC_DEFUN([LC_HAVE_IN_COMPAT_SYSCALL], [
2169 LB_CHECK_COMPILE([if 'in_compat_syscall' is defined],
2170 in_compat_syscall, [
2171 #include <linux/compat.h>
2173 in_compat_syscall();
2175 AC_DEFINE(HAVE_IN_COMPAT_SYSCALL, 1,
2176 [have in_compat_syscall])
2178 ]) # LC_HAVE_IN_COMPAT_SYSCALL
2181 # LC_HAVE_XATTR_HANDLER_INODE_PARAM
2183 # Kernel version 4.6 commit b296821a7c42fa58baa17513b2b7b30ae66f3336
2184 # and commit 5930122683dff58f0846b0f0405b4bd598a3ba6a added inode parameter
2185 # to xattr_handler functions
2187 AC_DEFUN([LC_HAVE_XATTR_HANDLER_INODE_PARAM], [
2188 tmp_flags="$EXTRA_KCFLAGS"
2189 EXTRA_KCFLAGS="-Werror"
2190 LB_CHECK_COMPILE([if 'struct xattr_handler' functions have inode parameter],
2191 xattr_handler_inode_param, [
2192 #include <linux/xattr.h>
2194 const struct xattr_handler handler;
2196 ((struct xattr_handler *)0)->get(&handler, NULL, NULL, NULL, NULL, 0);
2197 ((struct xattr_handler *)0)->set(&handler, NULL, NULL, NULL, NULL, 0, 0);
2199 AC_DEFINE(HAVE_XATTR_HANDLER_INODE_PARAM, 1, [needs inode parameter])
2201 EXTRA_KCFLAGS="$tmp_flags"
2202 ]) # LC_HAVE_XATTR_HANDLER_INODE_PARAM
2207 # Kernel version 4.6 commit 85c7f81041d57cfe9dc97f4680d5586b54534a39
2208 # introduced parallel lookups in the VFS layer. The inline function
2209 # d_in_lookup was added to notify when the same item was being queried
2212 AC_DEFUN([LC_D_IN_LOOKUP], [
2213 tmp_flags="$EXTRA_KCFLAGS"
2214 EXTRA_KCFLAGS="-Werror"
2215 LB_CHECK_COMPILE([if 'd_in_lookup' is defined],
2217 #include <linux/dcache.h>
2221 AC_DEFINE(HAVE_D_IN_LOOKUP, 1, [d_in_lookup is defined])
2223 EXTRA_KCFLAGS="$tmp_flags"
2227 # LC_LOCK_PAGE_MEMCG
2229 # Kernel version 4.6 adds lock_page_memcg
2231 AC_DEFUN([LC_LOCK_PAGE_MEMCG], [
2232 LB_CHECK_COMPILE([if 'lock_page_memcg' is defined],
2234 #include <linux/memcontrol.h>
2236 lock_page_memcg(NULL);
2238 AC_DEFINE(HAVE_LOCK_PAGE_MEMCG, 1,
2239 [lock_page_memcg is defined])
2241 ]) # LC_LOCK_PAGE_MEMCG
2246 # Kernel version 4.7 commit c8b8e32d700fe943a935e435ae251364d016c497
2247 # direct-io: eliminate the offset argument to ->direct_IO
2249 AC_DEFUN([LC_DIRECTIO_2ARGS], [
2250 LB_CHECK_COMPILE([if '->direct_IO()' taken 2 arguments],
2252 #include <linux/fs.h>
2254 struct address_space_operations ops = { };
2255 struct iov_iter *iter = NULL;
2256 struct kiocb *iocb = NULL;
2259 rc = ops.direct_IO(iocb, iter);
2261 AC_DEFINE(HAVE_DIRECTIO_2ARGS, 1,
2262 [direct_IO need 2 arguments])
2264 ]) # LC_DIRECTIO_2ARGS
2267 # LC_GENERIC_WRITE_SYNC_2ARGS
2269 # Kernel version 4.7 commit dde0c2e79848298cc25621ad080d47f94dbd7cce
2270 # fs: add IOCB_SYNC and IOCB_DSYNC
2272 AC_DEFUN([LC_GENERIC_WRITE_SYNC_2ARGS], [
2273 LB_CHECK_COMPILE([if 'generic_write_sync()' taken 2 arguments],
2274 generic_write_sync_2args, [
2275 #include <linux/fs.h>
2277 struct kiocb *iocb = NULL;
2280 rc = generic_write_sync(iocb, 0);
2282 AC_DEFINE(HAVE_GENERIC_WRITE_SYNC_2ARGS, 1,
2283 [generic_write_sync need 2 arguments])
2285 ]) # LC_GENERIC_WRITE_SYNC_2ARGS
2288 # LC_FOP_ITERATE_SHARED
2290 # Kernel v4.6-rc3-29-g6192269 adds iterate_shared method to file_operations
2292 AC_DEFUN([LC_FOP_ITERATE_SHARED], [
2293 LB_CHECK_COMPILE([if 'file_operations' has 'iterate_shared'],
2294 fop_iterate_shared, [
2295 #include <linux/fs.h>
2297 struct file_operations fop;
2298 fop.iterate_shared = NULL;
2300 AC_DEFINE(HAVE_FOP_ITERATE_SHARED, 1,
2301 [file_operations has iterate_shared])
2303 ]) # LC_FOP_ITERATE_SHARED
2306 # LC_HAVE_POSIX_ACL_VALID_USER_NS
2308 # 4.8 posix_acl_valid takes struct user_namespace
2310 AC_DEFUN([LC_HAVE_POSIX_ACL_VALID_USER_NS], [
2311 LB_CHECK_COMPILE([if 'posix_acl_valid' takes 'struct user_namespace'],
2313 #include <linux/fs.h>
2314 #include <linux/posix_acl.h>
2316 posix_acl_valid((struct user_namespace*)NULL, (const struct posix_acl*)NULL);
2318 AC_DEFINE(HAVE_POSIX_ACL_VALID_USER_NS, 1,
2319 [posix_acl_valid takes struct user_namespace])
2321 ]) # LC_HAVE_POSIX_ACL_VALID_USER_NS
2324 # LC_D_COMPARE_4ARGS
2326 # Kernel version 4.8 commit 6fa67e707559303e086303aeecc9e8b91ef497d5
2327 # get rid of 'parent' argument of ->d_compare()
2329 AC_DEFUN([LC_D_COMPARE_4ARGS], [
2330 LB_CHECK_COMPILE([if 'd_compare' taken 4 arguments],
2332 #include <linux/dcache.h>
2334 ((struct dentry_operations*)0)->d_compare(NULL,0,NULL,NULL);
2336 AC_DEFINE(HAVE_D_COMPARE_4ARGS, 1,
2337 [d_compare need 4 arguments])
2339 ]) # LC_D_COMPARE_4ARGS
2342 # LC_FULL_NAME_HASH_3ARGS
2344 # Kernel version 4.8 commit 8387ff2577eb9ed245df9a39947f66976c6bcd02
2345 # vfs: make the string hashes salt the hash
2347 AC_DEFUN([LC_FULL_NAME_HASH_3ARGS], [
2348 LB_CHECK_COMPILE([if 'full_name_hash' taken 3 arguments],
2349 full_name_hash_3args, [
2350 #include <linux/stringhash.h>
2353 hash = full_name_hash(NULL,NULL,0);
2355 AC_DEFINE(HAVE_FULL_NAME_HASH_3ARGS, 1,
2356 [full_name_hash need 3 arguments])
2358 ]) # LC_FULL_NAME_HASH_3ARGS
2361 # LC_STRUCT_POSIX_ACL_XATTR
2363 # Kernel version 4.8 commit 2211d5ba5c6c4e972ba6dbc912b2897425ea6621
2364 # posix_acl: xattr representation cleanups
2366 AC_DEFUN([LC_STRUCT_POSIX_ACL_XATTR], [
2367 LB_CHECK_COMPILE([if 'struct posix_acl_xattr_{header,entry}' defined],
2368 struct_posix_acl_xattr, [
2369 #include <linux/fs.h>
2370 #include <linux/posix_acl_xattr.h>
2372 struct posix_acl_xattr_header *h = NULL;
2373 struct posix_acl_xattr_entry *e;
2374 e = (void *)(h + 1);
2376 AC_DEFINE(HAVE_STRUCT_POSIX_ACL_XATTR, 1,
2377 [struct posix_acl_xattr_{header,entry} defined])
2379 ]) # LC_STRUCT_POSIX_ACL_XATTR
2384 # Kernel version 4.8 commit fd50ecaddf8372a1d96e0daeaac0f93cf04e4d42
2385 # removed {get,set,remove}xattr inode operations
2387 AC_DEFUN([LC_IOP_XATTR], [
2388 LB_CHECK_COMPILE([if 'inode_operations' has {get,set,remove}xattr members],
2390 #include <linux/fs.h>
2392 struct inode_operations iop;
2393 iop.setxattr = NULL;
2394 iop.getxattr = NULL;
2395 iop.removexattr = NULL;
2397 AC_DEFINE(HAVE_IOP_XATTR, 1,
2398 [inode_operations has {get,set,remove}xattr members])
2405 # Kernel version 4.9 commit 81243eacfa400f5f7b89f4c2323d0de9982bb0fb
2406 # cred: simpler, 1D supplementary groups
2408 AC_DEFUN([LC_GROUP_INFO_GID], [
2409 LB_CHECK_COMPILE([if 'struct group_info' has member 'gid'],
2411 #include <linux/cred.h>
2414 p = ((struct group_info *)0)->gid;
2416 AC_DEFINE(HAVE_GROUP_INFO_GID, 1,
2417 [struct group_info has member gid])
2419 ]) # LC_GROUP_INFO_GID
2424 # Kernel version 4.9 commit 5d6c31910bc0713e37628dc0ce677dcb13c8ccf4
2425 # added __vfs_{get,set,remove}xattr helpers
2427 AC_DEFUN([LC_VFS_SETXATTR], [
2428 LB_CHECK_COMPILE([if '__vfs_setxattr' helper is available],
2430 #include <linux/xattr.h>
2432 __vfs_setxattr(NULL, NULL, NULL, NULL, 0, 0);
2434 AC_DEFINE(HAVE_VFS_SETXATTR, 1,
2435 ['__vfs_setxattr is available])
2437 ]) # LC_VFS_SETXATTR
2440 # LC_POSIX_ACL_UPDATE_MODE
2442 # Kernel version 4.9 commit 073931017b49d9458aa351605b43a7e34598caef
2443 # posix_acl: Clear SGID bit when setting file permissions
2445 AC_DEFUN([LC_POSIX_ACL_UPDATE_MODE], [
2446 LB_CHECK_COMPILE([if 'posix_acl_update_mode' exists],
2447 posix_acl_update_mode, [
2448 #include <linux/fs.h>
2449 #include <linux/posix_acl.h>
2451 posix_acl_update_mode(NULL, NULL, NULL);
2453 AC_DEFINE(HAVE_POSIX_ACL_UPDATE_MODE, 1,
2454 ['posix_acl_update_mode' is available])
2456 ]) # LC_POSIX_ACL_UPDATE_MODE
2459 # LC_IOP_GENERIC_READLINK
2461 # Kernel version 4.10 commit dfeef68862edd7d4bafe68ef7aeb5f658ef24bb5
2462 # removed generic_readlink from individual file systems
2464 AC_DEFUN([LC_IOP_GENERIC_READLINK], [
2465 LB_CHECK_COMPILE([if 'generic_readlink' still exist],
2466 inode_ops_readlink, [
2467 #include <linux/fs.h>
2469 struct inode_operations iop;
2470 iop.readlink = generic_readlink;
2472 AC_DEFINE(HAVE_IOP_GENERIC_READLINK, 1,
2473 [generic_readlink has been removed])
2475 ]) # LC_IOP_GENERIC_READLINK
2478 # LC_HAVE_VM_FAULT_ADDRESS
2480 # Kernel version 4.10 commit 1a29d85eb0f19b7d8271923d8917d7b4f5540b3e
2481 # removed virtual_address field. Need to use address field instead
2483 AC_DEFUN([LC_HAVE_VM_FAULT_ADDRESS], [
2484 LB_CHECK_COMPILE([if 'struct vm_fault' replaced virtual_address with address field],
2486 #include <linux/mm.h>
2488 struct vm_fault vmf;
2491 AC_DEFINE(HAVE_VM_FAULT_ADDRESS, 1,
2492 [virtual_address has been replaced by address field])
2494 ]) # LC_HAVE_VM_FAULT_ADDRESS
2497 # LC_INODEOPS_ENHANCED_GETATTR
2499 # Kernel version 4.11 commit a528d35e8bfcc521d7cb70aaf03e1bd296c8493f
2500 # expanded getattr to be able to get more stat information.
2502 AC_DEFUN([LC_INODEOPS_ENHANCED_GETATTR], [
2503 LB_CHECK_COMPILE([if 'inode_operations' getattr member can gather advance stats],
2505 #include <linux/fs.h>
2509 ((struct inode_operations *)1)->getattr(&path, NULL, 0, 0);
2511 AC_DEFINE(HAVE_INODEOPS_ENHANCED_GETATTR, 1,
2512 [inode_operations .getattr member function can gather advance stats])
2514 ]) # LC_INODEOPS_ENHANCED_GETATTR
2517 # LC_VM_OPERATIONS_REMOVE_VMF_ARG
2519 # Kernel version 4.11 commit 11bac80004499ea59f361ef2a5516c84b6eab675
2520 # removed struct vm_area_struct as an argument for vm_operations since
2521 # in the same kernel version struct vma_area_struct was folded into
2524 AC_DEFUN([LC_VM_OPERATIONS_REMOVE_VMF_ARG], [
2525 LB_CHECK_COMPILE([if 'struct vm_operations' removed struct vm_area_struct],
2526 vm_operations_no_vm_area_struct, [
2527 #include <linux/mm.h>
2529 struct vm_fault vmf;
2531 ((struct vm_operations_struct *)0)->fault(&vmf);
2532 ((struct vm_operations_struct *)0)->page_mkwrite(&vmf);
2534 AC_DEFINE(HAVE_VM_OPS_USE_VM_FAULT_ONLY, 1,
2535 ['struct vm_operations' remove struct vm_area_struct argument])
2537 ]) # LC_VM_OPERATIONS_REMOVE_VMF_ARG
2540 # LC_HAVE_KEY_USAGE_REFCOUNT
2542 # Kernel version 4.11 commit fff292914d3a2f1efd05ca71c2ba72a3c663201e
2543 # converted key.usage from atomic_t to refcount_t.
2545 AC_DEFUN([LC_HAVE_KEY_USAGE_REFCOUNT], [
2546 LB_CHECK_COMPILE([if 'key.usage' is refcount_t],
2547 key_usage_refcount, [
2548 #include <linux/key.h>
2550 struct key key = { };
2552 refcount_read(&key.usage);
2554 AC_DEFINE(HAVE_KEY_USAGE_REFCOUNT, 1, [key.usage is of type refcount_t])
2556 ]) #LC_HAVE_KEY_USAGE_REFCOUNT
2559 # LC_HAVE_CRYPTO_MAX_ALG_NAME_128
2561 # Kernel version 4.11 commit f437a3f477cce402dbec6537b29e9e33962c9f73
2562 # switched CRYPTO_MAX_ALG_NAME from 64 to 128.
2564 AC_DEFUN([LC_HAVE_CRYPTO_MAX_ALG_NAME_128], [
2565 LB_CHECK_COMPILE([if 'CRYPTO_MAX_ALG_NAME' is 128],
2566 crypto_max_alg_name, [
2567 #include <linux/crypto.h>
2569 #if CRYPTO_MAX_ALG_NAME != 128
2573 AC_DEFINE(HAVE_CRYPTO_MAX_ALG_NAME_128, 1,
2574 ['CRYPTO_MAX_ALG_NAME' is 128])
2576 ]) # LC_HAVE_CRYPTO_MAX_ALG_NAME_128
2579 # Kernel version 4.12 commit 47f38c539e9a42344ff5a664942075bd4df93876
2580 # CURRENT_TIME is not 64 bit time safe so it was replaced with
2583 AC_DEFUN([LC_CURRENT_TIME], [
2584 LB_CHECK_COMPILE([if CURRENT_TIME has been replaced with current_time],
2586 #include <linux/fs.h>
2590 attr.ia_atime = current_time(NULL);
2592 AC_DEFINE(HAVE_CURRENT_TIME, 1,
2593 [current_time() has replaced CURRENT_TIME])
2595 ]) # LIBCFS_CURRENT_TIME
2598 # Kernel version 4.12-rc3 85787090a21eb749d8b347eaf9ff1a455637473c
2599 # changed struct super_block s_uuid into a proper uuid_t
2601 AC_DEFUN([LC_SUPER_BLOCK_S_UUID], [
2602 LB_CHECK_COMPILE([if 'struct super_block' s_uuid is uuid_t],
2603 super_block_s_uuid, [
2604 #include <linux/fs.h>
2606 struct super_block sb;
2608 uuid_parse(NULL, &sb.s_uuid);
2610 AC_DEFINE(HAVE_S_UUID_AS_UUID_T, 1, ['s_uuid' is an uuid_t])
2612 ]) # LC_SUPER_BLOCK_S_UUID
2615 # LC_SUPER_SETUP_BDI_NAME
2617 # Kernel version 4.12 commit 9594caf216dc0fe3e318b34af0127276db661241
2618 # unified bdi handling
2620 AC_DEFUN([LC_SUPER_SETUP_BDI_NAME], [
2621 LB_CHECK_COMPILE([if 'super_setup_bdi_name' exist],
2622 super_setup_bdi_name, [
2623 #include <linux/fs.h>
2625 super_setup_bdi_name(NULL, "lustre");
2627 AC_DEFINE(HAVE_SUPER_SETUP_BDI_NAME, 1,
2628 ['super_setup_bdi_name' is available])
2630 ]) # LC_SUPER_SETUP_BDI_NAME
2635 # 4.12 replace bi_error to bi_status
2637 AC_DEFUN([LC_BI_STATUS], [
2638 LB_CHECK_COMPILE([if 'bi_status' exist],
2640 #include <linux/blk_types.h>
2642 ((struct bio *)0)->bi_status = 0;
2644 AC_DEFINE(HAVE_BI_STATUS, 1,
2645 ['bi_status' is available])
2650 # LC_BIO_INTEGRITY_ENABLED
2652 # 4.13 removed bio_integrity_enabled
2654 AC_DEFUN([LC_BIO_INTEGRITY_ENABLED], [
2655 LB_CHECK_COMPILE([if 'bio_integrity_enabled' exist],
2656 bio_integrity_enabled, [
2657 #include <linux/bio.h>
2659 bio_integrity_enabled(NULL);
2661 AC_DEFINE(HAVE_BIO_INTEGRITY_ENABLED, 1,
2662 ['bio_integrity_enabled' is available])
2664 ]) # LC_BIO_INTEGRITY_ENABLED
2667 # LC_PAGEVEC_INIT_ONE_PARAM
2669 # 4.14 pagevec_init takes one parameter
2671 AC_DEFUN([LC_PAGEVEC_INIT_ONE_PARAM], [
2672 LB_CHECK_COMPILE([if 'pagevec_init' takes one parameter],
2674 #include <linux/pagevec.h>
2678 AC_DEFINE(HAVE_PAGEVEC_INIT_ONE_PARAM, 1,
2679 ['pagevec_init' takes one parameter])
2681 ]) # LC_PAGEVEC_INIT_ONE_PARAM
2686 # 4.14 replaced bi_bdev to bi_disk
2688 AC_DEFUN([LC_BI_BDEV], [
2689 LB_CHECK_COMPILE([if 'bi_bdev' exist],
2691 #include <linux/bio.h>
2693 ((struct bio *)0)->bi_bdev = NULL;
2695 AC_DEFINE(HAVE_BI_BDEV, 1,
2696 ['bi_bdev' is available])
2703 # kernel 4.17 commit b93b016313b3ba8003c3b8bb71f569af91f19fc7
2705 AC_DEFUN([LC_I_PAGES], [
2706 LB_CHECK_COMPILE([if struct address_space has i_pages],
2708 #include <linux/fs.h>
2710 struct address_space mapping = {};
2713 i_pages = &mapping.i_pages;
2715 AC_DEFINE(HAVE_I_PAGES, 1,
2716 [struct address_space has i_pages])
2723 # kernel 4.17 commit 3d3539018d2cbd12e5af4a132636ee7fd8d43ef0
2724 # mm: create the new vm_fault_t type
2726 AC_DEFUN([LC_VM_FAULT_T], [
2727 LB_CHECK_COMPILE([if vm_fault_t type exists],
2729 #include <linux/mm_types.h>
2731 vm_fault_t x = VM_FAULT_SIGBUS;
2734 AC_DEFINE(HAVE_VM_FAULT_T, 1,
2735 [if vm_fault_t type exists])
2740 # LC_INODE_TIMESPEC64
2742 # kernel 4.17-rc7 commit 8efd6894ff089adeeac7cb9f32125b85d963d1bc
2743 # fs: add timespec64_truncate()
2744 # kernel 4.18 commit 95582b00838837fc07e042979320caf917ce3fe6
2745 # inode timestamps switched to timespec64
2746 # kernel 4.19-rc2 commit 976516404ff3fab2a8caa8bd6f5efc1437fed0b8
2747 # y2038: remove unused time interfaces
2751 # When inode times are timespec64 stop using the deprecated
2754 AC_DEFUN([LC_INODE_TIMESPEC64], [
2755 tmp_flags="$EXTRA_KCFLAGS"
2756 EXTRA_KCFLAGS="-Werror"
2757 LB_CHECK_COMPILE([if inode timestamps are struct timespec64],
2759 #include <linux/fs.h>
2761 struct inode *inode = NULL;
2762 struct timespec64 ts = {};
2764 inode->i_atime = timespec64_trunc(ts, 1);
2767 AC_DEFINE(HAVE_INODE_TIMESPEC64, 1,
2768 [inode times are using timespec64])
2770 EXTRA_KCFLAGS="$tmp_flags"
2771 ]) # LC_INODE_TIMESPEC64
2776 # kernel 4.20 commit v4.19-rc5-248-g9b89a0355144
2777 # xarray: Add XArray marks
2779 AC_DEFUN([LC___XA_SET_MARK], [
2780 LB_CHECK_COMPILE([if '__xa_set_mark' exists],
2782 #include <linux/xarray.h>
2783 #include <linux/fs.h>
2785 struct xarray *xa = NULL;
2787 __xa_set_mark(xa, 0, PAGECACHE_TAG_DIRTY);
2789 AC_DEFINE(HAVE___XA_SET_MARK, 1,
2790 [__xa_set_mark exists])
2792 ]) # LC___XA_SET_MARK
2795 # LC_UAPI_LINUX_MOUNT_H
2797 # kernel 4.20 commit e262e32d6bde0f77fb0c95d977482fc872c51996
2798 # vfs: Suppress MS_* flag defs within the kernel ...
2800 AC_DEFUN([LC_UAPI_LINUX_MOUNT_H], [
2801 tmp_flags="$EXTRA_KCFLAGS"
2802 EXTRA_KCFLAGS="-Werror"
2803 LB_CHECK_COMPILE([if MS_RDONLY was moved to uapi/linux/mount.h],
2805 #include <uapi/linux/mount.h>
2810 AC_DEFINE(HAVE_UAPI_LINUX_MOUNT_H, 1,
2811 [if MS_RDONLY was moved to uapi/linux/mount.h])
2813 EXTRA_KCFLAGS="$tmp_flags"
2814 ]) # LC_UAPI_LINUX_MOUNT_H
2817 # LC_HAVE_SUNRPC_CACHE_HASH_LOCK_IS_A_SPINLOCK
2819 # kernel 4.20 commit 1863d77f15da0addcd293a1719fa5d3ef8cde3ca
2820 # SUNRPC: Replace the cache_detail->hash_lock with a regular spinlock
2822 # Now that the reader functions are all RCU protected, use a regular
2823 # spinlock rather than a reader/writer lock.
2825 AC_DEFUN([LC_HAVE_SUNRPC_CACHE_HASH_LOCK_IS_A_SPINLOCK], [
2826 tmp_flags="$EXTRA_KCFLAGS"
2827 EXTRA_KCFLAGS="-Werror"
2828 LB_CHECK_COMPILE([if cache_detail->hash_lock is a spinlock],
2829 hash_lock_isa_spinlock_t, [
2830 #include <linux/sunrpc/cache.h>
2832 spinlock_t *lock = &(((struct cache_detail *)0)->hash_lock);
2835 AC_DEFINE(HAVE_CACHE_HASH_SPINLOCK, 1,
2836 [if cache_detail->hash_lock is a spinlock])
2838 EXTRA_KCFLAGS="$tmp_flags"
2839 ]) # LC_HAVE_SUNRPC_CACHE_HASH_LOCK_IS_A_SPINLOCK
2842 # LC_HAS_LINUX_SELINUX_ENABLED
2844 # kernel 5.1 commit 3d252529480c68bfd6a6774652df7c8968b28e41
2845 # SELinux: Remove unused selinux_is_enabled
2847 AC_DEFUN([LC_HAS_LINUX_SELINUX_ENABLED], [
2848 tmp_flags="$EXTRA_KCFLAGS"
2849 EXTRA_KCFLAGS="-Werror"
2850 LB_CHECK_COMPILE([if linux/selinux.h exists],
2851 selinux_is_enabled, [
2852 #include <linux/selinux.h>
2854 bool has_selinux = selinux_is_enabled();
2857 AC_DEFINE(HAVE_LINUX_SELINUX_IS_ENABLED, 1,
2858 [if linux/selinux.h exists])
2860 EXTRA_KCFLAGS="$tmp_flags"
2861 ]) # LC_HAS_LINUX_SELINUX_ENABLED
2864 # LC_ACCOUNT_PAGE_DIRTIED
2866 # After 5.2 kernel page dirtied is not exported
2868 AC_DEFUN([LC_ACCOUNT_PAGE_DIRTIED], [
2869 LB_CHECK_COMPILE([if 'account_page_dirtied' is exported],
2870 account_page_dirtied, [
2871 #include <linux/mm.h>
2873 account_page_dirtied(NULL, NULL);
2875 AC_DEFINE(HAVE_ACCOUNT_PAGE_DIRTIED, 1,
2876 [account_page_dirtied is available])
2878 ]) # LC_ACCOUNT_PAGE_DIRTIED
2881 # LC_BIO_BI_PHYS_SEGMENTS
2883 # kernel 5.3-rc1 commit 14ccb66b3f585b2bc21e7256c96090abed5a512c
2884 # block: remove the bi_phys_segments field in struct bio
2886 AC_DEFUN([LC_BIO_BI_PHYS_SEGMENTS], [
2887 tmp_flags="$EXTRA_KCFLAGS"
2888 EXTRA_KCFLAGS="-Werror"
2889 LB_CHECK_COMPILE([if struct bio has bi_phys_segments member],
2890 bye_bio_bi_phys_segments, [
2891 #include <linux/bio.h>
2893 struct bio *bio = NULL;
2894 bio->bi_phys_segments++;
2896 AC_DEFINE(HAVE_BIO_BI_PHYS_SEGMENTS, 1,
2897 [struct bio has bi_phys_segments member])
2899 EXTRA_KCFLAGS="$tmp_flags"
2900 ]) # LC_BIO_BI_PHYS_SEGMENTS
2903 # LC_LM_COMPARE_OWNER_EXISTS
2905 # kernel 5.3-rc3 commit f85d93385e9fe6886a751f647f6812a89bf6bee3
2906 # locks: Cleanup lm_compare_owner and lm_owner_key
2907 # removed lm_compare_owner
2909 AC_DEFUN([LC_LM_COMPARE_OWNER_EXISTS], [
2910 tmp_flags="$EXTRA_KCFLAGS"
2911 EXTRA_KCFLAGS="-Werror"
2912 LB_CHECK_COMPILE([if lock_manager_operations has lm_compare_owner],
2913 lock_manager_ops_lm_compare_owner, [
2914 #include <linux/fs.h>
2916 struct lock_manager_operations lm_ops;
2917 lm_ops.lm_compare_owner = NULL;
2919 AC_DEFINE(HAVE_LM_COMPARE_OWNER, 1,
2920 [lock_manager_operations has lm_compare_owner])
2922 EXTRA_KCFLAGS="$tmp_flags"
2923 ]) # LC_LM_COMPARE_OWNER_EXISTS
2928 # Lustre linux kernel checks
2930 AC_DEFUN([LC_PROG_LINUX], [
2931 AC_MSG_NOTICE([Lustre kernel checks
2932 ==============================================================================])
2937 LC_CONFIG_HEALTH_CHECK_WRITE
2938 LC_CONFIG_LRU_RESIZE
2940 LC_GLIBC_SUPPORT_FHANDLES
2946 LC_HAVE_FHANDLE_SYSCALLS
2947 LC_HAVE_FSTYPE_MOUNT
2948 LC_HAVE_INODE_OWNER_OR_CAPABLE
2949 LC_HAVE_SECURITY_IINITSEC
2950 LC_VFS_CREATE_USE_NAMEIDATA
2953 LC_DIRTY_INODE_WITH_FLAG
2957 LC_LM_XXX_LOCK_MANAGER_OPS
2961 LC_INODE_PERMISION_2ARGS
2962 LC_RADIX_EXCEPTION_ENTRY
2963 LC_HAVE_LOOP_CTL_GET_FREE
2966 LC_HAVE_PROTECT_I_NLINK
2969 LC_HAVE_MIGRATE_HEADER
2970 LC_MIGRATEPAGE_4ARGS
2971 LC_SUPEROPS_USE_DENTRY
2972 LC_INODEOPS_USE_UMODE_T
2973 LC_HAVE_CACHE_REGISTER
2977 LC_KMAP_ATOMIC_HAS_1ARG
2981 LC_HAVE_ENCODE_FH_PARENT
2982 LC_FILE_LLSEEK_SIZE_5ARG
2985 LC_DATA_FOR_LLITE_IS_LIST
2986 LC_DENTRY_OPEN_USE_PATH
2987 LC_HAVE_IOP_ATOMIC_OPEN
2988 LC_HAVE_SB_START_WRITE
2991 LC_HAVE_POSIXACL_USER_NS
2994 LC_HAVE_FILE_F_INODE
2996 LC_HAVE_SUNRPC_UPCALL_HAS_3ARGS
2999 LC_HAVE_HLIST_FOR_EACH_3ARG
3000 LC_HAVE_BIO_END_SECTOR
3002 LC_HAVE_VFS_GETATTR_2ARGS
3005 LC_HAVE_REMOVE_PROC_SUBTREE
3007 LC_HAVE_PROJECT_QUOTA
3008 LC_HAVE_SECURITY_DENTRY_INIT_SECURITY
3009 LC_HAVE_SECURITY_INODE_LISTSECURITY
3016 LC_HAVE_DENTRY_D_U_D_ALIAS
3017 LC_HAVE_DENTRY_D_CHILD
3018 LC_PID_NS_FOR_CHILDREN
3021 LC_OLDSIZE_TRUNCATE_PAGECACHE
3022 LC_PTR_ERR_OR_ZERO_MISSING
3024 LC_INIT_LIST_HEAD_RCU
3029 LC_HAVE_D_IS_POSITIVE
3033 LC_HAVE_TRUNCATE_IPAGES_FINAL
3034 LC_IOPS_RENAME_WITH_FLAGS
3041 LC_DIRECTIO_USE_ITER
3042 LC_HAVE_IOV_ITER_INIT_DIRECTION
3043 LC_HAVE_IOV_ITER_TRUNCATE
3044 LC_HAVE_FILE_OPERATIONS_READ_WRITE_ITER
3047 LC_HAVE_INTERVAL_BLK_INTEGRITY
3051 LC_PERCPU_COUNTER_INIT
3052 LC_NFS_FILLDIR_USE_CTX
3056 LC_HAVE_DQUOT_QC_DQBLK
3059 LC_BACKING_DEV_INFO_REMOVAL
3060 LC_HAVE_BDI_CAP_MAP_COPY
3064 LC_HAVE_SYNC_READ_WRITE
3068 LC_BIO_ENDIO_USES_ONE_ARG
3069 LC_SYMLINK_OPS_USE_NAMEIDATA
3070 LC_ACCOUNT_PAGE_DIRTIED_3ARGS
3073 LC_HAVE_INTERVAL_EXP_BLK_INTEGRITY
3074 LC_HAVE_BIP_ITER_BIO_INTEGRITY_PAYLOAD
3075 LC_HAVE_CACHE_HEAD_HLIST
3076 LC_HAVE_XATTR_HANDLER_SIMPLIFIED
3079 LC_HAVE_LOCKS_LOCK_FILE_WAIT
3080 LC_HAVE_KEY_PAYLOAD_DATA_ARRAY
3081 LC_HAVE_XATTR_HANDLER_NAME
3083 LC_HAVE_SUBMIT_BIO_2ARGS
3084 LC_HAVE_CLEAN_BDEV_ALIASES
3091 LC_HAVE_IOP_GET_LINK
3094 LC_HAVE_IN_COMPAT_SYSCALL
3095 LC_HAVE_XATTR_HANDLER_INODE_PARAM
3101 LC_GENERIC_WRITE_SYNC_2ARGS
3102 LC_FOP_ITERATE_SHARED
3105 LC_HAVE_POSIX_ACL_VALID_USER_NS
3107 LC_FULL_NAME_HASH_3ARGS
3108 LC_STRUCT_POSIX_ACL_XATTR
3114 LC_POSIX_ACL_UPDATE_MODE
3117 LC_IOP_GENERIC_READLINK
3118 LC_HAVE_VM_FAULT_ADDRESS
3121 LC_INODEOPS_ENHANCED_GETATTR
3122 LC_VM_OPERATIONS_REMOVE_VMF_ARG
3123 LC_HAVE_KEY_USAGE_REFCOUNT
3124 LC_HAVE_CRYPTO_MAX_ALG_NAME_128
3128 LC_SUPER_BLOCK_S_UUID
3129 LC_SUPER_SETUP_BDI_NAME
3133 LC_BIO_INTEGRITY_ENABLED
3136 LC_PAGEVEC_INIT_ONE_PARAM
3148 LC_UAPI_LINUX_MOUNT_H
3149 LC_HAVE_SUNRPC_CACHE_HASH_LOCK_IS_A_SPINLOCK
3152 LC_HAS_LINUX_SELINUX_ENABLED
3155 LC_ACCOUNT_PAGE_DIRTIED
3158 LC_BIO_BI_PHYS_SEGMENTS
3159 LC_LM_COMPARE_OWNER_EXISTS
3161 # kernel patch to extend integrity interface
3162 LC_BIO_INTEGRITY_PREP_FN
3165 AS_IF([test "x$enable_server" != xno], [
3175 # Check whether to build the client side of Lustre
3177 AC_DEFUN([LC_CONFIG_CLIENT], [
3178 AC_MSG_CHECKING([whether to build Lustre client support])
3179 AC_ARG_ENABLE([client],
3180 AC_HELP_STRING([--disable-client],
3181 [disable Lustre client support]),
3182 [], [enable_client="yes"])
3183 AC_MSG_RESULT([$enable_client])
3184 ]) # LC_CONFIG_CLIENT
3189 AC_DEFUN([LB_CONFIG_MPITESTS], [
3190 AC_ARG_ENABLE([mpitests],
3191 AC_HELP_STRING([--enable-mpitests=<yes|no|mpicc wrapper>],
3192 [include mpi tests]), [
3193 enable_mpitests="yes"
3196 MPICC_WRAPPER="mpicc"
3197 MPI_BIN=$(eval which $MPICC_WRAPPER | xargs dirname)
3200 enable_mpitests="no"
3204 MPICC_WRAPPER=$enableval
3205 MPI_BIN=$(eval echo $MPICC_WRAPPER | xargs dirname)
3209 enable_mpitests="yes"
3210 MPICC_WRAPPER="mpicc"
3211 MPI_BIN=$(eval which $MPICC_WRAPPER | xargs dirname)
3214 if test "x$enable_mpitests" != "xno"; then
3217 AC_CACHE_CHECK([whether mpitests can be built],
3218 lb_cv_mpi_tests, [AC_COMPILE_IFELSE([AC_LANG_SOURCE([
3222 MPI_Initialized(&flag);
3225 ])], [lb_cv_mpi_tests="yes"], [lb_cv_mpi_tests="no"])
3227 enable_mpitests=$lb_cv_mpi_tests
3231 AC_SUBST(MPICC_WRAPPER)
3232 ]) # LB_CONFIG_MPITESTS
3237 # whether to enable quota support global control
3239 AC_DEFUN([LC_CONFIG_QUOTA], [
3240 AC_MSG_CHECKING([whether to enable quota support global control])
3241 AC_ARG_ENABLE([quota],
3242 AC_HELP_STRING([--enable-quota],
3243 [enable quota support]),
3244 [], [enable_quota="yes"])
3245 AS_IF([test "x$enable_quota" = xyes],
3246 [AC_MSG_RESULT([yes])],
3247 [AC_MSG_RESULT([no])])
3248 ]) # LC_CONFIG_QUOTA
3253 AC_DEFUN([LC_QUOTA], [
3257 AS_IF([test "x$enable_quota" != xno -a "x$enable_utils" != xno], [
3258 AC_CHECK_HEADER([sys/quota.h],
3259 [AC_DEFINE(HAVE_SYS_QUOTA_H, 1,
3260 [Define to 1 if you have <sys/quota.h>.])],
3261 [AC_MSG_ERROR([don't find <sys/quota.h> in your system])])
3268 # configure support for optional OSD implementation
3270 AC_DEFUN([LC_OSD_ADDON], [
3271 AC_MSG_CHECKING([whether to use OSD addon])
3273 AC_HELP_STRING([--with-osd=path],
3274 [set path to optional osd]),
3281 OSDADDON="$with_osd"
3288 AS_IF([test $ENABLEOSDADDON -eq 0], [
3292 OSDMODNAME=$(basename $OSDADDON)
3293 AS_IF([test -e $LUSTRE/$OSDMODNAME], [
3294 AC_MSG_RESULT([can't link])
3296 ], [ln -s $OSDADDON $LUSTRE/$OSDMODNAME], [
3297 AC_MSG_RESULT([$OSDMODNAME])
3298 OSDADDON="obj-m += $OSDMODNAME/"
3300 AC_MSG_RESULT([can't link])
3310 # other configure checks
3312 AC_DEFUN([LC_CONFIGURE], [
3313 AC_MSG_NOTICE([Lustre core checks
3314 ==============================================================================])
3316 AS_IF([test $target_cpu == "i686" -o $target_cpu == "x86_64"],
3317 [CFLAGS="$CFLAGS -Wall -Werror"])
3319 # maximum MDS thread count
3322 # lustre/utils/gss/gss_util.c
3323 # lustre/utils/gss/gssd_proc.c
3324 # lustre/utils/gss/krb5_util.c
3325 # lustre/utils/llog_reader.c
3326 # lustre/utils/create_iam.c
3327 # lustre/utils/libiam.c
3328 AC_CHECK_HEADERS([netdb.h endian.h])
3329 AC_CHECK_FUNCS([gethostbyname])
3331 # lustre/utils/llverfs.c
3332 AC_CHECK_HEADERS([ext2fs/ext2fs.h])
3334 # lustre/utils/lfs.c
3335 AS_IF([test "$enable_dist" = "no"], [
3336 AC_CHECK_LIB([z], [crc32], [
3337 AC_CHECK_HEADER([zlib.h], [], [
3338 AC_MSG_ERROR([zlib.h not found.])])
3341 zlib library not found. Please install zlib development package.])
3347 AC_CHECK_LIB([selinux], [is_selinux_enabled],
3348 [AC_CHECK_HEADERS([selinux/selinux.h],
3349 [SELINUX="-lselinux"
3350 AC_DEFINE([HAVE_SELINUX], 1,
3351 [support for selinux ])],
3354 No libselinux-devel package found, unable to build selinux enabled tools
3359 No selinux package found, unable to build selinux enabled tools
3365 AC_MSG_CHECKING([whether to report minimum OST free space])
3366 AC_ARG_ENABLE([mindf],
3367 AC_HELP_STRING([--enable-mindf],
3368 [Make statfs report the minimum available space on any single OST instead of the sum of free space on all OSTs]),
3369 [], [enable_mindf="no"])
3370 AC_MSG_RESULT([$enable_mindf])
3371 AS_IF([test "$enable_mindf" = "yes"],
3372 [AC_DEFINE([MIN_DF], 1, [Report minimum OST free space])])
3374 AC_MSG_CHECKING([whether to randomly failing memory alloc])
3375 AC_ARG_ENABLE([fail_alloc],
3376 AC_HELP_STRING([--disable-fail-alloc],
3377 [disable randomly alloc failure]),
3378 [], [enable_fail_alloc="yes"])
3379 AC_MSG_RESULT([$enable_fail_alloc])
3380 AS_IF([test "x$enable_fail_alloc" != xno],
3381 [AC_DEFINE([RANDOM_FAIL_ALLOC], 1,
3382 [enable randomly alloc failure])])
3384 AC_MSG_CHECKING([whether to check invariants (expensive cpu-wise)])
3385 AC_ARG_ENABLE([invariants],
3386 AC_HELP_STRING([--enable-invariants],
3387 [enable invariant checking (cpu intensive)]),
3388 [], [enable_invariants="no"])
3389 AC_MSG_RESULT([$enable_invariants])
3390 AS_IF([test "x$enable_invariants" = xyes],
3391 [AC_DEFINE([CONFIG_LUSTRE_DEBUG_EXPENSIVE_CHECK], 1,
3392 [enable invariant checking])])
3394 AC_MSG_CHECKING([whether to track references with lu_ref])
3395 AC_ARG_ENABLE([lu_ref],
3396 AC_HELP_STRING([--enable-lu_ref],
3397 [enable lu_ref reference tracking code]),
3398 [], [enable_lu_ref="no"])
3399 AC_MSG_RESULT([$enable_lu_ref])
3400 AS_IF([test "x$enable_lu_ref" = xyes],
3401 [AC_DEFINE([USE_LU_REF], 1,
3402 [enable lu_ref reference tracking code])])
3404 AC_MSG_CHECKING([whether to enable page state tracking])
3405 AC_ARG_ENABLE([pgstate-track],
3406 AC_HELP_STRING([--enable-pgstate-track],
3407 [enable page state tracking]),
3408 [], [enable_pgstat_track="no"])
3409 AC_MSG_RESULT([$enable_pgstat_track])
3410 AS_IF([test "x$enable_pgstat_track" = xyes],
3411 [AC_DEFINE([CONFIG_DEBUG_PAGESTATE_TRACKING], 1,
3412 [enable page state tracking code])])
3415 AC_MSG_CHECKING([systemd unit file directory])
3416 AC_ARG_WITH([systemdsystemunitdir],
3417 [AS_HELP_STRING([--with-systemdsystemunitdir=DIR],
3418 [Directory for systemd service files])],
3419 [], [with_systemdsystemunitdir=auto])
3420 AS_IF([test "x$with_systemdsystemunitdir" = "xyes" -o "x$with_systemdsystemunitdir" = "xauto"],
3421 [def_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)
3422 AS_IF([test "x$def_systemdsystemunitdir" = "x"],
3423 [AS_IF([test "x$with_systemdsystemunitdir" = "xyes"],
3424 [AC_MSG_ERROR([systemd support requested but pkg-config unable to query systemd package])])
3425 with_systemdsystemunitdir=no],
3426 [with_systemdsystemunitdir="$def_systemdsystemunitdir"])])
3427 AS_IF([test "x$with_systemdsystemunitdir" != "xno"],
3428 [AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])])
3429 AC_MSG_RESULT([$with_systemdsystemunitdir])
3431 AC_MSG_CHECKING([bash-completion directory])
3432 AC_ARG_WITH([bash-completion-dir],
3433 AS_HELP_STRING([--with-bash-completion-dir[=PATH]],
3434 [Install the bash auto-completion script in this directory.]),
3436 [with_bash_completion_dir=yes])
3437 AS_IF([test "x$with_bash_completion_dir" = "xyes"], [
3438 BASH_COMPLETION_DIR="`pkg-config --variable=completionsdir bash-completion`"
3439 AS_IF([test "x$BASH_COMPLETION_DIR" = "x"], [
3440 [BASH_COMPLETION_DIR="$datadir/bash-completion/completions"]
3443 BASH_COMPLETION_DIR="$with_bash_completion_dir"
3445 AC_SUBST([BASH_COMPLETION_DIR])
3446 AC_MSG_RESULT([$BASH_COMPLETION_DIR])
3452 # AM_CONDITIONALS for lustre
3454 AC_DEFUN([LC_CONDITIONALS], [
3455 AM_CONDITIONAL(MPITESTS, test x$enable_mpitests = xyes, Build MPI Tests)
3456 AM_CONDITIONAL(CLIENT, test x$enable_client = xyes)
3457 AM_CONDITIONAL(SERVER, test x$enable_server = xyes)
3458 AM_CONDITIONAL(SPLIT, test x$enable_split = xyes)
3459 AM_CONDITIONAL(EXT2FS_DEVEL, test x$ac_cv_header_ext2fs_ext2fs_h = xyes)
3460 AM_CONDITIONAL(GSS, test x$enable_gss = xyes)
3461 AM_CONDITIONAL(GSS_KEYRING, test x$enable_gss_keyring = xyes)
3462 AM_CONDITIONAL(GSS_PIPEFS, test x$enable_gss_pipefs = xyes)
3463 AM_CONDITIONAL(GSS_SSK, test x$enable_ssk = xyes)
3464 AM_CONDITIONAL(LIBPTHREAD, test x$enable_libpthread = xyes)
3465 AM_CONDITIONAL(HAVE_SYSTEMD, test "x$with_systemdsystemunitdir" != "xno")
3466 AM_CONDITIONAL(ENABLE_BASH_COMPLETION, test "x$with_bash_completion_dir" != "xno")
3467 AM_CONDITIONAL(XATTR_HANDLER, test "x$lb_cv_compile_xattr_handler_flags" = xyes)
3468 AM_CONDITIONAL(SELINUX, test "$SELINUX" = "-lselinux")
3469 AM_CONDITIONAL(GETSEPOL, test x$enable_getsepol = xyes)
3470 ]) # LC_CONDITIONALS
3475 # files that should be generated with AC_OUTPUT
3477 AC_DEFUN([LC_CONFIG_FILES],
3481 lustre/autoconf/Makefile
3482 lustre/conf/Makefile
3483 lustre/conf/resource/Makefile
3484 lustre/contrib/Makefile
3486 lustre/include/Makefile
3487 lustre/include/lustre/Makefile
3488 lustre/include/uapi/linux/lustre/Makefile
3489 lustre/kernel_patches/targets/4.18-rhel8.1.target
3490 lustre/kernel_patches/targets/4.18-rhel8.target
3491 lustre/kernel_patches/targets/3.10-rhel7.7.target
3492 lustre/kernel_patches/targets/3.10-rhel7.6.target
3493 lustre/kernel_patches/targets/3.10-rhel7.5.target
3494 lustre/kernel_patches/targets/4.14-rhel7.5.target
3495 lustre/kernel_patches/targets/4.14-rhel7.6.target
3496 lustre/kernel_patches/targets/3.0-sles11.target
3497 lustre/kernel_patches/targets/3.0-sles11sp3.target
3498 lustre/kernel_patches/targets/3.0-sles11sp4.target
3499 lustre/kernel_patches/targets/3.12-sles12.target
3500 lustre/kernel_patches/targets/4.4-sles12.target
3501 lustre/kernel_patches/targets/4.4-sles12sp3.target
3502 lustre/kernel_patches/targets/4.12-sles12sp4.target
3503 lustre/kernel_patches/targets/3.x-fc18.target
3504 lustre/ldlm/Makefile
3506 lustre/fid/autoMakefile
3507 lustre/llite/Makefile
3508 lustre/llite/autoMakefile
3510 lustre/lov/autoMakefile
3512 lustre/mdc/autoMakefile
3514 lustre/lmv/autoMakefile
3515 lustre/lfsck/Makefile
3516 lustre/lfsck/autoMakefile
3518 lustre/mdt/autoMakefile
3520 lustre/mdd/autoMakefile
3522 lustre/fld/autoMakefile
3523 lustre/obdclass/Makefile
3524 lustre/obdclass/autoMakefile
3525 lustre/obdecho/Makefile
3526 lustre/obdecho/autoMakefile
3528 lustre/ofd/autoMakefile
3530 lustre/osc/autoMakefile
3532 lustre/ost/autoMakefile
3533 lustre/osd-ldiskfs/Makefile
3534 lustre/osd-ldiskfs/autoMakefile
3535 lustre/osd-zfs/Makefile
3536 lustre/osd-zfs/autoMakefile
3538 lustre/mgc/autoMakefile
3540 lustre/mgs/autoMakefile
3541 lustre/target/Makefile
3542 lustre/ptlrpc/Makefile
3543 lustre/ptlrpc/autoMakefile
3544 lustre/ptlrpc/gss/Makefile
3545 lustre/ptlrpc/gss/autoMakefile
3546 lustre/quota/Makefile
3547 lustre/quota/autoMakefile
3548 lustre/scripts/Makefile
3549 lustre/scripts/systemd/Makefile
3550 lustre/tests/Makefile
3551 lustre/tests/mpi/Makefile
3552 lustre/tests/kernel/Makefile
3553 lustre/tests/kernel/autoMakefile
3554 lustre/utils/Makefile
3555 lustre/utils/gss/Makefile
3557 lustre/osp/autoMakefile
3559 lustre/lod/autoMakefile
3561 ]) # LC_CONFIG_FILES