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 # LC_CONFIG_GSS_KEYRING
187 # default 'auto', tests for dependencies, if found, enables;
188 # only called if gss is enabled
190 AC_DEFUN([LC_CONFIG_GSS_KEYRING], [
191 AC_MSG_CHECKING([whether to enable gss keyring backend])
192 AC_ARG_ENABLE([gss_keyring],
193 [AC_HELP_STRING([--disable-gss-keyring],
194 [disable gss keyring backend])],
195 [], [enable_gss_keyring="auto"])
196 AC_MSG_RESULT([$enable_gss_keyring])
197 AS_IF([test "x$enable_gss_keyring" != xno], [
198 LB_CHECK_CONFIG_IM([KEYS], [], [
199 gss_keyring_conf_test="fail"
200 AC_MSG_WARN([GSS keyring backend requires that CONFIG_KEYS be enabled in your kernel.])])
202 AC_CHECK_LIB([keyutils], [keyctl_search], [], [
203 gss_keyring_conf_test="fail"
204 AC_MSG_WARN([GSS keyring backend requires libkeyutils])])
206 AS_IF([test "x$gss_keyring_conf_test" != xfail], [
207 AC_DEFINE([HAVE_GSS_KEYRING], [1],
208 [Define this if you enable gss keyring backend])
209 enable_gss_keyring="yes"
211 AS_IF([test "x$enable_gss_keyring" = xyes], [
212 AC_MSG_ERROR([Cannot enable gss_keyring. See above for details.])
216 ]) # LC_CONFIG_GSS_KEYRING
219 # LC_HAVE_CRED_TGCRED
221 # rhel7 struct cred has no member tgcred
223 AC_DEFUN([LC_HAVE_CRED_TGCRED], [
224 LB_CHECK_COMPILE([if 'struct cred' has member 'tgcred'],
226 #include <linux/cred.h>
228 ((struct cred *)0)->tgcred = NULL;
230 AC_DEFINE(HAVE_CRED_TGCRED, 1,
231 [struct cred has member tgcred])
233 ]) # LC_HAVE_CRED_TGCRED
236 # LC_KEY_TYPE_INSTANTIATE_2ARGS
238 # rhel7 key_type->instantiate takes 2 args (struct key, struct key_preparsed_payload)
240 AC_DEFUN([LC_KEY_TYPE_INSTANTIATE_2ARGS], [
241 LB_CHECK_COMPILE([if 'key_type->instantiate' has two args],
242 key_type_instantiate_2args, [
243 #include <linux/key-type.h>
245 ((struct key_type *)0)->instantiate(0, NULL);
247 AC_DEFINE(HAVE_KEY_TYPE_INSTANTIATE_2ARGS, 1,
248 [key_type->instantiate has two args])
250 ]) # LC_KEY_TYPE_INSTANTIATE_2ARGS
255 AC_DEFUN([LC_CONFIG_SUNRPC], [
256 LB_CHECK_CONFIG_IM([SUNRPC], [], [
257 AS_IF([test "x$sunrpc_required" = xyes], [
260 kernel SUNRPC support is required by using GSS.
263 ]) # LC_CONFIG_SUNRPC
266 # LC_CONFIG_GSS (default 'auto' (tests for dependencies, if found, enables))
268 # Build gss and related tools of Lustre. Currently both kernel and user space
269 # parts are depend on linux platform.
271 AC_DEFUN([LC_CONFIG_GSS], [
272 AC_MSG_CHECKING([whether to enable gss support])
274 [AC_HELP_STRING([--enable-gss], [enable gss support])],
275 [], [enable_gss="auto"])
276 AC_MSG_RESULT([$enable_gss])
278 AS_IF([test "x$enable_gss" != xno], [
279 LC_CONFIG_GSS_KEYRING
281 LC_KEY_TYPE_INSTANTIATE_2ARGS
282 sunrpc_required=$enable_gss
286 LB_CHECK_CONFIG_IM([CRYPTO_MD5], [],
287 [AC_MSG_WARN([kernel MD5 support is recommended by using GSS.])])
288 LB_CHECK_CONFIG_IM([CRYPTO_SHA1], [],
289 [AC_MSG_WARN([kernel SHA1 support is recommended by using GSS.])])
290 LB_CHECK_CONFIG_IM([CRYPTO_SHA256], [],
291 [AC_MSG_WARN([kernel SHA256 support is recommended by using GSS.])])
292 LB_CHECK_CONFIG_IM([CRYPTO_SHA512], [],
293 [AC_MSG_WARN([kernel SHA512 support is recommended by using GSS.])])
295 require_krb5=$enable_gss
299 AS_IF([test -n "$KRBDIR"], [
300 gss_conf_test="success"
302 gss_conf_test="failure"
305 AS_IF([test "x$gss_conf_test" = xsuccess && test "x$enable_gss" != xno], [
306 AC_DEFINE([HAVE_GSS], [1], [Define this is if you enable gss])
309 enable_gss_keyring="no"
313 enable_ssk=$enable_gss
315 enable_gss_keyring="no"
321 # OpenSSL 1.0+ return int for HMAC functions but older SLES11 versions do not
322 AC_DEFUN([LC_OPENSSL_SSK], [
323 AC_MSG_CHECKING([whether OpenSSL has functions needed for SSK])
324 AS_IF([test "x$enable_ssk" != xno], [
325 AC_COMPILE_IFELSE([AC_LANG_SOURCE([
326 #include <openssl/hmac.h>
327 #include <openssl/evp.h>
331 rc = HMAC_Init_ex(NULL, "test", 4, EVP_md_null(), NULL);
333 ])],[AC_DEFINE(HAVE_OPENSSL_SSK, 1,
334 [OpenSSL HMAC functions needed for SSK])],
337 AC_MSG_RESULT([$enable_ssk])
340 # LC_OPENSSL_GETSEPOL
342 # OpenSSL is needed for l_getsepol
343 AC_DEFUN([LC_OPENSSL_GETSEPOL], [
344 AC_MSG_CHECKING([whether openssl-devel is present])
345 AC_COMPILE_IFELSE([AC_LANG_SOURCE([
346 #include <openssl/evp.h>
349 EVP_MD_CTX *mdctx = EVP_MD_CTX_create();
352 AC_DEFINE(HAVE_OPENSSL_GETSEPOL, 1, [openssl-devel is present])
353 enable_getsepol="yes"
359 No openssk-devel headers found, unable to build l_getsepol and SELinux status checking
362 AC_MSG_RESULT([$enable_getsepol])
363 ]) # LC_OPENSSL_GETSEPOL
365 # LC_INODE_PERMISION_2ARGS
367 # up to v2.6.27 had a 3 arg version (inode, mask, nameidata)
368 # v2.6.27->v2.6.37 had a 2 arg version (inode, mask)
369 # v2.6.37->v3.0 had a 3 arg version (inode, mask, nameidata)
370 # v3.1 onward have a 2 arg version (inode, mask)
372 AC_DEFUN([LC_INODE_PERMISION_2ARGS], [
373 LB_CHECK_COMPILE([if 'inode_operations->permission' has two args],
374 inode_ops_permission_2args, [
375 #include <linux/fs.h>
377 struct inode *inode __attribute__ ((unused));
380 inode->i_op->permission(NULL, 0);
382 AC_DEFINE(HAVE_INODE_PERMISION_2ARGS, 1,
383 [inode_operations->permission has two args])
385 ]) # LC_INODE_PERMISION_2ARGS
388 # LC_HAVE_FSTYPE_MOUNT
390 # 2.6.39 replace get_sb with mount in struct file_system_type
392 AC_DEFUN([LC_HAVE_FSTYPE_MOUNT], [
393 LB_CHECK_COMPILE([if 'file_system_type' has 'mount' field],
394 file_system_type_mount, [
395 #include <linux/fs.h>
397 struct file_system_type fst = { };
400 mount = (void *)fst.mount;
402 AC_DEFINE(HAVE_FSTYPE_MOUNT, 1,
403 [struct file_system_type has mount field])
405 ]) # LC_HAVE_FSTYPE_MOUNT
408 # LC_HAVE_FHANDLE_SYSCALLS
410 # 2.6.39 The open_by_handle_at() and name_to_handle_at() system calls were
411 # added to Linux kernel 2.6.39.
412 # Check if client supports these functions
414 AC_DEFUN([LC_HAVE_FHANDLE_SYSCALLS], [
415 LB_CHECK_CONFIG_IM([FHANDLE],[
416 AC_DEFINE(HAVE_FHANDLE_SYSCALLS, 1,
417 [kernel supports fhandles and related syscalls])
419 ]) # LC_HAVE_FHANDLE_SYSCALLS
422 # LC_HAVE_INODE_OWNER_OR_CAPABLE
424 # 2.6.39 renames is_owner_or_cap to inode_owner_or_capable
426 AC_DEFUN([LC_HAVE_INODE_OWNER_OR_CAPABLE], [
427 LB_CHECK_COMPILE([if 'inode_owner_or_capable' exist],
428 inode_owner_or_capable, [
429 #include <linux/fs.h>
431 inode_owner_or_capable(NULL);
433 AC_DEFINE(HAVE_INODE_OWNER_OR_CAPABLE, 1,
434 [inode_owner_or_capable exist])
436 ]) # LC_HAVE_INODE_OWNER_OR_CAPABLE
439 # LC_DIRTY_INODE_WITH_FLAG
441 # 3.0 dirty_inode() has a flag parameter
442 # see kernel commit aa38572954ade525817fe88c54faebf85e5a61c0
444 AC_DEFUN([LC_DIRTY_INODE_WITH_FLAG], [
445 LB_CHECK_COMPILE([if 'dirty_inode' super_operation takes flag],
446 dirty_inode_super_operation_flag, [
447 #include <linux/fs.h>
449 struct inode *inode = NULL;
450 inode->i_sb->s_op->dirty_inode(NULL, 0);
452 AC_DEFINE(HAVE_DIRTY_INODE_HAS_FLAG, 1,
453 [dirty_inode super_operation takes flag])
455 ]) # LC_DIRTY_INODE_WITH_FLAG
460 # 3.0 introduced setns
462 AC_DEFUN([LC_SETNS], [
463 AC_CHECK_HEADERS([sched.h], [], [],
466 AC_CHECK_FUNCS([setns])
470 # LC_LM_XXX_LOCK_MANAGER_OPS
472 # 3.1 renames lock-manager ops(lock_manager_operations) from fl_xxx to lm_xxx
473 # see kernel commit 8fb47a4fbf858a164e973b8ea8ef5e83e61f2e50
475 AC_DEFUN([LC_LM_XXX_LOCK_MANAGER_OPS], [
476 LB_CHECK_COMPILE([if 'lock-manager' ops renamed to 'lm_xxx'],
477 lock_manager_ops_lm_xxx, [
478 #include <linux/fs.h>
480 struct lock_manager_operations lm_ops;
481 lm_ops.lm_notify = NULL;
483 AC_DEFINE(HAVE_LM_XXX_LOCK_MANAGER_OPS, 1,
484 [lock-manager ops renamed to lm_xxx])
486 ]) # LC_LM_XXX_LOCK_MANAGER_OPS
491 # 3.1 kills inode->i_alloc_sem, use i_dio_count and inode_dio_wait
493 # see kernel commit bd5fe6c5eb9c548d7f07fe8f89a150bb6705e8e3
495 AC_DEFUN([LC_INODE_DIO_WAIT], [
496 LB_CHECK_COMPILE([if 'inode->i_alloc_sem' is killed and use inode_dio_wait],
498 #include <linux/fs.h>
500 inode_dio_wait((struct inode *)0);
502 AC_DEFINE(HAVE_INODE_DIO_WAIT, 1,
503 [inode->i_alloc_sem is killed and use inode_dio_wait])
505 ]) # LC_INODE_DIO_WAIT
510 # 3.1 adds get_acl method to inode_operations to read ACL from disk.
511 # see kernel commit 4e34e719e457f2e031297175410fc0bd4016a085
513 AC_DEFUN([LC_IOP_GET_ACL], [
514 LB_CHECK_COMPILE([if 'inode_operations' has '.get_acl' member function],
516 #include <linux/fs.h>
518 struct inode_operations iop;
521 AC_DEFINE(HAVE_IOP_GET_ACL, 1,
522 [inode_operations has .get_acl member function])
527 # LC_FILE_LLSEEK_SIZE
529 # 3.1 introduced generic_file_llseek_size()
531 AC_DEFUN([LC_FILE_LLSEEK_SIZE], [
532 LB_CHECK_EXPORT([generic_file_llseek_size], [fs/read_write.c],
533 [AC_DEFINE(HAVE_FILE_LLSEEK_SIZE, 1,
534 [generic_file_llseek_size is exported by the kernel])])
535 ]) # LC_FILE_LLSEEK_SIZE
538 # LC_RADIX_EXCEPTION_ENTRY
539 # 3.1 adds radix_tree_exception_entry.
541 AC_DEFUN([LC_RADIX_EXCEPTION_ENTRY], [
542 LB_CHECK_COMPILE([radix_tree_exceptional_entry exist],
543 radix_tree_exceptional_entry, [
544 #include <linux/radix-tree.h>
546 radix_tree_exceptional_entry(NULL);
548 AC_DEFINE(HAVE_RADIX_EXCEPTION_ENTRY, 1,
549 [radix_tree_exceptional_entry exist])
551 ]) # LC_RADIX_EXCEPTION_ENTRY
554 # LC_HAVE_PROTECT_I_NLINK
556 # 3.2 protects inode->i_nlink from direct modification
557 # see kernel commit a78ef704a8dd430225955f0709b22d4a6ba21deb
558 # at the same time adds set_nlink(), so checks set_nlink() for it.
560 AC_DEFUN([LC_HAVE_PROTECT_I_NLINK], [
561 LB_CHECK_COMPILE([if 'inode->i_nlink' is protected from direct modification],
562 inode_i_nlink_protected, [
563 #include <linux/fs.h>
568 AC_DEFINE(HAVE_PROTECT_I_NLINK, 1,
569 [inode->i_nlink is protected from direct modification])
571 ]) # LC_HAVE_PROTECT_I_NLINK
574 # 2.6.39 security_inode_init_security takes a 'struct qstr' parameter
576 # 3.2 security_inode_init_security takes a callback to set xattrs
578 AC_DEFUN([LC_HAVE_SECURITY_IINITSEC], [
579 LB_CHECK_COMPILE([if security_inode_init_security takes a callback],
580 security_inode_init_security_callback, [
581 #include <linux/security.h>
583 security_inode_init_security(NULL, NULL, NULL, (const initxattrs)NULL, NULL);
585 AC_DEFINE(HAVE_SECURITY_IINITSEC_CALLBACK, 1,
586 [security_inode_init_security takes a callback to set xattrs])
588 LB_CHECK_COMPILE([if security_inode_init_security takes a 'struct qstr' parameter],
589 security_inode_init_security_qstr, [
590 #include <linux/security.h>
592 security_inode_init_security(NULL, NULL, (struct qstr *)NULL, NULL, NULL, NULL);
594 AC_DEFINE(HAVE_SECURITY_IINITSEC_QSTR, 1,
595 [security_inode_init_security takes a 'struct qstr' parameter])
598 ]) # LC_HAVE_SECURITY_IINITSEC
601 # 2.6.39 vfs_create takes a 'struct nameidata' parameter
603 AC_DEFUN([LC_VFS_CREATE_USE_NAMEIDATA], [
604 LB_CHECK_COMPILE([if vfs_create takes a struct nameidata parameter],
606 #include <linux/namei.h>
607 #include <linux/fs.h>
609 struct nameidata *nd;
610 vfs_create(NULL, NULL, 0, nd);
612 AC_DEFINE(HAVE_VFS_CREATE_USE_NAMEIDATA, 1,
613 [vfs_create use nameidata as parameter])
615 ]) # LC_VFS_CREATE_USE_NAMEIDATA
618 # LC_HAVE_MIGRATE_HEADER
620 # 3.3 introduces migrate_mode.h and migratepage has 4 args
622 AC_DEFUN([LC_HAVE_MIGRATE_HEADER], [
623 LB_CHECK_FILE([$LINUX/include/linux/migrate.h], [
624 AC_DEFINE(HAVE_MIGRATE_H, 1,
625 [kernel has include/linux/migrate.h])
627 LB_CHECK_FILE([$LINUX/include/linux/migrate_mode.h], [
628 AC_DEFINE(HAVE_MIGRATE_MODE_H, 1,
629 [kernel has include/linux/migrate_mode.h])
632 ]) # LC_HAVE_MIGRATE_HEADER
635 # LC_MIGRATEPAGE_4ARGS
637 AC_DEFUN([LC_MIGRATEPAGE_4ARGS], [
638 LB_CHECK_COMPILE([if 'address_space_operations.migratepage' has 4 args],
639 address_space_ops_migratepage_4args, [
640 #include <linux/fs.h>
641 #ifdef HAVE_MIGRATE_H
642 #include <linux/migrate.h>
643 #elif defined(HAVE_MIGRATE_MODE_H)
644 #include <linux/migrate_mode.h>
647 struct address_space_operations aops = { };
648 aops.migratepage(NULL, NULL, NULL, MIGRATE_ASYNC);
650 AC_DEFINE(HAVE_MIGRATEPAGE_4ARGS, 1,
651 [address_space_operations.migratepage has 4 args])
653 ]) # LC_MIGRATEPAGE_4ARGS
656 # LC_SUPEROPS_USE_DENTRY
658 # 3.3 switchs super_operations to use dentry as parameter (but not vfsmount)
659 # see kernel commit 34c80b1d93e6e20ca9dea0baf583a5b5510d92d4
661 AC_DEFUN([LC_SUPEROPS_USE_DENTRY], [
662 tmp_flags="$EXTRA_KCFLAGS"
663 EXTRA_KCFLAGS="-Werror"
664 LB_CHECK_COMPILE([if 'super_operations' use 'dentry' as parameter],
666 #include <linux/fs.h>
667 int show_options(struct seq_file *seq, struct dentry *root) {
671 struct super_operations ops;
672 ops.show_options = show_options;
674 AC_DEFINE(HAVE_SUPEROPS_USE_DENTRY, 1,
675 [super_operations use dentry as parameter])
677 EXTRA_KCFLAGS="$tmp_flags"
678 ]) # LC_SUPEROPS_USE_DENTRY
681 # LC_INODEOPS_USE_UMODE_T
683 # 3.3 switchs inode_operations to use umode_t as parameter (but not int)
684 # see kernel commit 1a67aafb5f72a436ca044293309fa7e6351d6a35
686 AC_DEFUN([LC_INODEOPS_USE_UMODE_T], [
687 tmp_flags="$EXTRA_KCFLAGS"
688 EXTRA_KCFLAGS="-Werror"
689 LB_CHECK_COMPILE([if 'inode_operations' use 'umode_t' as parameter],
691 #include <linux/fs.h>
692 #include <linux/types.h>
693 int my_mknod(struct inode *dir, struct dentry *dchild,
694 umode_t mode, dev_t dev)
699 struct inode_operations ops;
700 ops.mknod = my_mknod;
702 AC_DEFINE(HAVE_INODEOPS_USE_UMODE_T, 1,
703 [inode_operations use umode_t as parameter])
705 EXTRA_KCFLAGS="$tmp_flags"
706 ]) # LC_INODEOPS_USE_UMODE_T
709 # LC_KMAP_ATOMIC_HAS_1ARG
711 # 3.4 kmap_atomic removes second argument
712 # see kernel commit 1ec9c5ddc17aa398f05646abfcbaf315b544e62f
714 AC_DEFUN([LC_KMAP_ATOMIC_HAS_1ARG], [
715 LB_CHECK_COMPILE([if 'kmap_atomic' has only 1 argument],
717 #include <linux/highmem.h>
721 AC_DEFINE(HAVE_KMAP_ATOMIC_HAS_1ARG, 1,
722 [have kmap_atomic has only 1 argument])
724 ]) # LC_KMAP_ATOMIC_HAS_1ARG
727 # LC_HAVE_D_MAKE_ROOT
729 # 3.4 converts d_alloc_root to d_make_root
730 # see kernel commit 32991ab305ace7017c62f8eecbe5eb36dc32e13b
732 AC_DEFUN([LC_HAVE_D_MAKE_ROOT], [
733 LB_CHECK_COMPILE([if have 'd_make_root'],
735 #include <linux/fs.h>
737 d_make_root((struct inode *)NULL);
739 AC_DEFINE(HAVE_D_MAKE_ROOT, 1,
742 ]) # LC_HAVE_D_MAKE_ROOT
745 # LC_HAVE_CACHE_REGISTER
747 # 3.4 cache_register/cache_unregister are removed
748 # see kernel commit 2c5f846747526e2b83c5f1b8e69016be0e2e87c0
749 # Note, since 2.6.37 cache_register_net/cache_unregister_net
750 # are defined, but not exported.
751 # 3.3 cache_register_net/cache_unregister_net are
752 # exported and replacing cache_register/cache_unregister in 3.4
754 AC_DEFUN([LC_HAVE_CACHE_REGISTER], [
755 LB_CHECK_COMPILE([if have 'cache_register'],
757 #include <linux/sunrpc/cache.h>
759 cache_register(NULL);
761 AC_DEFINE(HAVE_CACHE_REGISTER, 1,
762 [have cache_register])
764 ]) # LC_HAVE_CACHE_REGISTER
767 # LC_HAVE_CLEAR_INODE
769 # 3.5 renames end_writeback() back to clear_inode()...
770 # see kernel commit dbd5768f87ff6fb0a4fe09c4d7b6c4a24de99430
772 AC_DEFUN([LC_HAVE_CLEAR_INODE], [
773 LB_CHECK_COMPILE([if have 'clear_inode'],
775 #include <linux/fs.h>
777 clear_inode((struct inode *)NULL);
779 AC_DEFINE(HAVE_CLEAR_INODE, 1,
782 ]) # LC_HAVE_CLEAR_INODE
785 # LC_HAVE_ENCODE_FH_PARENT
787 # 3.5 encode_fh has parent inode passed in directly
788 # see kernel commit b0b0382b
790 AC_DEFUN([LC_HAVE_ENCODE_FH_PARENT], [
791 tmp_flags="$EXTRA_KCFLAGS"
792 EXTRA_KCFLAGS="-Werror"
793 LB_CHECK_COMPILE([if 'encode_fh' have parent inode as parameter],
794 encode_fh_parent_inode, [
795 #include <linux/exportfs.h>
796 #include <linux/fs.h>
797 #include <linux/types.h>
798 int ll_encode_fh(struct inode *i, __u32 *a, int *b, struct inode *p)
803 struct export_operations exp_op;
804 exp_op.encode_fh = ll_encode_fh;
806 AC_DEFINE(HAVE_ENCODE_FH_PARENT, 1,
807 [have parent inode as parameter])
809 EXTRA_KCFLAGS="$tmp_flags"
810 ]) # LC_HAVE_ENCODE_FH_PARENT
813 # LC_FILE_LLSEEK_SIZE_5ARG
815 # 3.5 has generic_file_llseek_size with 5 args
817 AC_DEFUN([LC_FILE_LLSEEK_SIZE_5ARG], [
818 LB_CHECK_COMPILE([if Linux kernel has 'generic_file_llseek_size' with 5 args],
819 generic_file_llseek_size_5args, [
820 #include <linux/fs.h>
822 generic_file_llseek_size(NULL, 0, 0, 0, 0);
824 AC_DEFINE(HAVE_FILE_LLSEEK_SIZE_5ARGS, 1,
825 [kernel has generic_file_llseek_size with 5 args])
827 ]) # LC_FILE_LLSEEK_SIZE_5ARG
830 # LC_LLITE_DATA_IS_LIST
832 # 3.6 switch i_dentry/d_alias from list to hlist
834 # In the upstream kernels d_alias first changes
835 # to a hlist and then in later version, 3.11, gets
836 # moved to the union d_u. Due to some distros having
837 # d_alias in the d_u union as a struct list, which
838 # has never existed upstream stream, we can't test
839 # if d_alias is a list or hlist directly. If ever
840 # i_dentry and d_alias even up different combos then
841 # the build will fail. In that case then we will need
842 # to separate out the i_dentry and d_alias test below.
844 AC_DEFUN([LC_DATA_FOR_LLITE_IS_LIST], [
845 tmp_flags="$EXTRA_KCFLAGS"
846 EXTRA_KCFLAGS="-Werror"
847 LB_CHECK_COMPILE([if 'i_dentry/d_alias' uses 'list'],
848 i_dentry_d_alias_list, [
849 #include <linux/fs.h>
852 INIT_LIST_HEAD(&inode.i_dentry);
854 AC_DEFINE(DATA_FOR_LLITE_IS_LIST, 1,
855 [both i_dentry/d_alias uses list])
857 EXTRA_KCFLAGS="$tmp_flags"
858 ]) # LC_DATA_FOR_LLITE_IS_LIST
861 # LC_DENTRY_OPEN_USE_PATH
863 # 3.6 dentry_open uses struct path as first argument
864 # see kernel commit 765927b2
866 AC_DEFUN([LC_DENTRY_OPEN_USE_PATH], [
867 tmp_flags="$EXTRA_KCFLAGS"
868 EXTRA_KCFLAGS="-Werror"
869 LB_CHECK_COMPILE([if 'dentry_open' uses 'struct path' as first argument],
871 #include <linux/fs.h>
872 #include <linux/path.h>
875 dentry_open(&path, 0, NULL);
877 AC_DEFINE(HAVE_DENTRY_OPEN_USE_PATH, 1,
878 [dentry_open uses struct path as first argument])
880 EXTRA_KCFLAGS="$tmp_flags"
881 ]) # LC_DENTRY_OPEN_USE_PATH
884 # LC_HAVE_IOP_ATOMIC_OPEN
886 # 3.6 vfs adds iop->atomic_open
888 AC_DEFUN([LC_HAVE_IOP_ATOMIC_OPEN], [
889 LB_CHECK_COMPILE([if 'iop' has 'atomic_open'],
890 inode_ops_atomic_open, [
891 #include <linux/fs.h>
893 struct inode_operations iop;
894 iop.atomic_open = NULL;
896 AC_DEFINE(HAVE_IOP_ATOMIC_OPEN, 1,
897 [have iop atomic_open])
899 ]) # LC_HAVE_IOP_ATOMIC_OPEN
902 # LC_HAVE_SB_START_WRITE
904 # RHEL6 2.6.32, 3.6 or newer support wrapped FS freeze functions
906 AC_DEFUN([LC_HAVE_SB_START_WRITE], [
907 LB_CHECK_COMPILE([if kernel supports wrapped FS freeze functions],
909 #include <linux/fs.h>
911 sb_start_write(NULL);
913 AC_DEFINE(HAVE_SB_START_WRITE, 1,
914 [kernel supports wrapped FS freeze functions])
916 ]) # LC_HAVE_SB_START_WRITE
919 # LC_HAVE_POSIXACL_USER_NS
921 # 3.7 posix_acl_{to,from}_xattr take struct user_namespace
923 AC_DEFUN([LC_HAVE_POSIXACL_USER_NS], [
924 LB_CHECK_COMPILE([if 'posix_acl_to_xattr' takes 'struct user_namespace'],
925 posix_acl_to_xattr_user_namespace, [
926 #include <linux/fs.h>
927 #include <linux/posix_acl_xattr.h>
929 posix_acl_to_xattr((struct user_namespace *)NULL, NULL, NULL, 0);
931 AC_DEFINE(HAVE_POSIXACL_USER_NS, 1,
932 [posix_acl_to_xattr takes struct user_namespace])
934 ]) # LC_HAVE_POSIXACL_USER_NS
937 # LC_HAVE_FILE_F_INODE
939 # 3.8 struct file has new member f_inode
941 AC_DEFUN([LC_HAVE_FILE_F_INODE], [
942 LB_CHECK_COMPILE([if 'struct file' has member 'f_inode'],
944 #include <linux/fs.h>
946 ((struct file *)0)->f_inode = NULL;
948 AC_DEFINE(HAVE_FILE_F_INODE, 1,
949 [struct file has member f_inode])
951 ]) # LC_HAVE_FILE_F_INODE
956 # 3.8 has introduced inline function file_inode
958 AC_DEFUN([LC_HAVE_FILE_INODE], [
959 LB_CHECK_COMPILE([if file_inode() exists],
961 #include <linux/fs.h>
965 AC_DEFINE(HAVE_FILE_INODE, 1,
966 [file_inode() has been defined])
968 ]) # LC_HAVE_FILE_INODE
971 # LC_HAVE_SUNRPC_UPCALL_HAS_3ARGS
973 AC_DEFUN([LC_HAVE_SUNRPC_UPCALL_HAS_3ARGS], [
974 LB_CHECK_COMPILE([if 'sunrpc_cache_pipe_upcall' takes 3 args],
975 sunrpc_cache_pipe_upcall_3args, [
976 #include <linux/sunrpc/cache.h>
978 sunrpc_cache_pipe_upcall(NULL, NULL, NULL);
980 AC_DEFINE(HAVE_SUNRPC_UPCALL_HAS_3ARGS, 1,
981 [sunrpc_cache_pipe_upcall takes 3 args])
983 ]) # LC_HAVE_SUNRPC_UPCALL_HAS_3ARGS
986 # LC_HAVE_HLIST_FOR_EACH_3ARG
988 # 3.9 uses hlist_for_each_entry with 3 args
989 # b67bfe0d42cac56c512dd5da4b1b347a23f4b70a
991 AC_DEFUN([LC_HAVE_HLIST_FOR_EACH_3ARG], [
992 LB_CHECK_COMPILE([if 'hlist_for_each_entry' has 3 args],
993 hlist_for_each_entry_3args, [
994 #include <linux/list.h>
995 #include <linux/fs.h>
997 struct hlist_head *head = NULL;
1000 hlist_for_each_entry(inode, head, i_hash) {
1004 AC_DEFINE(HAVE_HLIST_FOR_EACH_3ARG, 1,
1005 [hlist_for_each_entry has 3 args])
1007 ]) # LC_HAVE_HLIST_FOR_EACH_3ARG
1010 # LC_HAVE_BIO_END_SECTOR
1012 # 3.9 introduces bio_end_sector macro
1013 # f73a1c7d117d07a96d89475066188a2b79e53c48
1015 AC_DEFUN([LC_HAVE_BIO_END_SECTOR], [
1016 LB_CHECK_COMPILE([if 'bio_end_sector' is defined],
1018 #include <linux/bio.h>
1020 struct bio bio = { };
1021 unsigned long long end;
1023 end = bio_end_sector(&bio);
1025 AC_DEFINE(HAVE_BIO_END_SECTOR, 1,
1026 [bio_end_sector is defined])
1028 ]) # LC_HAVE_BIO_END_SECTOR
1031 # 3.9 created is_sxid
1033 AC_DEFUN([LC_HAVE_IS_SXID], [
1034 LB_CHECK_COMPILE([if 'is_sxid' is defined],
1036 #include <linux/fs.h>
1038 struct inode inode = { };
1040 is_sxid(inode.i_mode);
1042 AC_DEFINE(HAVE_IS_SXID, 1, [is_sxid is defined])
1044 ]) # LC_HAVE_IS_SXID
1047 # LC_HAVE_VFS_GETATTR_2ARGS
1049 AC_DEFUN([LC_HAVE_VFS_GETATTR_2ARGS], [
1050 LB_CHECK_COMPILE([if vfs_getattr takes 2 args],
1052 #include <linux/fs.h>
1056 vfs_getattr(&path, NULL);
1058 AC_DEFINE(HAVE_VFS_GETATTR_2ARGS, 1,
1059 [vfs_getattr takes 2 args])
1061 ]) # LC_HAVE_VFS_GETATTR_2ARGS
1064 # LC_HAVE_REMOVE_PROC_SUBTREE
1066 # 3.10 introduced remove_proc_subtree
1068 AC_DEFUN([LC_HAVE_REMOVE_PROC_SUBTREE], [
1069 LB_CHECK_COMPILE([if 'remove_proc_subtree' is defined],
1070 remove_proc_subtree, [
1071 #include <linux/proc_fs.h>
1073 remove_proc_subtree(NULL, NULL);
1075 AC_DEFINE(HAVE_REMOVE_PROC_SUBTREE, 1,
1076 [remove_proc_subtree is defined])
1078 ]) # LC_HAVE_REMOVE_PROC_SUBTREE
1081 # LC_HAVE_PROC_REMOVE
1083 # 3.10 introduced proc_remove
1085 AC_DEFUN([LC_HAVE_PROC_REMOVE], [
1086 LB_CHECK_COMPILE([if 'proc_remove' is defined],
1088 #include <linux/proc_fs.h>
1092 AC_DEFINE(HAVE_PROC_REMOVE, 1,
1093 [proc_remove is defined])
1095 ]) # LC_HAVE_PROC_REMOVE
1097 AC_DEFUN([LC_HAVE_PROJECT_QUOTA], [
1098 LB_CHECK_COMPILE([if get_projid exists],
1101 #include <linux/quota.h>
1103 struct dquot_operations ops = { };
1105 ops.get_projid(NULL, NULL);
1107 AC_DEFINE(HAVE_PROJECT_QUOTA, 1,
1108 [get_projid function exists])
1110 ]) # LC_HAVE_PROJECT_QUOTA
1114 # LC_HAVE_SECURITY_DENTRY_INIT_SECURITY
1116 # 3.10 introduced security_dentry_init_security()
1118 AC_DEFUN([LC_HAVE_SECURITY_DENTRY_INIT_SECURITY], [
1119 LB_CHECK_COMPILE([if 'security_dentry_init_security' is defined],
1120 security_dentry_init_security, [
1121 #include <linux/security.h>
1123 security_dentry_init_security(NULL, 0, NULL, NULL, NULL);
1125 AC_DEFINE(HAVE_SECURITY_DENTRY_INIT_SECURITY, 1,
1126 [security_dentry_init_security' is defined])
1128 ]) # LC_HAVE_SECURITY_DENTRY_INIT_SECURITY
1131 # 3.10 exports security_inode_listsecurity
1133 AC_DEFUN([LC_HAVE_SECURITY_INODE_LISTSECURITY], [
1134 LB_CHECK_COMPILE([if security_inode_listsecurity() is available/exported],
1135 security_inode_listsecurity, [
1136 #include <linux/security.h>
1138 security_inode_listsecurity(NULL, NULL, 0);
1140 AC_DEFINE(HAVE_SECURITY_INODE_LISTSECURITY, 1,
1141 [security_inode_listsecurity() is available/exported])
1143 ]) # LC_HAVE_SECURITY_INODE_LISTSECURITY
1146 # LC_INVALIDATE_RANGE
1148 # 3.11 invalidatepage requires the length of the range to invalidate
1150 AC_DEFUN([LC_INVALIDATE_RANGE], [
1151 LB_CHECK_COMPILE([if 'address_space_operations.invalidatepage' requires 3 arguments],
1152 address_space_ops_invalidatepage_3args, [
1153 #include <linux/fs.h>
1155 struct address_space_operations a_ops;
1156 a_ops.invalidatepage(NULL, 0, 0);
1158 AC_DEFINE(HAVE_INVALIDATE_RANGE, 1,
1159 [address_space_operations.invalidatepage needs 3 arguments])
1161 ]) # LC_INVALIDATE_RANGE
1164 # LC_HAVE_DIR_CONTEXT
1166 # 3.11 readdir now takes the new struct dir_context
1168 AC_DEFUN([LC_HAVE_DIR_CONTEXT], [
1169 LB_CHECK_COMPILE([if 'dir_context' exist],
1171 #include <linux/fs.h>
1173 #ifdef FMODE_KABI_ITERATE
1174 #error "back to use readdir in kabi_extand mode"
1176 struct dir_context ctx;
1181 AC_DEFINE(HAVE_DIR_CONTEXT, 1,
1182 [dir_context exist])
1184 ]) # LC_HAVE_DIR_CONTEXT
1187 # LC_D_COMPARE_5ARGS
1189 # 3.11 dentry_operations.d_compare() taken 5 arguments.
1191 AC_DEFUN([LC_D_COMPARE_5ARGS], [
1192 LB_CHECK_COMPILE([if 'd_compare' taken 5 arguments],
1194 #include <linux/dcache.h>
1196 ((struct dentry_operations*)0)->d_compare(NULL,NULL,0,NULL,NULL);
1198 AC_DEFINE(HAVE_D_COMPARE_5ARGS, 1,
1199 [d_compare need 5 arguments])
1201 ]) # LC_D_COMPARE_5ARGS
1206 # 3.11 need to access d_count to get dentry reference count
1208 AC_DEFUN([LC_HAVE_DCOUNT], [
1209 LB_CHECK_COMPILE([if 'd_count' exists],
1211 #include <linux/dcache.h>
1213 struct dentry de = { };
1216 count = d_count(&de);
1218 AC_DEFINE(HAVE_D_COUNT, 1,
1224 # LC_PID_NS_FOR_CHILDREN
1226 # 3.11 replaces pid_ns by pid_ns_for_children in struct nsproxy
1228 AC_DEFUN([LC_PID_NS_FOR_CHILDREN], [
1229 LB_CHECK_COMPILE([if 'struct nsproxy' has 'pid_ns_for_children'],
1230 pid_ns_for_children, [
1231 #include <linux/nsproxy.h>
1234 ns.pid_ns_for_children = NULL;
1236 AC_DEFINE(HAVE_PID_NS_FOR_CHILDREN, 1,
1237 ['struct nsproxy' has 'pid_ns_for_children'])
1239 ]) # LC_PID_NS_FOR_CHILDREN
1242 # LC_OLDSIZE_TRUNCATE_PAGECACHE
1244 # 3.12 truncate_pagecache without oldsize parameter
1246 AC_DEFUN([LC_OLDSIZE_TRUNCATE_PAGECACHE], [
1247 LB_CHECK_COMPILE([if 'truncate_pagecache' with 'old_size' parameter],
1248 truncate_pagecache_old_size, [
1249 #include <linux/mm.h>
1251 truncate_pagecache(NULL, 0, 0);
1253 AC_DEFINE(HAVE_OLDSIZE_TRUNCATE_PAGECACHE, 1,
1256 ]) # LC_OLDSIZE_TRUNCATE_PAGECACHE
1259 # LC_PTR_ERR_OR_ZERO
1261 # For some reason SLES11SP4 is missing the PTR_ERR_OR_ZERO macro
1262 # It was added to linux kernel 3.12
1264 AC_DEFUN([LC_PTR_ERR_OR_ZERO_MISSING], [
1265 LB_CHECK_COMPILE([if 'PTR_ERR_OR_ZERO' is missing],
1267 #include <linux/err.h>
1269 if (PTR_ERR_OR_ZERO(NULL)) return 0;
1271 AC_DEFINE(HAVE_PTR_ERR_OR_ZERO, 1,
1272 ['PTR_ERR_OR_ZERO' exist])
1274 ]) # LC_PTR_ERR_OR_ZERO_MISSING
1277 # LC_HAVE_DENTRY_D_U_D_ALIAS
1279 # 3.11 kernel moved d_alias to the union d_u in struct dentry
1281 # Some distros move d_alias to d_u but it is still a struct list
1283 AC_DEFUN([LC_HAVE_DENTRY_D_U_D_ALIAS], [
1284 AS_IF([test "x$lb_cv_compile_i_dentry_d_alias_list" = xyes], [
1285 LB_CHECK_COMPILE([if list 'dentry.d_u.d_alias' exist],
1287 #include <linux/list.h>
1288 #include <linux/dcache.h>
1291 INIT_LIST_HEAD(&de.d_u.d_alias);
1293 AC_DEFINE(HAVE_DENTRY_D_U_D_ALIAS, 1,
1294 [list dentry.d_u.d_alias exist])
1297 LB_CHECK_COMPILE([if hlist 'dentry.d_u.d_alias' exist],
1299 #include <linux/list.h>
1300 #include <linux/dcache.h>
1303 INIT_HLIST_NODE(&de.d_u.d_alias);
1305 AC_DEFINE(HAVE_DENTRY_D_U_D_ALIAS, 1,
1306 [hlist dentry.d_u.d_alias exist])
1309 ]) # LC_HAVE_DENTRY_D_U_D_ALIAS
1312 # LC_HAVE_DENTRY_D_CHILD
1314 # 3.11 kernel d_child has been moved out of the union d_u
1317 AC_DEFUN([LC_HAVE_DENTRY_D_CHILD], [
1318 LB_CHECK_COMPILE([if 'dentry.d_child' exist],
1320 #include <linux/list.h>
1321 #include <linux/dcache.h>
1324 INIT_LIST_HEAD(&de.d_child);
1326 AC_DEFINE(HAVE_DENTRY_D_CHILD, 1,
1327 [dentry.d_child exist])
1329 ]) # LC_HAVE_DENTRY_D_CHILD
1334 # 3.12 ki_left removed from struct kiocb
1336 AC_DEFUN([LC_KIOCB_KI_LEFT], [
1337 LB_CHECK_COMPILE([if 'struct kiocb' with 'ki_left' member],
1339 #include <linux/aio.h>
1341 ((struct kiocb*)0)->ki_left = 0;
1343 AC_DEFINE(HAVE_KIOCB_KI_LEFT, 1,
1346 ]) # LC_KIOCB_KI_LEFT
1349 # LC_INIT_LIST_HEAD_RCU
1351 # 3.12 added INIT_LIST_HEAD_RCU in commit 2a855b644c310d5db5
1352 # which is unfortunately an inline function and not a macro
1353 # that can be tested directly, so it needs a configure check.
1355 AC_DEFUN([LC_INIT_LIST_HEAD_RCU], [
1356 LB_CHECK_COMPILE([if 'INIT_LIST_HEAD_RCU' exists],
1357 init_list_head_rcu, [
1358 #include <linux/list.h>
1359 #include <linux/rculist.h>
1361 struct list_head list;
1362 INIT_LIST_HEAD_RCU(&list);
1364 AC_DEFINE(HAVE_INIT_LIST_HEAD_RCU, 1,
1365 [INIT_LIST_HEAD_RCU exists])
1367 ]) # LC_INIT_LIST_HEAD_RCU
1370 # LC_VFS_RENAME_5ARGS
1372 # 3.13 has vfs_rename with 5 args
1374 AC_DEFUN([LC_VFS_RENAME_5ARGS], [
1375 LB_CHECK_COMPILE([if Linux kernel has 'vfs_rename' with 5 args],
1377 #include <linux/fs.h>
1379 vfs_rename(NULL, NULL, NULL, NULL, NULL);
1381 AC_DEFINE(HAVE_VFS_RENAME_5ARGS, 1,
1382 [kernel has vfs_rename with 5 args])
1384 ]) # LC_VFS_RENAME_5ARGS
1387 # LC_VFS_UNLINK_3ARGS
1389 # 3.13 has vfs_unlink with 3 args
1391 AC_DEFUN([LC_VFS_UNLINK_3ARGS], [
1392 LB_CHECK_COMPILE([if Linux kernel has 'vfs_unlink' with 3 args],
1394 #include <linux/fs.h>
1396 vfs_unlink(NULL, NULL, NULL);
1398 AC_DEFINE(HAVE_VFS_UNLINK_3ARGS, 1,
1399 [kernel has vfs_unlink with 3 args])
1401 ]) # LC_VFS_UNLINK_3ARGS
1403 # LC_HAVE_D_IS_POSITIVE
1405 # Kernel version 3.13 b18825a7c8e37a7cf6abb97a12a6ad71af160de7
1406 # d_is_positive is added
1408 AC_DEFUN([LC_HAVE_D_IS_POSITIVE], [
1409 LB_CHECK_COMPILE([if 'd_is_positive' exist],
1411 #include <linux/dcache.h>
1413 d_is_positive(NULL);
1415 AC_DEFINE(HAVE_D_IS_POSITIVE, 1,
1416 ['d_is_positive' is available])
1418 ]) # LC_HAVE_D_IS_POSITIVE
1423 # 3.14 move some of its data in struct bio into the new
1426 AC_DEFUN([LC_HAVE_BVEC_ITER], [
1427 LB_CHECK_COMPILE([if Linux kernel has struct bvec_iter],
1429 #include <linux/bio.h>
1431 struct bvec_iter iter;
1433 iter.bi_bvec_done = 0;
1435 AC_DEFINE(HAVE_BVEC_ITER, 1,
1436 [kernel has struct bvec_iter])
1438 ]) # LC_HAVE_BVEC_ITER
1443 # 3.14 adds set_acl method to inode_operations
1444 # see kernel commit 893d46e443346370cd4ea81d9d35f72952c62a37
1446 AC_DEFUN([LC_IOP_SET_ACL], [
1447 LB_CHECK_COMPILE([if 'inode_operations' has '.set_acl' member function],
1448 inode_ops_set_acl, [
1449 #include <linux/fs.h>
1451 struct inode_operations iop;
1454 AC_DEFINE(HAVE_IOP_SET_ACL, 1,
1455 [inode_operations has .set_acl member function])
1460 # LC_HAVE_TRUNCATE_IPAGE_FINAL
1462 # 3.14 bring truncate_inode_pages_final for evict_inode
1464 AC_DEFUN([LC_HAVE_TRUNCATE_IPAGES_FINAL], [
1465 LB_CHECK_COMPILE([if Linux kernel has truncate_inode_pages_final],
1466 truncate_ipages_final, [
1467 #include <linux/mm.h>
1469 truncate_inode_pages_final(NULL);
1471 AC_DEFINE(HAVE_TRUNCATE_INODE_PAGES_FINAL, 1,
1472 [kernel has truncate_inode_pages_final])
1474 ]) # LC_HAVE_TRUNCATE_IPAGES_FINAL
1477 # LC_IOPS_RENAME_WITH_FLAGS
1479 # 3.14 has inode_operations->rename with 5 args
1480 # commit 520c8b16505236fc82daa352e6c5e73cd9870cff
1482 AC_DEFUN([LC_IOPS_RENAME_WITH_FLAGS], [
1483 LB_CHECK_COMPILE([if 'inode_operations->rename' taken flags as argument],
1484 iops_rename_with_flags, [
1485 #include <linux/fs.h>
1487 struct inode *i1 = NULL, *i2 = NULL;
1488 struct dentry *d1 = NULL, *d2 = NULL;
1490 rc = ((struct inode_operations *)0)->rename(i1, d1, i2, d2, 0);
1492 AC_DEFINE(HAVE_IOPS_RENAME_WITH_FLAGS, 1,
1493 [inode_operations->rename need flags as argument])
1495 ]) # LC_IOPS_RENAME_WITH_FLAGS
1498 # LC_VFS_RENAME_6ARGS
1500 # 3.15 has vfs_rename with 6 args
1502 AC_DEFUN([LC_VFS_RENAME_6ARGS], [
1503 LB_CHECK_COMPILE([if Linux kernel has 'vfs_rename' with 6 args],
1505 #include <linux/fs.h>
1507 vfs_rename(NULL, NULL, NULL, NULL, NULL, NULL);
1509 AC_DEFINE(HAVE_VFS_RENAME_6ARGS, 1,
1510 [kernel has vfs_rename with 6 args])
1512 ]) # LC_VFS_RENAME_6ARGS
1515 # LC_DIRECTIO_USE_ITER
1517 # 3.16 kernel changes direct IO to use iov_iter
1519 AC_DEFUN([LC_DIRECTIO_USE_ITER], [
1520 LB_CHECK_COMPILE([if direct IO uses iov_iter],
1522 #include <linux/fs.h>
1524 struct address_space_operations ops = { };
1525 struct iov_iter *iter = NULL;
1528 ops.direct_IO(0, NULL, iter, offset);
1530 AC_DEFINE(HAVE_DIRECTIO_ITER, 1,
1531 [direct IO uses iov_iter])
1533 ]) # LC_DIRECTIO_USE_ITER
1536 # LC_HAVE_IOV_ITER_INIT_DIRECTION
1539 # 3.16 linux commit 71d8e532b1549a478e6a6a8a44f309d050294d00
1540 # changed iov_iter_init api to start accepting a tag
1541 # that defines if its a read or write operation
1543 AC_DEFUN([LC_HAVE_IOV_ITER_INIT_DIRECTION], [
1544 tmp_flags="$EXTRA_KCFLAGS"
1545 EXTRA_KCFLAGS="-Werror"
1546 LB_CHECK_COMPILE([if 'iov_iter_init' takes a tag],
1548 #include <linux/uio.h>
1549 #include <linux/fs.h>
1551 const struct iovec *iov = NULL;
1553 iov_iter_init(NULL, READ, iov, 1, 0);
1555 AC_DEFINE(HAVE_IOV_ITER_INIT_DIRECTION, 1,
1556 [iov_iter_init handles directional tag])
1558 EXTRA_KCFLAGS="$tmp_flags"
1559 ]) # LC_HAVE_IOV_ITER_INIT_DIRECTION
1562 # LC_HAVE_IOV_ITER_TRUNCATE
1565 # 3.16 introduces a new API iov_iter_truncate()
1567 AC_DEFUN([LC_HAVE_IOV_ITER_TRUNCATE], [
1568 tmp_flags="$EXTRA_KCFLAGS"
1569 EXTRA_KCFLAGS="-Werror"
1570 LB_CHECK_COMPILE([if 'iov_iter_truncate' exists ],
1572 #include <linux/uio.h>
1573 #include <linux/fs.h>
1575 struct iov_iter *i = NULL;
1577 iov_iter_truncate(i, 0);
1579 AC_DEFINE(HAVE_IOV_ITER_TRUNCATE, 1, [iov_iter_truncate exists])
1581 EXTRA_KCFLAGS="$tmp_flags"
1582 ]) # LC_HAVE_IOV_ITER_TRUNCATE
1585 # LC_HAVE_FILE_OPERATIONS_READ_WRITE_ITER
1587 # 3.16 introduces [read|write]_iter to struct file_operations
1589 AC_DEFUN([LC_HAVE_FILE_OPERATIONS_READ_WRITE_ITER], [
1590 LB_CHECK_COMPILE([if 'file_operations.[read|write]_iter' exist],
1591 file_function_iter, [
1592 #include <linux/fs.h>
1594 ((struct file_operations *)NULL)->read_iter(NULL, NULL);
1595 ((struct file_operations *)NULL)->write_iter(NULL, NULL);
1597 AC_DEFINE(HAVE_FILE_OPERATIONS_READ_WRITE_ITER, 1,
1598 [file_operations.[read|write]_iter functions exist])
1600 ]) # LC_HAVE_FILE_OPERATIONS_READ_WRITE_ITER
1603 # LC_HAVE_INTERVAL_BLK_INTEGRITY
1605 # 3.17 replace sector_size with interval in struct blk_integrity
1607 AC_DEFUN([LC_HAVE_INTERVAL_BLK_INTEGRITY], [
1608 LB_CHECK_COMPILE([if 'blk_integrity.interval' exist],
1609 interval_blk_integrity, [
1610 #include <linux/blkdev.h>
1612 ((struct blk_integrity *)0)->interval = 0;
1614 AC_DEFINE(HAVE_INTERVAL_BLK_INTEGRITY, 1,
1615 [blk_integrity.interval exist])
1617 ]) # LC_HAVE_INTERVAL_BLK_INTEGRITY
1622 # 3.17 replaces key_type::match with match_preparse
1623 # and has new struct key_match_data
1625 AC_DEFUN([LC_KEY_MATCH_DATA], [
1626 LB_CHECK_COMPILE([if struct key_match field exist],
1628 #include <linux/key-type.h>
1630 struct key_match_data data;
1632 data.raw_data = NULL;
1634 AC_DEFINE(HAVE_KEY_MATCH_DATA, 1,
1635 [struct key_match_data exist])
1637 ]) # LC_KEY_MATCH_DATA
1640 # LC_NFS_FILLDIR_USE_CTX
1642 # 3.18 kernel moved from void cookie to struct dir_context
1644 AC_DEFUN([LC_NFS_FILLDIR_USE_CTX], [
1645 tmp_flags="$EXTRA_KCFLAGS"
1646 EXTRA_KCFLAGS="-Werror"
1647 LB_CHECK_COMPILE([if filldir_t uses struct dir_context],
1649 #include <linux/fs.h>
1651 int filldir(struct dir_context *ctx, const char* name,
1652 int i, loff_t off, u64 tmp, unsigned temp)
1657 struct dir_context ctx = {
1661 ctx.actor(NULL, "test", 0, (loff_t) 0, 0, 0);
1663 AC_DEFINE(HAVE_FILLDIR_USE_CTX, 1,
1664 [filldir_t needs struct dir_context as argument])
1666 EXTRA_KCFLAGS="$tmp_flags"
1667 ]) # LC_NFS_FILLDIR_USE_CTX
1670 # LC_PERCPU_COUNTER_INIT
1672 # 3.18 For kernels 3.18 and after percpu_counter_init starts
1673 # to pass a GFP_* memory allocation flag for internal
1674 # memory allocation purposes.
1676 AC_DEFUN([LC_PERCPU_COUNTER_INIT], [
1677 LB_CHECK_COMPILE([if percpu_counter_init uses GFP_* flag as argument],
1678 percpu_counter_init, [
1679 #include <linux/percpu_counter.h>
1681 percpu_counter_init(NULL, 0, GFP_KERNEL);
1683 AC_DEFINE(HAVE_PERCPU_COUNTER_INIT_GFP_FLAG, 1,
1684 [percpu_counter_init uses GFP_* flag])
1686 ]) # LC_PERCPU_COUNTER_INIT
1689 # LC_KIOCB_HAS_NBYTES
1691 # 3.19 kernel removed ki_nbytes from struct kiocb
1693 AC_DEFUN([LC_KIOCB_HAS_NBYTES], [
1694 LB_CHECK_COMPILE([if struct kiocb has ki_nbytes field],
1696 #include <linux/fs.h>
1698 struct kiocb iocb = { };
1702 AC_DEFINE(HAVE_KI_NBYTES, 1, [ki_nbytes field exist])
1704 ]) # LC_KIOCB_HAS_NBYTES
1707 # LC_HAVE_DQUOT_QC_DQBLK
1709 # 3.19 has quotactl_ops->[sg]et_dqblk that take struct kqid and qc_dqblk
1710 # Added in commit 14bf61ffe
1712 AC_DEFUN([LC_HAVE_DQUOT_QC_DQBLK], [
1713 tmp_flags="$EXTRA_KCFLAGS"
1714 EXTRA_KCFLAGS="-Werror"
1715 LB_CHECK_COMPILE([if 'quotactl_ops.set_dqblk' takes struct qc_dqblk],
1717 #include <linux/fs.h>
1718 #include <linux/quota.h>
1720 ((struct quotactl_ops *)0)->set_dqblk(NULL, *((struct kqid*)0), (struct qc_dqblk*)0);
1722 AC_DEFINE(HAVE_DQUOT_QC_DQBLK, 1,
1723 [quotactl_ops.set_dqblk takes struct qc_dqblk])
1724 AC_DEFINE(HAVE_DQUOT_KQID, 1,
1725 [quotactl_ops.set_dqblk takes struct kqid])
1727 EXTRA_KCFLAGS="$tmp_flags"
1728 ]) # LC_HAVE_DQUOT_QC_DQBLK
1731 # LC_BACKING_DEV_INFO_REMOVAL
1733 # 3.20 kernel removed backing_dev_info from address_space
1735 AC_DEFUN([LC_BACKING_DEV_INFO_REMOVAL], [
1736 LB_CHECK_COMPILE([if struct address_space has backing_dev_info],
1738 #include <linux/fs.h>
1740 struct address_space mapping;
1742 mapping.backing_dev_info = NULL;
1744 AC_DEFINE(HAVE_BACKING_DEV_INFO, 1, [backing_dev_info exist])
1746 ]) # LC_BACKING_DEV_INFO_REMOVAL
1749 # LC_HAVE_BDI_CAP_MAP_COPY
1751 # 3.20 removed mmap handling for backing devices since
1752 # it breaks on non-MMU systems. See kernel commit
1753 # b4caecd48005fbed3949dde6c1cb233142fd69e9
1755 AC_DEFUN([LC_HAVE_BDI_CAP_MAP_COPY], [
1756 LB_CHECK_COMPILE([if have 'BDI_CAP_MAP_COPY'],
1758 #include <linux/backing-dev.h>
1760 struct backing_dev_info info;
1762 info.capabilities = BDI_CAP_MAP_COPY;
1764 AC_DEFINE(HAVE_BDI_CAP_MAP_COPY, 1,
1765 [BDI_CAP_MAP_COPY exist])
1767 ]) # LC_HAVE_BDI_CAP_MAP_COPY
1772 # 4.1 kernel has iov_iter_rw
1774 AC_DEFUN([LC_IOV_ITER_RW], [
1775 LB_CHECK_COMPILE([if iov_iter_rw exist],
1777 #include <linux/fs.h>
1778 #include <linux/uio.h>
1780 struct iov_iter *iter = NULL;
1784 AC_DEFINE(HAVE_IOV_ITER_RW, 1,
1785 [iov_iter_rw exist])
1790 # LC_HAVE_SYNC_READ_WRITE
1792 # 4.1 new_sync_[read|write] no longer exported
1794 AC_DEFUN([LC_HAVE_SYNC_READ_WRITE], [
1795 LB_CHECK_EXPORT([new_sync_read], [fs/read_write.c],
1796 [AC_DEFINE(HAVE_SYNC_READ_WRITE, 1,
1797 [new_sync_[read|write] is exported by the kernel])])
1798 ]) # LC_HAVE_SYNC_READ_WRITE
1803 # 4.1 redefined bi_cnt as __bi_cnt in commit dac56212e8127dbc0
1805 AC_DEFUN([LC_HAVE___BI_CNT], [
1806 LB_CHECK_COMPILE([if Linux kernel has __bi_cnt in struct bio],
1808 #include <asm/atomic.h>
1809 #include <linux/bio.h>
1810 #include <linux/blk_types.h>
1812 struct bio bio = { };
1814 cnt = atomic_read(&bio.__bi_cnt);
1816 AC_DEFINE(HAVE___BI_CNT, 1,
1817 [struct bio has __bi_cnt])
1819 ]) # LC_HAVE___BI_CNT
1822 # LC_SYMLINK_OPS_USE_NAMEIDATA
1824 # For the 4.2+ kernels the file system internal symlink api no
1825 # longer uses struct nameidata as a argument
1827 AC_DEFUN([LC_SYMLINK_OPS_USE_NAMEIDATA], [
1828 LB_CHECK_COMPILE([if symlink inode operations have struct nameidata argument],
1829 symlink_use_nameidata, [
1830 #include <linux/namei.h>
1831 #include <linux/fs.h>
1833 struct nameidata *nd = NULL;
1835 ((struct inode_operations *)0)->follow_link(NULL, nd);
1836 ((struct inode_operations *)0)->put_link(NULL, nd, NULL);
1838 AC_DEFINE(HAVE_SYMLINK_OPS_USE_NAMEIDATA, 1,
1839 [symlink inode operations need struct nameidata argument])
1841 ]) # LC_SYMLINK_OPS_USE_NAMEIDATA
1844 # LC_BIO_ENDIO_USES_ONE_ARG
1846 # 4.2 kernel bio_endio now only takes one argument
1848 AC_DEFUN([LC_BIO_ENDIO_USES_ONE_ARG], [
1849 LB_CHECK_COMPILE([if 'bio_endio' with one argument exist],
1851 #include <linux/bio.h>
1855 AC_DEFINE(HAVE_BIO_ENDIO_USES_ONE_ARG, 1,
1856 [bio_endio takes only one argument])
1858 ]) # LC_BIO_ENDIO_USES_ONE_ARG
1861 # LC_HAVE_INTERVAL_EXP_BLK_INTEGRITY
1863 # 4.3 replace interval with interval_exp in 'struct blk_integrity'
1864 # 'struct blk_integrity_profile' is also added in this version,
1865 # thus use this to determine whether 'struct blk_integrity' has profile
1867 AC_DEFUN([LC_HAVE_INTERVAL_EXP_BLK_INTEGRITY], [
1868 LB_CHECK_COMPILE([if 'blk_integrity.interval_exp' exist],
1869 blk_integrity_interval_exp, [
1870 #include <linux/blkdev.h>
1872 ((struct blk_integrity *)0)->interval_exp = 0;
1874 AC_DEFINE(HAVE_INTERVAL_EXP_BLK_INTEGRITY, 1,
1875 [blk_integrity.interval_exp exist])
1877 ]) # LC_HAVE_INTERVAL_EXP_BLK_INTEGRITY
1880 # LC_HAVE_LOOP_CTL_GET_FREE
1882 # 4.x kernel have moved userspace APIs to
1883 # the separate directory and all of them
1884 # support LOOP_CTL_GET_FREE
1886 AC_DEFUN([LC_HAVE_LOOP_CTL_GET_FREE], [
1887 LB_CHECK_FILE([$LINUX/include/linux/loop.h], [
1888 LB_CHECK_COMPILE([if have 'HAVE_LOOP_CTL_GET_FREE'],
1889 LOOP_CTL_GET_FREE, [
1890 #include <linux/loop.h>
1894 i = LOOP_CTL_GET_FREE;
1896 AC_DEFINE(HAVE_LOOP_CTL_GET_FREE, 1,
1897 [LOOP_CTL_GET_FREE exist])
1900 AC_DEFINE(HAVE_LOOP_CTL_GET_FREE, 1,
1901 [kernel has LOOP_CTL_GET_FREE])
1903 ]) # LC_HAVE_LOOP_CTL_GET_FREE
1906 # LC_HAVE_CACHE_HEAD_HLIST
1908 # 4.3 kernel swiched to hlist for cache_head
1910 AC_DEFUN([LC_HAVE_CACHE_HEAD_HLIST], [
1911 LB_CHECK_COMPILE([if 'struct cache_head' has 'cache_list' field],
1912 cache_head_has_hlist, [
1913 #include <linux/sunrpc/cache.h>
1915 do {} while(sizeof(((struct cache_head *)0)->cache_list));
1917 AC_DEFINE(HAVE_CACHE_HEAD_HLIST, 1,
1918 [cache_head has hlist cache_list])
1920 ]) # LC_HAVE_CACHE_HEAD_HLIST
1923 # LC_HAVE_XATTR_HANDLER_SIMPLIFIED
1925 # Kernel version 4.3 commit e409de992e3ea3674393465f07cc71c948edd87a
1926 # simplified xattr_handler handling by passing in the handler pointer
1928 AC_DEFUN([LC_HAVE_XATTR_HANDLER_SIMPLIFIED], [
1929 tmp_flags="$EXTRA_KCFLAGS"
1930 EXTRA_KCFLAGS="-Werror"
1931 LB_CHECK_COMPILE([if 'struct xattr_handler' functions pass in handler pointer],
1932 xattr_handler_simplified, [
1933 #include <linux/xattr.h>
1935 struct xattr_handler handler;
1937 ((struct xattr_handler *)0)->get(&handler, NULL, NULL, NULL, 0);
1938 ((struct xattr_handler *)0)->set(&handler, NULL, NULL, NULL, 0, 0);
1940 AC_DEFINE(HAVE_XATTR_HANDLER_SIMPLIFIED, 1, [handler pointer is parameter])
1942 EXTRA_KCFLAGS="$tmp_flags"
1943 ]) # LC_HAVE_XATTR_HANDLER_SIMPLIFIED
1946 # LC_HAVE_BIP_ITER_BIO_INTEGRITY_PAYLOAD
1948 # 4.3 replace interval with interval_exp in 'struct blk_integrity'.
1950 AC_DEFUN([LC_HAVE_BIP_ITER_BIO_INTEGRITY_PAYLOAD], [
1951 LB_CHECK_COMPILE([if 'bio_integrity_payload.bip_iter' exist],
1952 bio_integrity_payload_bip_iter, [
1953 #include <linux/bio.h>
1955 ((struct bio_integrity_payload *)0)->bip_iter.bi_size = 0;
1957 AC_DEFINE(HAVE_BIP_ITER_BIO_INTEGRITY_PAYLOAD, 1,
1958 [bio_integrity_payload.bip_iter exist])
1960 ]) # LC_HAVE_BIP_ITER_BIO_INTEGRITY_PAYLOAD
1963 # LC_BIO_INTEGRITY_PREP_FN
1965 # Lustre kernel patch extents bio_integrity_prep to accept optional
1966 # generate/verify_fn as extra args.
1968 AC_DEFUN([LC_BIO_INTEGRITY_PREP_FN], [
1969 LB_CHECK_COMPILE([if 'bio_integrity_prep_fn' exists],
1970 bio_integrity_prep_fn, [
1971 #include <linux/bio.h>
1973 bio_integrity_prep_fn(NULL, NULL, NULL);
1975 AC_DEFINE(HAVE_BIO_INTEGRITY_PREP_FN, 1,
1976 [kernel has bio_integrity_prep_fn])
1977 AC_SUBST(PATCHED_INTEGRITY_INTF)
1979 AC_SUBST(PATCHED_INTEGRITY_INTF, [#])
1981 ]) # LC_BIO_INTEGRITY_PREP_FN
1986 # 4.4/4.8 redefined bi_rw as bi_opf (SLES12/kernel commit 4382e33ad37486)
1988 AC_DEFUN([LC_HAVE_BI_OPF], [
1989 LB_CHECK_COMPILE([if Linux kernel has bi_opf in struct bio],
1991 #include <linux/bio.h>
1997 AC_DEFINE(HAVE_BI_OPF, 1,
1998 [struct bio has bi_opf])
2003 # LC_HAVE_SUBMIT_BIO_2ARGS
2005 # 4.4 removed an argument from submit_bio
2007 AC_DEFUN([LC_HAVE_SUBMIT_BIO_2ARGS], [
2008 LB_CHECK_COMPILE([if submit_bio takes two arguments],
2009 have_submit_bio_2args, [
2010 #include <linux/bio.h>
2013 submit_bio(READ, &bio);
2015 AC_DEFINE(HAVE_SUBMIT_BIO_2ARGS, 1,
2016 [submit_bio takes two arguments])
2018 ]) # LC_HAVE_SUBMIT_BIO_2_ARGS
2021 # LC_HAVE_CLEAN_BDEV_ALIASES
2023 # 4.4/4.9 unmap_underlying_metadata was replaced by clean_bdev_aliases
2024 # (SLES12/kernel commit 29f3ad7d8380364c)
2026 AC_DEFUN([LC_HAVE_CLEAN_BDEV_ALIASES], [
2027 LB_CHECK_COMPILE([if kernel has clean_bdev_aliases],
2028 have_clean_bdev_aliases, [
2029 #include <linux/buffer_head.h>
2031 struct block_device bdev;
2032 clean_bdev_aliases(&bdev,1,1);
2034 AC_DEFINE(HAVE_CLEAN_BDEV_ALIASES, 1,
2035 [kernel has clean_bdev_aliases])
2037 ]) # LC_HAVE_CLEAN_BDEV_ALIASES
2040 # LC_HAVE_LOCKS_LOCK_FILE_WAIT
2042 # 4.4 kernel have moved locks API users to
2043 # locks_lock_inode_wait()
2045 AC_DEFUN([LC_HAVE_LOCKS_LOCK_FILE_WAIT], [
2046 LB_CHECK_COMPILE([if 'locks_lock_file_wait' exists],
2047 locks_lock_file_wait, [
2048 #include <linux/fs.h>
2050 locks_lock_file_wait(NULL, NULL);
2052 AC_DEFINE(HAVE_LOCKS_LOCK_FILE_WAIT, 1,
2053 [kernel has locks_lock_file_wait])
2055 ]) # LC_HAVE_LOCKS_LOCK_FILE_WAIT
2058 # LC_HAVE_KEY_PAYLOAD_DATA_ARRAY
2060 # 4.4 kernel merged type-specific data with the payload data for keys
2062 AC_DEFUN([LC_HAVE_KEY_PAYLOAD_DATA_ARRAY], [
2063 LB_CHECK_COMPILE([if 'struct key' has 'payload.data' as an array],
2064 key_payload_data_array, [
2065 #include <linux/key.h>
2067 struct key key = { };
2069 key.payload.data[0] = NULL;
2071 AC_DEFINE(HAVE_KEY_PAYLOAD_DATA_ARRAY, 1, [payload.data is an array])
2073 ]) #LC_HAVE_KEY_PAYLOAD_DATA_ARRAY
2076 # LC_HAVE_XATTR_HANDLER_NAME
2078 # Kernel version 4.4 commit 98e9cb5711c68223f0e4d5201b9a6add255ec550
2079 # add a name member to struct xattr_handler
2081 AC_DEFUN([LC_HAVE_XATTR_HANDLER_NAME], [
2082 tmp_flags="$EXTRA_KCFLAGS"
2083 EXTRA_KCFLAGS="-Werror"
2084 LB_CHECK_COMPILE([if 'struct xattr_handler' has a name member],
2085 xattr_handler_name, [
2086 #include <linux/xattr.h>
2088 ((struct xattr_handler *)NULL)->name = NULL;
2090 AC_DEFINE(HAVE_XATTR_HANDLER_NAME, 1, [xattr_handler has a name member])
2092 EXTRA_KCFLAGS="$tmp_flags"
2093 ]) # LC_HAVE_XATTR_HANDLER_NAME
2096 # LC_HAVE_FILE_DENTRY
2098 # 4.5 adds wrapper file_dentry
2100 AC_DEFUN([LC_HAVE_FILE_DENTRY], [
2101 LB_CHECK_COMPILE([if Linux kernel has 'file_dentry'],
2103 #include <linux/fs.h>
2107 AC_DEFINE(HAVE_FILE_DENTRY, 1,
2108 [kernel has file_dentry])
2110 ]) # LC_HAVE_FILE_DENTRY
2113 # LC_HAVE_INODE_LOCK
2115 # 4.5 introduced inode_lock
2117 AC_DEFUN([LC_HAVE_INODE_LOCK], [
2118 LB_CHECK_COMPILE([if 'inode_lock' is defined],
2120 #include <linux/fs.h>
2124 AC_DEFINE(HAVE_INODE_LOCK, 1,
2125 [inode_lock is defined])
2127 ]) # LC_HAVE_INODE_LOCK
2130 # LC_HAVE_IOP_GET_LINK
2132 # 4.5 vfs replaced iop->follow_link with
2135 AC_DEFUN([LC_HAVE_IOP_GET_LINK], [
2136 LB_CHECK_COMPILE([if 'iop' has 'get_link'],
2137 inode_ops_get_link, [
2138 #include <linux/fs.h>
2140 struct inode_operations iop;
2141 iop.get_link = NULL;
2143 AC_DEFINE(HAVE_IOP_GET_LINK, 1,
2144 [have iop get_link])
2146 ]) # LC_HAVE_IOP_GET_LINK
2149 # LC_HAVE_IN_COMPAT_SYSCALL
2151 # 4.6 renamed is_compat_task to in_compat_syscall
2153 AC_DEFUN([LC_HAVE_IN_COMPAT_SYSCALL], [
2154 LB_CHECK_COMPILE([if 'in_compat_syscall' is defined],
2155 in_compat_syscall, [
2156 #include <linux/compat.h>
2158 in_compat_syscall();
2160 AC_DEFINE(HAVE_IN_COMPAT_SYSCALL, 1,
2161 [have in_compat_syscall])
2163 ]) # LC_HAVE_IN_COMPAT_SYSCALL
2166 # LC_HAVE_XATTR_HANDLER_INODE_PARAM
2168 # Kernel version 4.6 commit b296821a7c42fa58baa17513b2b7b30ae66f3336
2169 # and commit 5930122683dff58f0846b0f0405b4bd598a3ba6a added inode parameter
2170 # to xattr_handler functions
2172 AC_DEFUN([LC_HAVE_XATTR_HANDLER_INODE_PARAM], [
2173 tmp_flags="$EXTRA_KCFLAGS"
2174 EXTRA_KCFLAGS="-Werror"
2175 LB_CHECK_COMPILE([if 'struct xattr_handler' functions have inode parameter],
2176 xattr_handler_inode_param, [
2177 #include <linux/xattr.h>
2179 const struct xattr_handler handler;
2181 ((struct xattr_handler *)0)->get(&handler, NULL, NULL, NULL, NULL, 0);
2182 ((struct xattr_handler *)0)->set(&handler, NULL, NULL, NULL, NULL, 0, 0);
2184 AC_DEFINE(HAVE_XATTR_HANDLER_INODE_PARAM, 1, [needs inode parameter])
2186 EXTRA_KCFLAGS="$tmp_flags"
2187 ]) # LC_HAVE_XATTR_HANDLER_INODE_PARAM
2192 # Kernel version 4.6 commit 85c7f81041d57cfe9dc97f4680d5586b54534a39
2193 # introduced parallel lookups in the VFS layer. The inline function
2194 # d_in_lookup was added to notify when the same item was being queried
2197 AC_DEFUN([LC_D_IN_LOOKUP], [
2198 tmp_flags="$EXTRA_KCFLAGS"
2199 EXTRA_KCFLAGS="-Werror"
2200 LB_CHECK_COMPILE([if 'd_in_lookup' is defined],
2202 #include <linux/dcache.h>
2206 AC_DEFINE(HAVE_D_IN_LOOKUP, 1, [d_in_lookup is defined])
2208 EXTRA_KCFLAGS="$tmp_flags"
2214 # Kernel version 4.7 commit c8b8e32d700fe943a935e435ae251364d016c497
2215 # direct-io: eliminate the offset argument to ->direct_IO
2217 AC_DEFUN([LC_DIRECTIO_2ARGS], [
2218 LB_CHECK_COMPILE([if '->direct_IO()' taken 2 arguments],
2220 #include <linux/fs.h>
2222 struct address_space_operations ops = { };
2223 struct iov_iter *iter = NULL;
2224 struct kiocb *iocb = NULL;
2227 rc = ops.direct_IO(iocb, iter);
2229 AC_DEFINE(HAVE_DIRECTIO_2ARGS, 1,
2230 [direct_IO need 2 arguments])
2232 ]) # LC_DIRECTIO_2ARGS
2235 # LC_GENERIC_WRITE_SYNC_2ARGS
2237 # Kernel version 4.7 commit dde0c2e79848298cc25621ad080d47f94dbd7cce
2238 # fs: add IOCB_SYNC and IOCB_DSYNC
2240 AC_DEFUN([LC_GENERIC_WRITE_SYNC_2ARGS], [
2241 LB_CHECK_COMPILE([if 'generic_write_sync()' taken 2 arguments],
2242 generic_write_sync_2args, [
2243 #include <linux/fs.h>
2245 struct kiocb *iocb = NULL;
2248 rc = generic_write_sync(iocb, 0);
2250 AC_DEFINE(HAVE_GENERIC_WRITE_SYNC_2ARGS, 1,
2251 [generic_write_sync need 2 arguments])
2253 ]) # LC_GENERIC_WRITE_SYNC_2ARGS
2256 # LC_FOP_ITERATE_SHARED
2258 # Kernel version 4.7 adds iterate_shared method to file_operations
2260 AC_DEFUN([LC_FOP_ITERATE_SHARED], [
2261 LB_CHECK_COMPILE([if 'file_operations' has 'iterate_shared'],
2262 fop_iterate_shared, [
2263 #include <linux/fs.h>
2265 struct file_operations fop;
2266 fop.iterate_shared = NULL;
2268 AC_DEFINE(HAVE_FOP_ITERATE_SHARED, 1,
2269 [file_operations has iterate_shared])
2271 ]) # LC_FOP_ITERATE_SHARED
2274 # LC_FOPS_ITERATE_SHARED
2276 # 4.7 commit ae05327a00fd47c34dfe25294b359a3f3fef96e8
2277 # ext4: switch to ->iterate_shared()
2278 # this replaces ext4_dir_operations iterate with iterate_shared.
2279 # dir_relaxed_shared() was also added in this commit, so we can
2280 # use that function to verify that the ext4_dir_operations is using
2283 AC_DEFUN([LC_FOPS_ITERATE_SHARED], [
2284 LB_CHECK_COMPILE([if ext4_dir_operations uses iterate_shared],
2286 #include <linux/fs.h>
2288 ((struct file_operations *)0)->iterate_shared(NULL, NULL);
2289 dir_relax_shared(NULL);
2291 AC_DEFINE(HAVE_ITERATE_SHARED, 1,
2292 ['iterate_shared' is available])
2294 ]) # LC_FOPS_ITERATE_SHARED
2297 # LC_HAVE_POSIX_ACL_VALID_USER_NS
2299 # 4.8 posix_acl_valid takes struct user_namespace
2301 AC_DEFUN([LC_HAVE_POSIX_ACL_VALID_USER_NS], [
2302 LB_CHECK_COMPILE([if 'posix_acl_valid' takes 'struct user_namespace'],
2304 #include <linux/fs.h>
2305 #include <linux/posix_acl.h>
2307 posix_acl_valid((struct user_namespace*)NULL, (const struct posix_acl*)NULL);
2309 AC_DEFINE(HAVE_POSIX_ACL_VALID_USER_NS, 1,
2310 [posix_acl_valid takes struct user_namespace])
2312 ]) # LC_HAVE_POSIX_ACL_VALID_USER_NS
2315 # LC_D_COMPARE_4ARGS
2317 # Kernel version 4.8 commit 6fa67e707559303e086303aeecc9e8b91ef497d5
2318 # get rid of 'parent' argument of ->d_compare()
2320 AC_DEFUN([LC_D_COMPARE_4ARGS], [
2321 LB_CHECK_COMPILE([if 'd_compare' taken 4 arguments],
2323 #include <linux/dcache.h>
2325 ((struct dentry_operations*)0)->d_compare(NULL,0,NULL,NULL);
2327 AC_DEFINE(HAVE_D_COMPARE_4ARGS, 1,
2328 [d_compare need 4 arguments])
2330 ]) # LC_D_COMPARE_4ARGS
2333 # LC_FULL_NAME_HASH_3ARGS
2335 # Kernel version 4.8 commit 8387ff2577eb9ed245df9a39947f66976c6bcd02
2336 # vfs: make the string hashes salt the hash
2338 AC_DEFUN([LC_FULL_NAME_HASH_3ARGS], [
2339 LB_CHECK_COMPILE([if 'full_name_hash' taken 3 arguments],
2340 full_name_hash_3args, [
2341 #include <linux/stringhash.h>
2344 hash = full_name_hash(NULL,NULL,0);
2346 AC_DEFINE(HAVE_FULL_NAME_HASH_3ARGS, 1,
2347 [full_name_hash need 3 arguments])
2349 ]) # LC_FULL_NAME_HASH_3ARGS
2352 # LC_STRUCT_POSIX_ACL_XATTR
2354 # Kernel version 4.8 commit 2211d5ba5c6c4e972ba6dbc912b2897425ea6621
2355 # posix_acl: xattr representation cleanups
2357 AC_DEFUN([LC_STRUCT_POSIX_ACL_XATTR], [
2358 LB_CHECK_COMPILE([if 'struct posix_acl_xattr_{header,entry}' defined],
2359 struct_posix_acl_xattr, [
2360 #include <linux/fs.h>
2361 #include <linux/posix_acl_xattr.h>
2363 struct posix_acl_xattr_header *h = NULL;
2364 struct posix_acl_xattr_entry *e;
2365 e = (void *)(h + 1);
2367 AC_DEFINE(HAVE_STRUCT_POSIX_ACL_XATTR, 1,
2368 [struct posix_acl_xattr_{header,entry} defined])
2370 ]) # LC_STRUCT_POSIX_ACL_XATTR
2375 # Kernel version 4.8 commit fd50ecaddf8372a1d96e0daeaac0f93cf04e4d42
2376 # removed {get,set,remove}xattr inode operations
2378 AC_DEFUN([LC_IOP_XATTR], [
2379 LB_CHECK_COMPILE([if 'inode_operations' has {get,set,remove}xattr members],
2381 #include <linux/fs.h>
2383 struct inode_operations iop;
2384 iop.setxattr = NULL;
2385 iop.getxattr = NULL;
2386 iop.removexattr = NULL;
2388 AC_DEFINE(HAVE_IOP_XATTR, 1,
2389 [inode_operations has {get,set,remove}xattr members])
2396 # Kernel version 4.9 commit 81243eacfa400f5f7b89f4c2323d0de9982bb0fb
2397 # cred: simpler, 1D supplementary groups
2399 AC_DEFUN([LC_GROUP_INFO_GID], [
2400 LB_CHECK_COMPILE([if 'struct group_info' has member 'gid'],
2402 #include <linux/cred.h>
2405 p = ((struct group_info *)0)->gid;
2407 AC_DEFINE(HAVE_GROUP_INFO_GID, 1,
2408 [struct group_info has member gid])
2410 ]) # LC_GROUP_INFO_GID
2415 # Kernel version 4.9 commit 5d6c31910bc0713e37628dc0ce677dcb13c8ccf4
2416 # added __vfs_{get,set,remove}xattr helpers
2418 AC_DEFUN([LC_VFS_SETXATTR], [
2419 LB_CHECK_COMPILE([if '__vfs_setxattr' helper is available],
2421 #include <linux/xattr.h>
2423 __vfs_setxattr(NULL, NULL, NULL, NULL, 0, 0);
2425 AC_DEFINE(HAVE_VFS_SETXATTR, 1,
2426 ['__vfs_setxattr is available])
2428 ]) # LC_VFS_SETXATTR
2431 # LC_POSIX_ACL_UPDATE_MODE
2433 # Kernel version 4.9 commit 073931017b49d9458aa351605b43a7e34598caef
2434 # posix_acl: Clear SGID bit when setting file permissions
2436 AC_DEFUN([LC_POSIX_ACL_UPDATE_MODE], [
2437 LB_CHECK_COMPILE([if 'posix_acl_update_mode' exists],
2438 posix_acl_update_mode, [
2439 #include <linux/fs.h>
2440 #include <linux/posix_acl.h>
2442 posix_acl_update_mode(NULL, NULL, NULL);
2444 AC_DEFINE(HAVE_POSIX_ACL_UPDATE_MODE, 1,
2445 ['posix_acl_update_mode' is available])
2447 ]) # LC_POSIX_ACL_UPDATE_MODE
2450 # LC_IOP_GENERIC_READLINK
2452 # Kernel version 4.10 commit dfeef68862edd7d4bafe68ef7aeb5f658ef24bb5
2453 # removed generic_readlink from individual file systems
2455 AC_DEFUN([LC_IOP_GENERIC_READLINK], [
2456 LB_CHECK_COMPILE([if 'generic_readlink' still exist],
2457 inode_ops_readlink, [
2458 #include <linux/fs.h>
2460 struct inode_operations iop;
2461 iop.readlink = generic_readlink;
2463 AC_DEFINE(HAVE_IOP_GENERIC_READLINK, 1,
2464 [generic_readlink has been removed])
2466 ]) # LC_IOP_GENERIC_READLINK
2469 # LC_HAVE_VM_FAULT_ADDRESS
2471 # Kernel version 4.10 commit 1a29d85eb0f19b7d8271923d8917d7b4f5540b3e
2472 # removed virtual_address field. Need to use address field instead
2474 AC_DEFUN([LC_HAVE_VM_FAULT_ADDRESS], [
2475 LB_CHECK_COMPILE([if 'struct vm_fault' replaced virtual_address with address field],
2477 #include <linux/mm.h>
2479 struct vm_fault vmf;
2482 AC_DEFINE(HAVE_VM_FAULT_ADDRESS, 1,
2483 [virtual_address has been replaced by address field])
2485 ]) # LC_HAVE_VM_FAULT_ADDRESS
2488 # LC_INODEOPS_ENHANCED_GETATTR
2490 # Kernel version 4.11 commit a528d35e8bfcc521d7cb70aaf03e1bd296c8493f
2491 # expanded getattr to be able to get more stat information.
2493 AC_DEFUN([LC_INODEOPS_ENHANCED_GETATTR], [
2494 LB_CHECK_COMPILE([if 'inode_operations' getattr member can gather advance stats],
2496 #include <linux/fs.h>
2500 ((struct inode_operations *)1)->getattr(&path, NULL, 0, 0);
2502 AC_DEFINE(HAVE_INODEOPS_ENHANCED_GETATTR, 1,
2503 [inode_operations .getattr member function can gather advance stats])
2505 ]) # LC_INODEOPS_ENHANCED_GETATTR
2508 # LC_VM_OPERATIONS_REMOVE_VMF_ARG
2510 # Kernel version 4.11 commit 11bac80004499ea59f361ef2a5516c84b6eab675
2511 # removed struct vm_area_struct as an argument for vm_operations since
2512 # in the same kernel version struct vma_area_struct was folded into
2515 AC_DEFUN([LC_VM_OPERATIONS_REMOVE_VMF_ARG], [
2516 LB_CHECK_COMPILE([if 'struct vm_operations' removed struct vm_area_struct],
2517 vm_operations_no_vm_area_struct, [
2518 #include <linux/mm.h>
2520 struct vm_fault vmf;
2522 ((struct vm_operations_struct *)0)->fault(&vmf);
2523 ((struct vm_operations_struct *)0)->page_mkwrite(&vmf);
2525 AC_DEFINE(HAVE_VM_OPS_USE_VM_FAULT_ONLY, 1,
2526 ['struct vm_operations' remove struct vm_area_struct argument])
2528 ]) # LC_VM_OPERATIONS_REMOVE_VMF_ARG
2531 # LC_HAVE_KEY_USAGE_REFCOUNT
2533 # Kernel version 4.11 commit fff292914d3a2f1efd05ca71c2ba72a3c663201e
2534 # converted key.usage from atomic_t to refcount_t.
2536 AC_DEFUN([LC_HAVE_KEY_USAGE_REFCOUNT], [
2537 LB_CHECK_COMPILE([if 'key.usage' is refcount_t],
2538 key_usage_refcount, [
2539 #include <linux/key.h>
2541 struct key key = { };
2543 refcount_read(&key.usage);
2545 AC_DEFINE(HAVE_KEY_USAGE_REFCOUNT, 1, [key.usage is of type refcount_t])
2547 ]) #LC_HAVE_KEY_USAGE_REFCOUNT
2550 # LC_HAVE_CRYPTO_MAX_ALG_NAME_128
2552 # Kernel version 4.11 commit f437a3f477cce402dbec6537b29e9e33962c9f73
2553 # switched CRYPTO_MAX_ALG_NAME from 64 to 128.
2555 AC_DEFUN([LC_HAVE_CRYPTO_MAX_ALG_NAME_128], [
2556 LB_CHECK_COMPILE([if 'CRYPTO_MAX_ALG_NAME' is 128],
2557 crypto_max_alg_name, [
2558 #include <linux/crypto.h>
2560 #if CRYPTO_MAX_ALG_NAME != 128
2564 AC_DEFINE(HAVE_CRYPTO_MAX_ALG_NAME_128, 1,
2565 ['CRYPTO_MAX_ALG_NAME' is 128])
2567 ]) # LC_HAVE_CRYPTO_MAX_ALG_NAME_128
2570 # Kernel version 4.12 commit 47f38c539e9a42344ff5a664942075bd4df93876
2571 # CURRENT_TIME is not 64 bit time safe so it was replaced with
2574 AC_DEFUN([LC_CURRENT_TIME], [
2575 LB_CHECK_COMPILE([if CURRENT_TIME has been replaced with current_time],
2577 #include <linux/fs.h>
2581 attr.ia_atime = current_time(NULL);
2583 AC_DEFINE(HAVE_CURRENT_TIME, 1,
2584 [current_time() has replaced CURRENT_TIME])
2586 ]) # LIBCFS_CURRENT_TIME
2589 # Kernel version 4.12-rc3 85787090a21eb749d8b347eaf9ff1a455637473c
2590 # changed struct super_block s_uuid into a proper uuid_t
2592 AC_DEFUN([LC_SUPER_BLOCK_S_UUID], [
2593 LB_CHECK_COMPILE([if 'struct super_block' s_uuid is uuid_t],
2594 super_block_s_uuid, [
2595 #include <linux/fs.h>
2597 struct super_block sb;
2599 uuid_parse(NULL, &sb.s_uuid);
2601 AC_DEFINE(HAVE_S_UUID_AS_UUID_T, 1, ['s_uuid' is an uuid_t])
2603 ]) # LC_SUPER_BLOCK_S_UUID
2606 # LC_SUPER_SETUP_BDI_NAME
2608 # Kernel version 4.12 commit 9594caf216dc0fe3e318b34af0127276db661241
2609 # unified bdi handling
2611 AC_DEFUN([LC_SUPER_SETUP_BDI_NAME], [
2612 LB_CHECK_COMPILE([if 'super_setup_bdi_name' exist],
2613 super_setup_bdi_name, [
2614 #include <linux/fs.h>
2616 super_setup_bdi_name(NULL, "lustre");
2618 AC_DEFINE(HAVE_SUPER_SETUP_BDI_NAME, 1,
2619 ['super_setup_bdi_name' is available])
2621 ]) # LC_SUPER_SETUP_BDI_NAME
2626 # 4.12 replace bi_error to bi_status
2628 AC_DEFUN([LC_BI_STATUS], [
2629 LB_CHECK_COMPILE([if 'bi_status' exist],
2631 #include <linux/blk_types.h>
2633 ((struct bio *)0)->bi_status = 0;
2635 AC_DEFINE(HAVE_BI_STATUS, 1,
2636 ['bi_status' is available])
2641 # LC_UAPI_LINUX_MOUNT_H
2643 # kernel 4.20 commit e262e32d6bde0f77fb0c95d977482fc872c51996
2644 # vfs: Suppress MS_* flag defs within the kernel ...
2646 AC_DEFUN([LC_UAPI_LINUX_MOUNT_H], [
2647 tmp_flags="$EXTRA_KCFLAGS"
2648 EXTRA_KCFLAGS="-Werror"
2649 LB_CHECK_COMPILE([if MS_RDONLY was moved to uapi/linux/mount.h],
2651 #include <uapi/linux/mount.h>
2656 AC_DEFINE(HAVE_UAPI_LINUX_MOUNT_H, 1,
2657 [if MS_RDONLY was moved to uapi/linux/mount.h])
2659 EXTRA_KCFLAGS="$tmp_flags"
2660 ]) # LC_UAPI_LINUX_MOUNT_H
2663 # LC_HAVE_SUNRPC_CACHE_HASH_LOCK_IS_A_SPINLOCK
2665 # kernel 4.20 commit 1863d77f15da0addcd293a1719fa5d3ef8cde3ca
2666 # SUNRPC: Replace the cache_detail->hash_lock with a regular spinlock
2668 # Now that the reader functions are all RCU protected, use a regular
2669 # spinlock rather than a reader/writer lock.
2671 AC_DEFUN([LC_HAVE_SUNRPC_CACHE_HASH_LOCK_IS_A_SPINLOCK], [
2672 tmp_flags="$EXTRA_KCFLAGS"
2673 EXTRA_KCFLAGS="-Werror"
2674 LB_CHECK_COMPILE([if cache_detail->hash_lock is a spinlock],
2675 hash_lock_isa_spinlock_t, [
2676 #include <linux/sunrpc/cache.h>
2678 spinlock_t *lock = &(((struct cache_detail *)0)->hash_lock);
2681 AC_DEFINE(HAVE_CACHE_HASH_SPINLOCK, 1,
2682 [if cache_detail->hash_lock is a spinlock])
2684 EXTRA_KCFLAGS="$tmp_flags"
2685 ]) # LC_HAVE_SUNRPC_CACHE_HASH_LOCK_IS_A_SPINLOCK
2688 # LC_BIO_INTEGRITY_ENABLED
2690 # 4.13 removed bio_integrity_enabled
2692 AC_DEFUN([LC_BIO_INTEGRITY_ENABLED], [
2693 LB_CHECK_COMPILE([if 'bio_integrity_enabled' exist],
2694 bio_integrity_enabled, [
2695 #include <linux/bio.h>
2697 bio_integrity_enabled(NULL);
2699 AC_DEFINE(HAVE_BIO_INTEGRITY_ENABLED, 1,
2700 ['bio_integrity_enabled' is available])
2702 ]) # LC_BIO_INTEGRITY_ENABLED
2705 # LC_PAGEVEC_INIT_ONE_PARAM
2707 # 4.14 pagevec_init takes one parameter
2709 AC_DEFUN([LC_PAGEVEC_INIT_ONE_PARAM], [
2710 LB_CHECK_COMPILE([if 'pagevec_init' takes one parameter],
2712 #include <linux/pagevec.h>
2716 AC_DEFINE(HAVE_PAGEVEC_INIT_ONE_PARAM, 1,
2717 ['pagevec_init' takes one parameter])
2719 ]) # LC_PAGEVEC_INIT_ONE_PARAM
2724 # 4.14 replaced bi_bdev to bi_disk
2726 AC_DEFUN([LC_BI_BDEV], [
2727 LB_CHECK_COMPILE([if 'bi_bdev' exist],
2729 #include <linux/bio.h>
2731 ((struct bio *)0)->bi_bdev = NULL;
2733 AC_DEFINE(HAVE_BI_BDEV, 1,
2734 ['bi_bdev' is available])
2741 # kernel 4.17 commit b93b016313b3ba8003c3b8bb71f569af91f19fc7
2743 AC_DEFUN([LC_I_PAGES], [
2744 LB_CHECK_COMPILE([if struct address_space has i_pages],
2746 #include <linux/fs.h>
2748 struct address_space mapping = {};
2751 i_pages = &mapping.i_pages;
2753 AC_DEFINE(HAVE_I_PAGES, 1,
2754 [struct address_space has i_pages])
2761 # kernel 4.17 commit 3d3539018d2cbd12e5af4a132636ee7fd8d43ef0
2762 # mm: create the new vm_fault_t type
2764 AC_DEFUN([LC_VM_FAULT_T], [
2765 LB_CHECK_COMPILE([if vm_fault_t type exists],
2767 #include <linux/mm_types.h>
2769 vm_fault_t x = VM_FAULT_SIGBUS;
2772 AC_DEFINE(HAVE_VM_FAULT_T, 1,
2773 [if vm_fault_t type exists])
2778 # LC_INODE_TIMESPEC64
2780 # kernel 4.17-rc7 commit 8efd6894ff089adeeac7cb9f32125b85d963d1bc
2781 # fs: add timespec64_truncate()
2782 # kernel 4.18 commit 95582b00838837fc07e042979320caf917ce3fe6
2783 # inode timestamps switched to timespec64
2784 # kernel 4.19-rc2 commit 976516404ff3fab2a8caa8bd6f5efc1437fed0b8
2785 # y2038: remove unused time interfaces
2789 # When inode times are timespec64 stop using the deprecated
2792 AC_DEFUN([LC_INODE_TIMESPEC64], [
2793 tmp_flags="$EXTRA_KCFLAGS"
2794 EXTRA_KCFLAGS="-Werror"
2795 LB_CHECK_COMPILE([if inode timestamps are struct timespec64],
2797 #include <linux/fs.h>
2799 struct inode inode = {};
2800 struct timespec64 ts = {};
2802 inode.i_atime = timespec64_trunc(ts, 1);
2805 AC_DEFINE(HAVE_INODE_TIMESPEC64, 1,
2806 [inode times are using timespec64])
2808 EXTRA_KCFLAGS="$tmp_flags"
2809 ]) # LC_INODE_TIMESPEC64
2812 # LC_HAS_LINUX_SELINUX_ENABLED
2814 # kernel 5.1 commit 3d252529480c68bfd6a6774652df7c8968b28e41
2815 # SELinux: Remove unused selinux_is_enabled
2817 AC_DEFUN([LC_HAS_LINUX_SELINUX_ENABLED], [
2818 tmp_flags="$EXTRA_KCFLAGS"
2819 EXTRA_KCFLAGS="-Werror"
2820 LB_CHECK_COMPILE([if linux/selinux.h exists],
2821 selinux_is_enabled, [
2822 #include <linux/selinux.h>
2824 bool has_selinux = selinux_is_enabled();
2827 AC_DEFINE(HAVE_LINUX_SELINUX_IS_ENABLED, 1,
2828 [if linux/selinux.h exists])
2830 EXTRA_KCFLAGS="$tmp_flags"
2831 ]) # LC_HAS_LINUX_SELINUX_ENABLED
2834 # LC_BIO_BI_PHYS_SEGMENTS
2836 # kernel 5.3-rc1 commit 14ccb66b3f585b2bc21e7256c96090abed5a512c
2837 # block: remove the bi_phys_segments field in struct bio
2839 AC_DEFUN([LC_BIO_BI_PHYS_SEGMENTS], [
2840 tmp_flags="$EXTRA_KCFLAGS"
2841 EXTRA_KCFLAGS="-Werror"
2842 LB_CHECK_COMPILE([if struct bio has bi_phys_segments member],
2843 bye_bio_bi_phys_segments, [
2844 #include <linux/bio.h>
2846 struct bio *bio = NULL;
2847 bio->bi_phys_segments++;
2849 AC_DEFINE(HAVE_BIO_BI_PHYS_SEGMENTS, 1,
2850 [struct bio has bi_phys_segments member])
2852 EXTRA_KCFLAGS="$tmp_flags"
2853 ]) # LC_BIO_BI_PHYS_SEGMENTS
2856 # LC_LM_COMPARE_OWNER_EXISTS
2858 # kernel 5.3-rc3 commit f85d93385e9fe6886a751f647f6812a89bf6bee3
2859 # locks: Cleanup lm_compare_owner and lm_owner_key
2860 # removed lm_compare_owner
2862 AC_DEFUN([LC_LM_COMPARE_OWNER_EXISTS], [
2863 tmp_flags="$EXTRA_KCFLAGS"
2864 EXTRA_KCFLAGS="-Werror"
2865 LB_CHECK_COMPILE([if lock_manager_operations has lm_compare_owner],
2866 lock_manager_ops_lm_compare_owner, [
2867 #include <linux/fs.h>
2869 struct lock_manager_operations lm_ops;
2870 lm_ops.lm_compare_owner = NULL;
2872 AC_DEFINE(HAVE_LM_COMPARE_OWNER, 1,
2873 [lock_manager_operations has lm_compare_owner])
2875 EXTRA_KCFLAGS="$tmp_flags"
2876 ]) # LC_LM_COMPARE_OWNER_EXISTS
2881 # Lustre linux kernel checks
2883 AC_DEFUN([LC_PROG_LINUX], [
2884 AC_MSG_NOTICE([Lustre kernel checks
2885 ==============================================================================])
2890 LC_CONFIG_HEALTH_CHECK_WRITE
2891 LC_CONFIG_LRU_RESIZE
2893 LC_GLIBC_SUPPORT_FHANDLES
2899 LC_HAVE_FHANDLE_SYSCALLS
2900 LC_HAVE_FSTYPE_MOUNT
2901 LC_HAVE_INODE_OWNER_OR_CAPABLE
2902 LC_HAVE_SECURITY_IINITSEC
2903 LC_VFS_CREATE_USE_NAMEIDATA
2906 LC_DIRTY_INODE_WITH_FLAG
2910 LC_LM_XXX_LOCK_MANAGER_OPS
2914 LC_INODE_PERMISION_2ARGS
2915 LC_RADIX_EXCEPTION_ENTRY
2916 LC_HAVE_LOOP_CTL_GET_FREE
2919 LC_HAVE_PROTECT_I_NLINK
2922 LC_HAVE_MIGRATE_HEADER
2923 LC_MIGRATEPAGE_4ARGS
2924 LC_SUPEROPS_USE_DENTRY
2925 LC_INODEOPS_USE_UMODE_T
2926 LC_HAVE_CACHE_REGISTER
2930 LC_KMAP_ATOMIC_HAS_1ARG
2934 LC_HAVE_ENCODE_FH_PARENT
2935 LC_FILE_LLSEEK_SIZE_5ARG
2938 LC_DATA_FOR_LLITE_IS_LIST
2939 LC_DENTRY_OPEN_USE_PATH
2940 LC_HAVE_IOP_ATOMIC_OPEN
2941 LC_HAVE_SB_START_WRITE
2944 LC_HAVE_POSIXACL_USER_NS
2947 LC_HAVE_FILE_F_INODE
2949 LC_HAVE_SUNRPC_UPCALL_HAS_3ARGS
2952 LC_HAVE_HLIST_FOR_EACH_3ARG
2953 LC_HAVE_BIO_END_SECTOR
2955 LC_HAVE_VFS_GETATTR_2ARGS
2958 LC_HAVE_REMOVE_PROC_SUBTREE
2960 LC_HAVE_PROJECT_QUOTA
2961 LC_HAVE_SECURITY_DENTRY_INIT_SECURITY
2962 LC_HAVE_SECURITY_INODE_LISTSECURITY
2969 LC_HAVE_DENTRY_D_U_D_ALIAS
2970 LC_HAVE_DENTRY_D_CHILD
2971 LC_PID_NS_FOR_CHILDREN
2974 LC_OLDSIZE_TRUNCATE_PAGECACHE
2975 LC_PTR_ERR_OR_ZERO_MISSING
2977 LC_INIT_LIST_HEAD_RCU
2982 LC_HAVE_D_IS_POSITIVE
2986 LC_HAVE_TRUNCATE_IPAGES_FINAL
2987 LC_IOPS_RENAME_WITH_FLAGS
2994 LC_DIRECTIO_USE_ITER
2995 LC_HAVE_IOV_ITER_INIT_DIRECTION
2996 LC_HAVE_IOV_ITER_TRUNCATE
2997 LC_HAVE_FILE_OPERATIONS_READ_WRITE_ITER
3000 LC_HAVE_INTERVAL_BLK_INTEGRITY
3004 LC_PERCPU_COUNTER_INIT
3005 LC_NFS_FILLDIR_USE_CTX
3009 LC_HAVE_DQUOT_QC_DQBLK
3012 LC_BACKING_DEV_INFO_REMOVAL
3013 LC_HAVE_BDI_CAP_MAP_COPY
3017 LC_HAVE_SYNC_READ_WRITE
3021 LC_BIO_ENDIO_USES_ONE_ARG
3022 LC_SYMLINK_OPS_USE_NAMEIDATA
3025 LC_HAVE_INTERVAL_EXP_BLK_INTEGRITY
3026 LC_HAVE_BIP_ITER_BIO_INTEGRITY_PAYLOAD
3027 LC_HAVE_CACHE_HEAD_HLIST
3028 LC_HAVE_XATTR_HANDLER_SIMPLIFIED
3031 LC_HAVE_LOCKS_LOCK_FILE_WAIT
3032 LC_HAVE_KEY_PAYLOAD_DATA_ARRAY
3033 LC_HAVE_XATTR_HANDLER_NAME
3035 LC_HAVE_SUBMIT_BIO_2ARGS
3036 LC_HAVE_CLEAN_BDEV_ALIASES
3043 LC_HAVE_IOP_GET_LINK
3046 LC_HAVE_IN_COMPAT_SYSCALL
3047 LC_HAVE_XATTR_HANDLER_INODE_PARAM
3052 LC_GENERIC_WRITE_SYNC_2ARGS
3053 LC_FOPS_ITERATE_SHARED
3056 LC_HAVE_POSIX_ACL_VALID_USER_NS
3058 LC_FULL_NAME_HASH_3ARGS
3059 LC_STRUCT_POSIX_ACL_XATTR
3065 LC_POSIX_ACL_UPDATE_MODE
3068 LC_IOP_GENERIC_READLINK
3069 LC_HAVE_VM_FAULT_ADDRESS
3072 LC_INODEOPS_ENHANCED_GETATTR
3073 LC_VM_OPERATIONS_REMOVE_VMF_ARG
3074 LC_HAVE_KEY_USAGE_REFCOUNT
3075 LC_HAVE_CRYPTO_MAX_ALG_NAME_128
3079 LC_SUPER_BLOCK_S_UUID
3080 LC_SUPER_SETUP_BDI_NAME
3084 LC_BIO_INTEGRITY_ENABLED
3087 LC_PAGEVEC_INIT_ONE_PARAM
3098 LC_HAVE_SUNRPC_CACHE_HASH_LOCK_IS_A_SPINLOCK
3101 LC_UAPI_LINUX_MOUNT_H
3104 LC_HAS_LINUX_SELINUX_ENABLED
3107 LC_BIO_BI_PHYS_SEGMENTS
3108 LC_LM_COMPARE_OWNER_EXISTS
3110 # kernel patch to extend integrity interface
3111 LC_BIO_INTEGRITY_PREP_FN
3114 AS_IF([test "x$enable_server" != xno], [
3123 # Check whether to build the client side of Lustre
3125 AC_DEFUN([LC_CONFIG_CLIENT], [
3126 AC_MSG_CHECKING([whether to build Lustre client support])
3127 AC_ARG_ENABLE([client],
3128 AC_HELP_STRING([--disable-client],
3129 [disable Lustre client support]),
3130 [], [enable_client="yes"])
3131 AC_MSG_RESULT([$enable_client])
3132 ]) # LC_CONFIG_CLIENT
3137 AC_DEFUN([LB_CONFIG_MPITESTS], [
3138 AC_ARG_ENABLE([mpitests],
3139 AC_HELP_STRING([--enable-mpitests=<yes|no|mpicc wrapper>],
3140 [include mpi tests]), [
3141 enable_mpitests="yes"
3144 MPICC_WRAPPER="mpicc"
3145 MPI_BIN=$(eval which $MPICC_WRAPPER | xargs dirname)
3148 enable_mpitests="no"
3152 MPICC_WRAPPER=$enableval
3153 MPI_BIN=$(eval echo $MPICC_WRAPPER | xargs dirname)
3157 enable_mpitests="yes"
3158 MPICC_WRAPPER="mpicc"
3159 MPI_BIN=$(eval which $MPICC_WRAPPER | xargs dirname)
3162 if test "x$enable_mpitests" != "xno"; then
3165 AC_CACHE_CHECK([whether mpitests can be built],
3166 lb_cv_mpi_tests, [AC_COMPILE_IFELSE([AC_LANG_SOURCE([
3170 MPI_Initialized(&flag);
3173 ])], [lb_cv_mpi_tests="yes"], [lb_cv_mpi_tests="no"])
3175 enable_mpitests=$lb_cv_mpi_tests
3179 AC_SUBST(MPICC_WRAPPER)
3180 ]) # LB_CONFIG_MPITESTS
3185 # whether to enable quota support global control
3187 AC_DEFUN([LC_CONFIG_QUOTA], [
3188 AC_MSG_CHECKING([whether to enable quota support global control])
3189 AC_ARG_ENABLE([quota],
3190 AC_HELP_STRING([--enable-quota],
3191 [enable quota support]),
3192 [], [enable_quota="yes"])
3193 AS_IF([test "x$enable_quota" = xyes],
3194 [AC_MSG_RESULT([yes])],
3195 [AC_MSG_RESULT([no])])
3196 ]) # LC_CONFIG_QUOTA
3201 AC_DEFUN([LC_QUOTA], [
3205 AS_IF([test "x$enable_quota" != xno -a "x$enable_utils" != xno], [
3206 AC_CHECK_HEADER([sys/quota.h],
3207 [AC_DEFINE(HAVE_SYS_QUOTA_H, 1,
3208 [Define to 1 if you have <sys/quota.h>.])],
3209 [AC_MSG_ERROR([don't find <sys/quota.h> in your system])])
3216 # configure support for optional OSD implementation
3218 AC_DEFUN([LC_OSD_ADDON], [
3219 AC_MSG_CHECKING([whether to use OSD addon])
3221 AC_HELP_STRING([--with-osd=path],
3222 [set path to optional osd]),
3229 OSDADDON="$with_osd"
3236 AS_IF([test $ENABLEOSDADDON -eq 0], [
3240 OSDMODNAME=$(basename $OSDADDON)
3241 AS_IF([test -e $LUSTRE/$OSDMODNAME], [
3242 AC_MSG_RESULT([can't link])
3244 ], [ln -s $OSDADDON $LUSTRE/$OSDMODNAME], [
3245 AC_MSG_RESULT([$OSDMODNAME])
3246 OSDADDON="obj-m += $OSDMODNAME/"
3248 AC_MSG_RESULT([can't link])
3258 # other configure checks
3260 AC_DEFUN([LC_CONFIGURE], [
3261 AC_MSG_NOTICE([Lustre core checks
3262 ==============================================================================])
3264 AS_IF([test $target_cpu == "i686" -o $target_cpu == "x86_64"],
3265 [CFLAGS="$CFLAGS -Wall -Werror"])
3267 # maximum MDS thread count
3270 # lustre/utils/gss/gss_util.c
3271 # lustre/utils/gss/gssd_proc.c
3272 # lustre/utils/gss/krb5_util.c
3273 # lustre/utils/llog_reader.c
3274 # lustre/utils/create_iam.c
3275 # lustre/utils/libiam.c
3276 AC_CHECK_HEADERS([netdb.h endian.h])
3277 AC_CHECK_FUNCS([gethostbyname])
3279 # lustre/utils/llverfs.c
3280 AC_CHECK_HEADERS([ext2fs/ext2fs.h])
3282 # lustre/utils/lfs.c
3283 AS_IF([test "$enable_dist" = "no"], [
3284 AC_CHECK_LIB([z], [crc32], [
3285 AC_CHECK_HEADER([zlib.h], [], [
3286 AC_MSG_ERROR([zlib.h not found.])])
3289 zlib library not found. Please install zlib development package.])
3295 AC_CHECK_LIB([selinux], [is_selinux_enabled],
3296 [AC_CHECK_HEADERS([selinux/selinux.h],
3297 [SELINUX="-lselinux"
3298 AC_DEFINE([HAVE_SELINUX], 1,
3299 [support for selinux ])],
3302 No libselinux-devel package found, unable to build selinux enabled tools
3307 No selinux package found, unable to build selinux enabled tools
3313 AC_MSG_CHECKING([whether to report minimum OST free space])
3314 AC_ARG_ENABLE([mindf],
3315 AC_HELP_STRING([--enable-mindf],
3316 [Make statfs report the minimum available space on any single OST instead of the sum of free space on all OSTs]),
3317 [], [enable_mindf="no"])
3318 AC_MSG_RESULT([$enable_mindf])
3319 AS_IF([test "$enable_mindf" = "yes"],
3320 [AC_DEFINE([MIN_DF], 1, [Report minimum OST free space])])
3322 AC_MSG_CHECKING([whether to randomly failing memory alloc])
3323 AC_ARG_ENABLE([fail_alloc],
3324 AC_HELP_STRING([--disable-fail-alloc],
3325 [disable randomly alloc failure]),
3326 [], [enable_fail_alloc="yes"])
3327 AC_MSG_RESULT([$enable_fail_alloc])
3328 AS_IF([test "x$enable_fail_alloc" != xno],
3329 [AC_DEFINE([RANDOM_FAIL_ALLOC], 1,
3330 [enable randomly alloc failure])])
3332 AC_MSG_CHECKING([whether to check invariants (expensive cpu-wise)])
3333 AC_ARG_ENABLE([invariants],
3334 AC_HELP_STRING([--enable-invariants],
3335 [enable invariant checking (cpu intensive)]),
3336 [], [enable_invariants="no"])
3337 AC_MSG_RESULT([$enable_invariants])
3338 AS_IF([test "x$enable_invariants" = xyes],
3339 [AC_DEFINE([CONFIG_LUSTRE_DEBUG_EXPENSIVE_CHECK], 1,
3340 [enable invariant checking])])
3342 AC_MSG_CHECKING([whether to track references with lu_ref])
3343 AC_ARG_ENABLE([lu_ref],
3344 AC_HELP_STRING([--enable-lu_ref],
3345 [enable lu_ref reference tracking code]),
3346 [], [enable_lu_ref="no"])
3347 AC_MSG_RESULT([$enable_lu_ref])
3348 AS_IF([test "x$enable_lu_ref" = xyes],
3349 [AC_DEFINE([USE_LU_REF], 1,
3350 [enable lu_ref reference tracking code])])
3352 AC_MSG_CHECKING([whether to enable page state tracking])
3353 AC_ARG_ENABLE([pgstate-track],
3354 AC_HELP_STRING([--enable-pgstate-track],
3355 [enable page state tracking]),
3356 [], [enable_pgstat_track="no"])
3357 AC_MSG_RESULT([$enable_pgstat_track])
3358 AS_IF([test "x$enable_pgstat_track" = xyes],
3359 [AC_DEFINE([CONFIG_DEBUG_PAGESTATE_TRACKING], 1,
3360 [enable page state tracking code])])
3363 AC_MSG_CHECKING([systemd unit file directory])
3364 AC_ARG_WITH([systemdsystemunitdir],
3365 [AS_HELP_STRING([--with-systemdsystemunitdir=DIR],
3366 [Directory for systemd service files])],
3367 [], [with_systemdsystemunitdir=auto])
3368 AS_IF([test "x$with_systemdsystemunitdir" = "xyes" -o "x$with_systemdsystemunitdir" = "xauto"],
3369 [def_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)
3370 AS_IF([test "x$def_systemdsystemunitdir" = "x"],
3371 [AS_IF([test "x$with_systemdsystemunitdir" = "xyes"],
3372 [AC_MSG_ERROR([systemd support requested but pkg-config unable to query systemd package])])
3373 with_systemdsystemunitdir=no],
3374 [with_systemdsystemunitdir="$def_systemdsystemunitdir"])])
3375 AS_IF([test "x$with_systemdsystemunitdir" != "xno"],
3376 [AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])])
3377 AC_MSG_RESULT([$with_systemdsystemunitdir])
3383 # AM_CONDITIONALS for lustre
3385 AC_DEFUN([LC_CONDITIONALS], [
3386 AM_CONDITIONAL(MPITESTS, test x$enable_mpitests = xyes, Build MPI Tests)
3387 AM_CONDITIONAL(CLIENT, test x$enable_client = xyes)
3388 AM_CONDITIONAL(SERVER, test x$enable_server = xyes)
3389 AM_CONDITIONAL(SPLIT, test x$enable_split = xyes)
3390 AM_CONDITIONAL(EXT2FS_DEVEL, test x$ac_cv_header_ext2fs_ext2fs_h = xyes)
3391 AM_CONDITIONAL(GSS, test x$enable_gss = xyes)
3392 AM_CONDITIONAL(GSS_KEYRING, test x$enable_gss_keyring = xyes)
3393 AM_CONDITIONAL(GSS_PIPEFS, test x$enable_gss_pipefs = xyes)
3394 AM_CONDITIONAL(GSS_SSK, test x$enable_ssk = xyes)
3395 AM_CONDITIONAL(LIBPTHREAD, test x$enable_libpthread = xyes)
3396 AM_CONDITIONAL(HAVE_SYSTEMD, test "x$with_systemdsystemunitdir" != "xno")
3397 AM_CONDITIONAL(XATTR_HANDLER, test "x$lb_cv_compile_xattr_handler_flags" = xyes)
3398 AM_CONDITIONAL(SELINUX, test "$SELINUX" = "-lselinux")
3399 AM_CONDITIONAL(GETSEPOL, test x$enable_getsepol = xyes)
3400 ]) # LC_CONDITIONALS
3405 # files that should be generated with AC_OUTPUT
3407 AC_DEFUN([LC_CONFIG_FILES],
3411 lustre/autoconf/Makefile
3412 lustre/conf/Makefile
3413 lustre/conf/resource/Makefile
3414 lustre/contrib/Makefile
3416 lustre/include/Makefile
3417 lustre/include/lustre/Makefile
3418 lustre/include/uapi/linux/lustre/Makefile
3419 lustre/kernel_patches/targets/4.18-rhel8.target
3420 lustre/kernel_patches/targets/3.10-rhel7.7.target
3421 lustre/kernel_patches/targets/3.10-rhel7.6.target
3422 lustre/kernel_patches/targets/3.10-rhel7.5.target
3423 lustre/kernel_patches/targets/4.14-rhel7.5.target
3424 lustre/kernel_patches/targets/4.14-rhel7.6.target
3425 lustre/kernel_patches/targets/3.0-sles11.target
3426 lustre/kernel_patches/targets/3.0-sles11sp3.target
3427 lustre/kernel_patches/targets/3.0-sles11sp4.target
3428 lustre/kernel_patches/targets/3.12-sles12.target
3429 lustre/kernel_patches/targets/4.4-sles12.target
3430 lustre/kernel_patches/targets/4.4-sles12sp3.target
3431 lustre/kernel_patches/targets/4.12-sles12sp4.target
3432 lustre/kernel_patches/targets/3.x-fc18.target
3433 lustre/ldlm/Makefile
3435 lustre/fid/autoMakefile
3436 lustre/llite/Makefile
3437 lustre/llite/autoMakefile
3439 lustre/lov/autoMakefile
3441 lustre/mdc/autoMakefile
3443 lustre/lmv/autoMakefile
3444 lustre/lfsck/Makefile
3445 lustre/lfsck/autoMakefile
3447 lustre/mdt/autoMakefile
3449 lustre/mdd/autoMakefile
3451 lustre/fld/autoMakefile
3452 lustre/obdclass/Makefile
3453 lustre/obdclass/autoMakefile
3454 lustre/obdecho/Makefile
3455 lustre/obdecho/autoMakefile
3457 lustre/ofd/autoMakefile
3459 lustre/osc/autoMakefile
3461 lustre/ost/autoMakefile
3462 lustre/osd-ldiskfs/Makefile
3463 lustre/osd-ldiskfs/autoMakefile
3464 lustre/osd-zfs/Makefile
3465 lustre/osd-zfs/autoMakefile
3467 lustre/mgc/autoMakefile
3469 lustre/mgs/autoMakefile
3470 lustre/target/Makefile
3471 lustre/ptlrpc/Makefile
3472 lustre/ptlrpc/autoMakefile
3473 lustre/ptlrpc/gss/Makefile
3474 lustre/ptlrpc/gss/autoMakefile
3475 lustre/quota/Makefile
3476 lustre/quota/autoMakefile
3477 lustre/scripts/Makefile
3478 lustre/scripts/systemd/Makefile
3479 lustre/tests/Makefile
3480 lustre/tests/mpi/Makefile
3481 lustre/tests/kernel/Makefile
3482 lustre/tests/kernel/autoMakefile
3483 lustre/utils/Makefile
3484 lustre/utils/gss/Makefile
3486 lustre/osp/autoMakefile
3488 lustre/lod/autoMakefile
3490 ]) # LC_CONFIG_FILES