Whamcloud - gitweb
LU-12275 sec: enable client side encryption
[fs/lustre-release.git] / lustre / autoconf / lustre-core.m4
1 #
2 # LC_CONFIG_SRCDIR
3 #
4 # Wrapper for AC_CONFIG_SUBDIR
5 #
6 AC_DEFUN([LC_CONFIG_SRCDIR], [
7 AC_CONFIG_SRCDIR([lustre/obdclass/obdo.c])
8 ldiskfs_is_ext4="yes"
9 ])
10
11 #
12 # LC_PATH_DEFAULTS
13 #
14 # lustre specific paths
15 #
16 AC_DEFUN([LC_PATH_DEFAULTS], [
17 # ptlrpc kernel build requires this
18 LUSTRE="$PWD/lustre"
19 AC_SUBST(LUSTRE)
20
21 # mount.lustre
22 rootsbindir='/sbin'
23 AC_SUBST(rootsbindir)
24
25 demodir='$(docdir)/demo'
26 AC_SUBST(demodir)
27
28 pkgexampledir='${pkgdatadir}/examples'
29 AC_SUBST(pkgexampledir)
30 ]) # LC_PATH_DEFAULTS
31
32 #
33 # LC_TARGET_SUPPORTED
34 #
35 # is the target os supported?
36 #
37 AC_DEFUN([LC_TARGET_SUPPORTED], [
38 case $target_os in
39         linux*)
40 $1
41                 ;;
42         *)
43 $2
44                 ;;
45 esac
46 ]) # LC_TARGET_SUPPORTED
47
48 #
49 # LC_GLIBC_SUPPORT_FHANDLES
50 #
51 AC_DEFUN([LC_GLIBC_SUPPORT_FHANDLES], [
52 AC_CHECK_FUNCS([name_to_handle_at],
53         [AC_DEFINE(HAVE_FHANDLE_GLIBC_SUPPORT, 1,
54                 [file handle and related syscalls are supported])],
55         [AC_MSG_WARN([file handle and related syscalls are not supported])])
56 ]) # LC_GLIBC_SUPPORT_FHANDLES
57
58 #
59 # LC_GLIBC_SUPPORT_COPY_FILE_RANGE
60 #
61 AC_DEFUN([LC_GLIBC_SUPPORT_COPY_FILE_RANGE], [
62 AC_CHECK_FUNCS([copy_file_range],
63         [AC_DEFINE(HAVE_COPY_FILE_RANGE, 1,
64                 [copy_file_range() is supported])],
65         [AC_MSG_WARN([copy_file_range() is not supported])])
66 ]) # LC_GLIBC_SUPPORT_COPY_FILE_RANGE
67
68 #
69 # LC_STACK_SIZE
70 #
71 # Ensure the stack size is at least 8k in Lustre server (all kernels)
72 #
73 AC_DEFUN([LC_STACK_SIZE], [
74 LB_CHECK_COMPILE([if stack size is at least 8k],
75 stack_size_8k, [
76         #include <linux/thread_info.h>
77 ], [
78         #if THREAD_SIZE < 8192
79         #error "stack size < 8192"
80         #endif
81 ], [], [AC_MSG_ERROR([
82
83 Lustre requires that Linux is configured with at least a 8KB stack.
84 ])])
85 ]) # LC_STACK_SIZE
86
87 #
88 # LC_MDS_MAX_THREADS
89 #
90 # Allow the user to set the MDS thread upper limit
91 #
92 AC_DEFUN([LC_MDS_MAX_THREADS], [
93 AC_MSG_CHECKING([for maximum number of MDS threads])
94 AC_ARG_WITH([mds_max_threads],
95         AC_HELP_STRING([--with-mds-max-threads=count],
96                 [maximum threads available on the MDS: (default=512)]),
97         [AC_DEFINE_UNQUOTED(MDS_MAX_THREADS, $with_mds_max_threads,
98                 [maximum number of MDS threads])])
99 AC_MSG_RESULT([$with_mds_max_threads])
100 ]) # LC_MDS_MAX_THREADS
101
102 #
103 # LC_CONFIG_PINGER
104 #
105 # the pinger is temporary, until we have the recovery node in place
106 #
107 AC_DEFUN([LC_CONFIG_PINGER], [
108 AC_MSG_CHECKING([whether to enable Lustre pinger support])
109 AC_ARG_ENABLE([pinger],
110         AC_HELP_STRING([--disable-pinger],
111                 [disable recovery pinger support]),
112         [], [enable_pinger="yes"])
113 AC_MSG_RESULT([$enable_pinger])
114 AS_IF([test "x$enable_pinger" != xno],
115         [AC_DEFINE(CONFIG_LUSTRE_FS_PINGER, 1,[Use the Pinger])])
116 ]) # LC_CONFIG_PINGER
117
118 #
119 # LC_CONFIG_CHECKSUM
120 #
121 # do checksum of bulk data between client and OST
122 #
123 AC_DEFUN([LC_CONFIG_CHECKSUM], [
124 AC_MSG_CHECKING([whether to enable data checksum support])
125 AC_ARG_ENABLE([checksum],
126         AC_HELP_STRING([--disable-checksum],
127                 [disable data checksum support]),
128         [], [enable_checksum="yes"])
129 AC_MSG_RESULT([$enable_checksum])
130 AS_IF([test "x$enable_checksum" != xno],
131         [AC_DEFINE(ENABLE_CHECKSUM, 1, [do data checksums])])
132 ]) # LC_CONFIG_CHECKSUM
133
134 #
135 # LC_CONFIG_FLOCK
136 #
137 # enable distributed flock by default
138 #
139 AC_DEFUN([LC_CONFIG_FLOCK], [
140 AC_MSG_CHECKING([whether to enable flock by default])
141 AC_ARG_ENABLE([flock],
142         AC_HELP_STRING([--disable-flock],
143                 [disable flock by default]),
144         [], [enable_flock="yes"])
145 AC_MSG_RESULT([$enable_flock])
146 AS_IF([test "x$enable_flock" != xno],
147         [AC_DEFINE(ENABLE_FLOCK, 1, [enable flock by default])])
148 ]) # LC_CONFIG_FLOCK
149
150 #
151 # LC_CONFIG_HEALTH_CHECK_WRITE
152 #
153 # Turn off the actual write to the disk
154 #
155 AC_DEFUN([LC_CONFIG_HEALTH_CHECK_WRITE], [
156 AC_MSG_CHECKING([whether to enable a write with the health check])
157 AC_ARG_ENABLE([health_write],
158         AC_HELP_STRING([--enable-health_write],
159                 [enable disk writes when doing health check]),
160         [], [enable_health_write="no"])
161 AC_MSG_RESULT([$enable_health_write])
162 AS_IF([test "x$enable_health_write" != xno],
163         [AC_DEFINE(USE_HEALTH_CHECK_WRITE, 1, [Write when Checking Health])])
164 ]) # LC_CONFIG_HEALTH_CHECK_WRITE
165
166 #
167 # LC_CONFIG_LRU_RESIZE
168 #
169 AC_DEFUN([LC_CONFIG_LRU_RESIZE], [
170 AC_MSG_CHECKING([whether to enable lru self-adjusting])
171 AC_ARG_ENABLE([lru_resize],
172         AC_HELP_STRING([--enable-lru-resize],
173                 [enable lru resize support]),
174         [], [enable_lru_resize="yes"])
175 AC_MSG_RESULT([$enable_lru_resize])
176 AS_IF([test "x$enable_lru_resize" != xno],
177         [AC_DEFINE(HAVE_LRU_RESIZE_SUPPORT, 1, [Enable lru resize support])])
178 ]) # LC_CONFIG_LRU_RESIZE
179
180 #
181 # LC_QUOTA_CONFIG
182 #
183 # Quota support. The kernel must support CONFIG_QUOTA.
184 #
185 AC_DEFUN([LC_QUOTA_CONFIG], [
186 LB_CHECK_CONFIG_IM([QUOTA], [],
187         [AC_MSG_ERROR([
188
189 Lustre quota requires that CONFIG_QUOTA is enabled in your kernel.
190 ])])
191 ]) # LC_QUOTA_CONFIG
192
193 #
194 # LC_CONFIG_FHANDLE
195 #
196 # fhandle kernel support for open_by_handle_at() and name_to_handle_at()
197 # system calls. The kernel must support CONFIG_FHANDLE.
198 #
199 AC_DEFUN([LC_CONFIG_FHANDLE], [
200 LB_CHECK_CONFIG_IM([FHANDLE], [],
201         [AC_MSG_ERROR([
202
203 Lustre fid handling requires that CONFIG_FHANDLE is enabled in your kernel.
204 ])])
205 ]) # LC_CONFIG_FHANDLE
206
207 #
208 # LC_POSIX_ACL_CONFIG
209 #
210 # POSIX ACL support.
211 #
212 AC_DEFUN([LC_POSIX_ACL_CONFIG], [
213 LB_CHECK_CONFIG_IM([FS_POSIX_ACL],
214         [AC_DEFINE(CONFIG_LUSTRE_FS_POSIX_ACL, 1, [Enable POSIX acl])
215 ], [ ])
216 ]) # LC_POSIX_ACL_CONFIG
217
218 LB_CHECK_CONFIG_IM([CRYPTO_MD5], [],
219                 [AC_MSG_WARN([kernel MD5 support is recommended by using GSS.])])
220
221 #
222 # LC_CONFIG_GSS_KEYRING
223 #
224 # default 'auto', tests for dependencies, if found, enables;
225 # only called if gss is enabled
226 #
227 AC_DEFUN([LC_CONFIG_GSS_KEYRING], [
228 AC_MSG_CHECKING([whether to enable gss keyring backend])
229 AC_ARG_ENABLE([gss_keyring],
230         [AC_HELP_STRING([--disable-gss-keyring],
231                 [disable gss keyring backend])],
232         [], [enable_gss_keyring="auto"])
233 AC_MSG_RESULT([$enable_gss_keyring])
234 AS_IF([test "x$enable_gss_keyring" != xno], [
235         LB_CHECK_CONFIG_IM([KEYS], [], [
236                 gss_keyring_conf_test="fail"
237                 AC_MSG_WARN([GSS keyring backend requires that CONFIG_KEYS be enabled in your kernel.])])
238
239         AC_CHECK_LIB([keyutils], [keyctl_search], [], [
240                 gss_keyring_conf_test="fail"
241                 AC_MSG_WARN([GSS keyring backend requires libkeyutils])])
242
243         AS_IF([test "x$gss_keyring_conf_test" != xfail], [
244                 AC_DEFINE([HAVE_GSS_KEYRING], [1],
245                         [Define this if you enable gss keyring backend])
246                 enable_gss_keyring="yes"
247         ], [
248                 AS_IF([test "x$enable_gss_keyring" = xyes], [
249                         AC_MSG_ERROR([Cannot enable gss_keyring. See above for details.])
250                 ])
251         ])
252 ])
253 ]) # LC_CONFIG_GSS_KEYRING
254
255 #
256 # LC_KEY_TYPE_INSTANTIATE_2ARGS
257 #
258 # rhel7 key_type->instantiate takes 2 args (struct key, struct key_preparsed_payload)
259 #
260 AC_DEFUN([LC_KEY_TYPE_INSTANTIATE_2ARGS], [
261 LB_CHECK_COMPILE([if 'key_type->instantiate' has two args],
262 key_type_instantiate_2args, [
263         #include <linux/key-type.h>
264 ],[
265         ((struct key_type *)0)->instantiate(0, NULL);
266 ],[
267         AC_DEFINE(HAVE_KEY_TYPE_INSTANTIATE_2ARGS, 1,
268                 [key_type->instantiate has two args])
269 ])
270 ]) # LC_KEY_TYPE_INSTANTIATE_2ARGS
271
272 #
273 # LC_CONFIG_SUNRPC
274 #
275 AC_DEFUN([LC_CONFIG_SUNRPC], [
276 LB_CHECK_CONFIG_IM([SUNRPC], [], [
277         AS_IF([test "x$sunrpc_required" = xyes], [
278                 AC_MSG_ERROR([
279
280 kernel SUNRPC support is required by using GSS.
281 ])
282         ])])
283 ]) # LC_CONFIG_SUNRPC
284
285 #
286 # LC_CONFIG_GSS (default 'auto' (tests for dependencies, if found, enables))
287 #
288 # Build gss and related tools of Lustre. Currently both kernel and user space
289 # parts are depend on linux platform.
290 #
291 AC_DEFUN([LC_CONFIG_GSS], [
292 AC_MSG_CHECKING([whether to enable gss support])
293 AC_ARG_ENABLE([gss],
294         [AC_HELP_STRING([--enable-gss], [enable gss support])],
295         [], [enable_gss="auto"])
296 AC_MSG_RESULT([$enable_gss])
297
298 AC_ARG_VAR([TEST_JOBS],
299     [simultaneous jobs during configure (defaults to $(nproc))])
300 if test "x$ac_cv_env_TEST_JOBS_set" != "xset"; then
301         TEST_JOBS=${TEST_JOBS:-$(nproc)}
302 fi
303 AC_SUBST(TEST_JOBS)
304
305 AC_ARG_VAR([TEST_DIR],
306     [location of temporary parallel configure tests (defaults to $PWD/lb2)])
307         TEST_DIR=${TEST_DIR:-$PWD/_lpb}
308 AC_SUBST(TEST_DIR)
309
310 AS_IF([test "x$enable_gss" != xno], [
311         LC_CONFIG_GSS_KEYRING
312         LC_KEY_TYPE_INSTANTIATE_2ARGS
313         sunrpc_required=$enable_gss
314         LC_CONFIG_SUNRPC
315         sunrpc_required="no"
316
317         LB_CHECK_CONFIG_IM([CRYPTO_MD5], [],
318                 [AC_MSG_WARN([kernel MD5 support is recommended by using GSS.])])
319         LB_CHECK_CONFIG_IM([CRYPTO_SHA1], [],
320                 [AC_MSG_WARN([kernel SHA1 support is recommended by using GSS.])])
321         LB_CHECK_CONFIG_IM([CRYPTO_SHA256], [],
322                 [AC_MSG_WARN([kernel SHA256 support is recommended by using GSS.])])
323         LB_CHECK_CONFIG_IM([CRYPTO_SHA512], [],
324                 [AC_MSG_WARN([kernel SHA512 support is recommended by using GSS.])])
325
326         require_krb5=$enable_gss
327         AC_KERBEROS_V5
328         require_krb5="no"
329
330         AS_IF([test -n "$KRBDIR"], [
331                 gss_conf_test="success"
332         ], [
333                 gss_conf_test="failure"
334         ])
335
336         AS_IF([test "x$gss_conf_test" = xsuccess && test "x$enable_gss" != xno], [
337                 AC_DEFINE([HAVE_GSS], [1], [Define this is if you enable gss])
338                 enable_gss="yes"
339         ], [
340                 enable_gss_keyring="no"
341                 enable_gss="no"
342         ])
343
344         enable_ssk=$enable_gss
345 ], [
346         enable_gss_keyring="no"
347 ])
348 ]) # LC_CONFIG_GSS
349
350 # LC_OPENSSL_SSK
351 #
352 # OpenSSL 1.0+ return int for HMAC functions but older SLES11 versions do not
353 AC_DEFUN([LC_OPENSSL_SSK], [
354 AC_MSG_CHECKING([whether OpenSSL has functions needed for SSK])
355 AS_IF([test "x$enable_ssk" != xno], [
356 AC_COMPILE_IFELSE([AC_LANG_SOURCE([
357         #include <openssl/hmac.h>
358         #include <openssl/evp.h>
359
360         int main(void) {
361                 int rc;
362                 rc = HMAC_Init_ex(NULL, "test", 4, EVP_md_null(), NULL);
363         }
364 ])],[AC_DEFINE(HAVE_OPENSSL_SSK, 1,
365                [OpenSSL HMAC functions needed for SSK])],
366         [enable_ssk="no"])
367 ])
368 AC_MSG_RESULT([$enable_ssk])
369 ]) # LC_OPENSSL_SSK
370
371 # LC_OPENSSL_GETSEPOL
372 #
373 # OpenSSL is needed for l_getsepol
374 AC_DEFUN([LC_OPENSSL_GETSEPOL], [
375 AC_MSG_CHECKING([whether openssl-devel is present])
376 AC_COMPILE_IFELSE([AC_LANG_SOURCE([
377         #include <openssl/evp.h>
378
379         int main(void) {
380                 EVP_MD_CTX *mdctx = EVP_MD_CTX_create();
381         }
382 ])],[
383         AC_DEFINE(HAVE_OPENSSL_GETSEPOL, 1, [openssl-devel is present])
384         enable_getsepol="yes"
385
386 ],[
387         enable_getsepol="no"
388         AC_MSG_WARN([
389
390 No openssk-devel headers found, unable to build l_getsepol and SELinux status checking
391 ])
392 ])
393 AC_MSG_RESULT([$enable_getsepol])
394 ]) # LC_OPENSSL_GETSEPOL
395
396 AC_DEFUN([LC_HAVE_PROJECT_QUOTA], [
397 LB_CHECK_COMPILE([if get_projid exists],
398 get_projid, [
399         struct inode;
400         #include <linux/quota.h>
401 ],[
402         struct dquot_operations ops = { };
403
404         ops.get_projid(NULL, NULL);
405 ],[
406         AC_DEFINE(HAVE_PROJECT_QUOTA, 1,
407                 [get_projid function exists])
408 ])
409 ]) # LC_HAVE_PROJECT_QUOTA
410
411 #
412 # LC_INVALIDATE_RANGE
413 #
414 # 3.11 invalidatepage requires the length of the range to invalidate
415 #
416 AC_DEFUN([LC_INVALIDATE_RANGE], [
417 LB_CHECK_COMPILE([if 'address_space_operations.invalidatepage' requires 3 arguments],
418 address_space_ops_invalidatepage_3args, [
419         #include <linux/fs.h>
420 ],[
421         struct address_space_operations a_ops;
422         a_ops.invalidatepage(NULL, 0, 0);
423 ],[
424         AC_DEFINE(HAVE_INVALIDATE_RANGE, 1,
425                 [address_space_operations.invalidatepage needs 3 arguments])
426 ])
427 ]) # LC_INVALIDATE_RANGE
428
429 #
430 # LC_HAVE_DIR_CONTEXT
431 #
432 # 3.11 readdir now takes the new struct dir_context
433 #
434 AC_DEFUN([LC_HAVE_DIR_CONTEXT], [
435 LB_CHECK_COMPILE([if 'dir_context' exist],
436 dir_context, [
437         #include <linux/fs.h>
438 ],[
439 #ifdef FMODE_KABI_ITERATE
440 #error "back to use readdir in kabi_extand mode"
441 #else
442         struct dir_context ctx;
443
444         ctx.pos = 0;
445 #endif
446 ],[
447         AC_DEFINE(HAVE_DIR_CONTEXT, 1,
448                 [dir_context exist])
449 ])
450 ]) # LC_HAVE_DIR_CONTEXT
451
452 #
453 # LC_D_COMPARE_5ARGS
454 #
455 # 3.11 dentry_operations.d_compare() taken 5 arguments.
456 #
457 AC_DEFUN([LC_D_COMPARE_5ARGS], [
458 LB_CHECK_COMPILE([if 'd_compare' taken 5 arguments],
459 d_compare_5args, [
460         #include <linux/dcache.h>
461 ],[
462         ((struct dentry_operations*)0)->d_compare(NULL,NULL,0,NULL,NULL);
463 ],[
464         AC_DEFINE(HAVE_D_COMPARE_5ARGS, 1,
465                 [d_compare need 5 arguments])
466 ])
467 ]) # LC_D_COMPARE_5ARGS
468
469 #
470 # LC_HAVE_DCOUNT
471 #
472 # 3.11 need to access d_count to get dentry reference count
473 #
474 AC_DEFUN([LC_HAVE_DCOUNT], [
475 LB_CHECK_COMPILE([if 'd_count' exists],
476 d_count, [
477         #include <linux/dcache.h>
478 ],[
479         struct dentry de = { };
480         int count;
481
482         count = d_count(&de);
483 ],[
484         AC_DEFINE(HAVE_D_COUNT, 1,
485                 [d_count exist])
486 ])
487 ]) # LC_HAVE_DCOUNT
488
489 #
490 # LC_PID_NS_FOR_CHILDREN
491 #
492 # 3.11 replaces pid_ns by pid_ns_for_children in struct nsproxy
493 #
494 AC_DEFUN([LC_PID_NS_FOR_CHILDREN], [
495 LB_CHECK_COMPILE([if 'struct nsproxy' has 'pid_ns_for_children'],
496 pid_ns_for_children, [
497         #include <linux/nsproxy.h>
498 ],[
499         struct nsproxy ns;
500         ns.pid_ns_for_children = NULL;
501 ],[
502         AC_DEFINE(HAVE_PID_NS_FOR_CHILDREN, 1,
503                   ['struct nsproxy' has 'pid_ns_for_children'])
504 ])
505 ]) # LC_PID_NS_FOR_CHILDREN
506
507 #
508 # LC_OLDSIZE_TRUNCATE_PAGECACHE
509 #
510 # 3.12 truncate_pagecache without oldsize parameter
511 #
512 AC_DEFUN([LC_OLDSIZE_TRUNCATE_PAGECACHE], [
513 LB_CHECK_COMPILE([if 'truncate_pagecache' with 'old_size' parameter],
514 truncate_pagecache_old_size, [
515         #include <linux/mm.h>
516 ],[
517         truncate_pagecache(NULL, 0, 0);
518 ],[
519         AC_DEFINE(HAVE_OLDSIZE_TRUNCATE_PAGECACHE, 1,
520                 [with oldsize])
521 ])
522 ]) # LC_OLDSIZE_TRUNCATE_PAGECACHE
523
524 #
525 # LC_PTR_ERR_OR_ZERO
526 #
527 # For some reason SLES11SP4 is missing the PTR_ERR_OR_ZERO macro
528 # It was added to linux kernel 3.12
529 #
530 AC_DEFUN([LC_PTR_ERR_OR_ZERO_MISSING], [
531 LB_CHECK_COMPILE([if 'PTR_ERR_OR_ZERO' is missing],
532 is_err_or_null, [
533         #include <linux/err.h>
534 ],[
535         if (PTR_ERR_OR_ZERO(NULL)) return 0;
536 ],[
537         AC_DEFINE(HAVE_PTR_ERR_OR_ZERO, 1,
538                 ['PTR_ERR_OR_ZERO' exist])
539 ])
540 ]) # LC_PTR_ERR_OR_ZERO_MISSING
541
542 #
543 # LC_HAVE_DENTRY_D_U_D_ALIAS
544 #
545 # 3.11 kernel moved d_alias to the union d_u in struct dentry
546 #
547 # Some distros move d_alias to d_u but it is still a struct list
548 #
549 AC_DEFUN([LC_HAVE_DENTRY_D_U_D_ALIAS], [
550 AS_IF([test "x$lb_cv_compile_i_dentry_d_alias_list" = xyes], [
551         LB_CHECK_COMPILE([if list 'dentry.d_u.d_alias' exist],
552         d_alias, [
553                 #include <linux/list.h>
554                 #include <linux/dcache.h>
555         ],[
556                 struct dentry de;
557                 INIT_LIST_HEAD(&de.d_u.d_alias);
558         ],[
559                 AC_DEFINE(HAVE_DENTRY_D_U_D_ALIAS, 1,
560                         [list dentry.d_u.d_alias exist])
561         ])
562 ],[
563         LB_CHECK_COMPILE([if hlist 'dentry.d_u.d_alias' exist],
564         d_alias, [
565                 #include <linux/list.h>
566                 #include <linux/dcache.h>
567         ],[
568                 struct dentry de;
569                 INIT_HLIST_NODE(&de.d_u.d_alias);
570         ],[
571                 AC_DEFINE(HAVE_DENTRY_D_U_D_ALIAS, 1,
572                         [hlist dentry.d_u.d_alias exist])
573         ])
574 ])
575 ]) # LC_HAVE_DENTRY_D_U_D_ALIAS
576
577 #
578 # LC_HAVE_DENTRY_D_CHILD
579 #
580 # 3.11 kernel d_child has been moved out of the union d_u
581 # in struct dentry
582 #
583 AC_DEFUN([LC_HAVE_DENTRY_D_CHILD], [
584 LB_CHECK_COMPILE([if 'dentry.d_child' exist],
585 d_child, [
586         #include <linux/list.h>
587         #include <linux/dcache.h>
588 ],[
589         struct dentry de;
590         INIT_LIST_HEAD(&de.d_child);
591 ],[
592         AC_DEFINE(HAVE_DENTRY_D_CHILD, 1,
593                 [dentry.d_child exist])
594 ])
595 ]) # LC_HAVE_DENTRY_D_CHILD
596
597 #
598 # LC_KIOCB_KI_LEFT
599 #
600 # 3.12 ki_left removed from struct kiocb
601 #
602 AC_DEFUN([LC_KIOCB_KI_LEFT], [
603 LB_CHECK_COMPILE([if 'struct kiocb' with 'ki_left' member],
604 kiocb_ki_left, [
605         #include <linux/aio.h>
606 ],[
607         ((struct kiocb*)0)->ki_left = 0;
608 ],[
609         AC_DEFINE(HAVE_KIOCB_KI_LEFT, 1,
610                 [ki_left exist])
611 ])
612 ]) # LC_KIOCB_KI_LEFT
613
614 #
615 # LC_VFS_RENAME_5ARGS
616 #
617 # 3.13 has vfs_rename with 5 args
618 #
619 AC_DEFUN([LC_VFS_RENAME_5ARGS], [
620 LB_CHECK_COMPILE([if Linux kernel has 'vfs_rename' with 5 args],
621 vfs_rename_5args, [
622         #include <linux/fs.h>
623 ],[
624         vfs_rename(NULL, NULL, NULL, NULL, NULL);
625 ], [
626         AC_DEFINE(HAVE_VFS_RENAME_5ARGS, 1,
627                 [kernel has vfs_rename with 5 args])
628 ])
629 ]) # LC_VFS_RENAME_5ARGS
630
631 #
632 # LC_VFS_UNLINK_3ARGS
633 #
634 # 3.13 has vfs_unlink with 3 args
635 #
636 AC_DEFUN([LC_VFS_UNLINK_3ARGS], [
637 LB_CHECK_COMPILE([if Linux kernel has 'vfs_unlink' with 3 args],
638 vfs_unlink_3args, [
639         #include <linux/fs.h>
640 ],[
641         vfs_unlink(NULL, NULL, NULL);
642 ], [
643         AC_DEFINE(HAVE_VFS_UNLINK_3ARGS, 1,
644                 [kernel has vfs_unlink with 3 args])
645 ])
646 ]) # LC_VFS_UNLINK_3ARGS
647
648 # LC_HAVE_D_IS_POSITIVE
649 #
650 # Kernel version 3.13 b18825a7c8e37a7cf6abb97a12a6ad71af160de7
651 # d_is_positive is added
652 #
653 AC_DEFUN([LC_HAVE_D_IS_POSITIVE], [
654 LB_CHECK_COMPILE([if 'd_is_positive' exist],
655 d_is_positive, [
656         #include <linux/dcache.h>
657 ],[
658         d_is_positive(NULL);
659 ],[
660         AC_DEFINE(HAVE_D_IS_POSITIVE, 1,
661                 ['d_is_positive' is available])
662 ])
663 ]) # LC_HAVE_D_IS_POSITIVE
664
665 #
666 # LC_HAVE_BVEC_ITER
667 #
668 # 3.14 move some of its data in struct bio into the new
669 # struct bvec_iter
670 #
671 AC_DEFUN([LC_HAVE_BVEC_ITER], [
672 LB_CHECK_COMPILE([if Linux kernel has struct bvec_iter],
673 have_bvec_iter, [
674         #include <linux/bio.h>
675 ],[
676         struct bvec_iter iter;
677
678         iter.bi_bvec_done = 0;
679 ], [
680         AC_DEFINE(HAVE_BVEC_ITER, 1,
681                 [kernel has struct bvec_iter])
682 ])
683 ]) # LC_HAVE_BVEC_ITER
684
685 #
686 # LC_IOP_SET_ACL
687 #
688 # 3.14 adds set_acl method to inode_operations
689 # see kernel commit 893d46e443346370cd4ea81d9d35f72952c62a37
690 #
691 AC_DEFUN([LC_IOP_SET_ACL], [
692 LB_CHECK_COMPILE([if 'inode_operations' has '.set_acl' member function],
693 inode_ops_set_acl, [
694         #include <linux/fs.h>
695 ],[
696         struct inode_operations iop;
697         iop.set_acl = NULL;
698 ],[
699         AC_DEFINE(HAVE_IOP_SET_ACL, 1,
700                 [inode_operations has .set_acl member function])
701 ])
702 ]) # LC_IOP_SET_ACL
703
704 #
705 # LC_HAVE_TRUNCATE_IPAGE_FINAL
706 #
707 # 3.14 bring truncate_inode_pages_final for evict_inode
708 #
709 AC_DEFUN([LC_HAVE_TRUNCATE_IPAGES_FINAL], [
710 LB_CHECK_COMPILE([if Linux kernel has truncate_inode_pages_final],
711 truncate_ipages_final, [
712         #include <linux/mm.h>
713 ],[
714         truncate_inode_pages_final(NULL);
715 ], [
716         AC_DEFINE(HAVE_TRUNCATE_INODE_PAGES_FINAL, 1,
717                 [kernel has truncate_inode_pages_final])
718 ])
719 ]) # LC_HAVE_TRUNCATE_IPAGES_FINAL
720
721 #
722 # LC_IOPS_RENAME_WITH_FLAGS
723 #
724 # 3.14 has inode_operations->rename with 5 args
725 # commit 520c8b16505236fc82daa352e6c5e73cd9870cff
726 #
727 AC_DEFUN([LC_IOPS_RENAME_WITH_FLAGS], [
728 LB_CHECK_COMPILE([if 'inode_operations->rename' taken flags as argument],
729 iops_rename_with_flags, [
730         #include <linux/fs.h>
731 ],[
732         struct inode *i1 = NULL, *i2 = NULL;
733         struct dentry *d1 = NULL, *d2 = NULL;
734         int rc;
735         rc = ((struct inode_operations *)0)->rename(i1, d1, i2, d2, 0);
736 ], [
737         AC_DEFINE(HAVE_IOPS_RENAME_WITH_FLAGS, 1,
738                 [inode_operations->rename need flags as argument])
739 ])
740 ]) # LC_IOPS_RENAME_WITH_FLAGS
741
742 #
743 # LC_VFS_RENAME_6ARGS
744 #
745 # 3.15 has vfs_rename with 6 args
746 #
747 AC_DEFUN([LC_VFS_RENAME_6ARGS], [
748 LB_CHECK_COMPILE([if Linux kernel has 'vfs_rename' with 6 args],
749 vfs_rename_6args, [
750         #include <linux/fs.h>
751 ],[
752         vfs_rename(NULL, NULL, NULL, NULL, NULL, NULL);
753 ], [
754         AC_DEFINE(HAVE_VFS_RENAME_6ARGS, 1,
755                 [kernel has vfs_rename with 6 args])
756 ])
757 ]) # LC_VFS_RENAME_6ARGS
758
759 #
760 # LC_DIRECTIO_USE_ITER
761 #
762 # 3.16 kernel changes direct IO to use iov_iter
763 #
764 AC_DEFUN([LC_DIRECTIO_USE_ITER], [
765 LB_CHECK_COMPILE([if direct IO uses iov_iter],
766 direct_io_iter, [
767         #include <linux/fs.h>
768 ],[
769         struct address_space_operations ops = { };
770         struct iov_iter *iter = NULL;
771         loff_t offset = 0;
772
773         ops.direct_IO(0, NULL, iter, offset);
774 ],[
775         AC_DEFINE(HAVE_DIRECTIO_ITER, 1,
776                 [direct IO uses iov_iter])
777 ])
778 ]) # LC_DIRECTIO_USE_ITER
779
780 #
781 # LC_HAVE_IOV_ITER_INIT_DIRECTION
782 #
783 #
784 # 3.16 linux commit 71d8e532b1549a478e6a6a8a44f309d050294d00
785 #      changed iov_iter_init api to start accepting a tag
786 #      that defines if its a read or write operation
787 #
788 AC_DEFUN([LC_HAVE_IOV_ITER_INIT_DIRECTION], [
789 tmp_flags="$EXTRA_KCFLAGS"
790 EXTRA_KCFLAGS="-Werror"
791 LB_CHECK_COMPILE([if 'iov_iter_init' takes a tag],
792 iter_init, [
793         #include <linux/uio.h>
794         #include <linux/fs.h>
795 ],[
796         const struct iovec *iov = NULL;
797
798         iov_iter_init(NULL, READ, iov, 1, 0);
799 ],[
800         AC_DEFINE(HAVE_IOV_ITER_INIT_DIRECTION, 1,
801                 [iov_iter_init handles directional tag])
802 ])
803 EXTRA_KCFLAGS="$tmp_flags"
804 ]) # LC_HAVE_IOV_ITER_INIT_DIRECTION
805
806 #
807 # LC_HAVE_IOV_ITER_TRUNCATE
808 #
809 #
810 # 3.16 introduces a new API iov_iter_truncate()
811 #
812 AC_DEFUN([LC_HAVE_IOV_ITER_TRUNCATE], [
813 tmp_flags="$EXTRA_KCFLAGS"
814 EXTRA_KCFLAGS="-Werror"
815 LB_CHECK_COMPILE([if 'iov_iter_truncate' exists ],
816 iter_truncate, [
817         #include <linux/uio.h>
818         #include <linux/fs.h>
819 ],[
820         struct iov_iter *i = NULL;
821
822         iov_iter_truncate(i, 0);
823 ],[
824         AC_DEFINE(HAVE_IOV_ITER_TRUNCATE, 1, [iov_iter_truncate exists])
825 ])
826 EXTRA_KCFLAGS="$tmp_flags"
827 ]) # LC_HAVE_IOV_ITER_TRUNCATE
828
829 #
830 # LC_HAVE_FILE_OPERATIONS_READ_WRITE_ITER
831 #
832 # 3.16 introduces [read|write]_iter to struct file_operations
833 #
834 AC_DEFUN([LC_HAVE_FILE_OPERATIONS_READ_WRITE_ITER], [
835 LB_CHECK_COMPILE([if 'file_operations.[read|write]_iter' exist],
836 file_function_iter, [
837         #include <linux/fs.h>
838 ],[
839         ((struct file_operations *)NULL)->read_iter(NULL, NULL);
840         ((struct file_operations *)NULL)->write_iter(NULL, NULL);
841 ],[
842         AC_DEFINE(HAVE_FILE_OPERATIONS_READ_WRITE_ITER, 1,
843                 [file_operations.[read|write]_iter functions exist])
844 ])
845 ]) # LC_HAVE_FILE_OPERATIONS_READ_WRITE_ITER
846
847 #
848 # LC_HAVE_INTERVAL_BLK_INTEGRITY
849 #
850 # 3.17 replace sector_size with interval in struct blk_integrity
851 #
852 AC_DEFUN([LC_HAVE_INTERVAL_BLK_INTEGRITY], [
853 LB_CHECK_COMPILE([if 'blk_integrity.interval' exist],
854 interval_blk_integrity, [
855         #include <linux/blkdev.h>
856 ],[
857         ((struct blk_integrity *)0)->interval = 0;
858 ],[
859         AC_DEFINE(HAVE_INTERVAL_BLK_INTEGRITY, 1,
860                 [blk_integrity.interval exist])
861 ])
862 ]) # LC_HAVE_INTERVAL_BLK_INTEGRITY
863
864 #
865 # LC_KEY_MATCH_DATA
866 #
867 # 3.17  replaces key_type::match with match_preparse
868 #       and has new struct key_match_data
869 #
870 AC_DEFUN([LC_KEY_MATCH_DATA], [
871 LB_CHECK_COMPILE([if struct key_match field exist],
872 key_match, [
873         #include <linux/key-type.h>
874 ],[
875         struct key_match_data data;
876
877         data.raw_data = NULL;
878 ],[
879         AC_DEFINE(HAVE_KEY_MATCH_DATA, 1,
880                 [struct key_match_data exist])
881 ])
882 ]) # LC_KEY_MATCH_DATA
883
884 #
885 # LC_NFS_FILLDIR_USE_CTX
886 #
887 # 3.18 kernel moved from void cookie to struct dir_context
888 #
889 AC_DEFUN([LC_NFS_FILLDIR_USE_CTX], [
890 tmp_flags="$EXTRA_KCFLAGS"
891 EXTRA_KCFLAGS="-Werror"
892 LB_CHECK_COMPILE([if filldir_t uses struct dir_context],
893 filldir_ctx, [
894         #include <linux/fs.h>
895 ],[
896         int filldir(struct dir_context *ctx, const char* name,
897                     int i, loff_t off, u64 tmp, unsigned temp)
898         {
899                 return 0;
900         }
901
902         struct dir_context ctx = {
903                 .actor = filldir,
904         };
905
906         ctx.actor(NULL, "test", 0, (loff_t) 0, 0, 0);
907 ],[
908         AC_DEFINE(HAVE_FILLDIR_USE_CTX, 1,
909                 [filldir_t needs struct dir_context as argument])
910 ])
911 EXTRA_KCFLAGS="$tmp_flags"
912 ]) # LC_NFS_FILLDIR_USE_CTX
913
914 #
915 # LC_PERCPU_COUNTER_INIT
916 #
917 # 3.18  For kernels 3.18 and after percpu_counter_init starts
918 #       to pass a GFP_* memory allocation flag for internal
919 #       memory allocation purposes.
920 #
921 AC_DEFUN([LC_PERCPU_COUNTER_INIT], [
922 LB_CHECK_COMPILE([if percpu_counter_init uses GFP_* flag as argument],
923 percpu_counter_init, [
924         #include <linux/percpu_counter.h>
925 ],[
926         percpu_counter_init(NULL, 0, GFP_KERNEL);
927 ],[
928         AC_DEFINE(HAVE_PERCPU_COUNTER_INIT_GFP_FLAG, 1,
929                 [percpu_counter_init uses GFP_* flag])
930 ])
931 ]) # LC_PERCPU_COUNTER_INIT
932
933 #
934 # LC_KIOCB_HAS_NBYTES
935 #
936 # 3.19 kernel removed ki_nbytes from struct kiocb
937 #
938 AC_DEFUN([LC_KIOCB_HAS_NBYTES], [
939 LB_CHECK_COMPILE([if struct kiocb has ki_nbytes field],
940 ki_nbytes, [
941         #include <linux/fs.h>
942 ],[
943         struct kiocb iocb = { };
944
945         iocb.ki_nbytes = 0;
946 ],[
947         AC_DEFINE(HAVE_KI_NBYTES, 1, [ki_nbytes field exist])
948 ])
949 ]) # LC_KIOCB_HAS_NBYTES
950
951 #
952 # LC_HAVE_DQUOT_QC_DQBLK
953 #
954 # 3.19 has quotactl_ops->[sg]et_dqblk that take struct kqid and qc_dqblk
955 # Added in commit 14bf61ffe
956 #
957 AC_DEFUN([LC_HAVE_DQUOT_QC_DQBLK], [
958 tmp_flags="$EXTRA_KCFLAGS"
959 EXTRA_KCFLAGS="-Werror"
960 LB_CHECK_COMPILE([if 'quotactl_ops.set_dqblk' takes struct qc_dqblk],
961 qc_dqblk, [
962         #include <linux/fs.h>
963         #include <linux/quota.h>
964 ],[
965         ((struct quotactl_ops *)0)->set_dqblk(NULL, *((struct kqid*)0), (struct qc_dqblk*)0);
966 ],[
967         AC_DEFINE(HAVE_DQUOT_QC_DQBLK, 1,
968                 [quotactl_ops.set_dqblk takes struct qc_dqblk])
969         AC_DEFINE(HAVE_DQUOT_KQID, 1,
970                 [quotactl_ops.set_dqblk takes struct kqid])
971 ])
972 EXTRA_KCFLAGS="$tmp_flags"
973 ]) # LC_HAVE_DQUOT_QC_DQBLK
974
975 #
976 # LC_HAVE_AIO_COMPLETE
977 #
978 # 3.19 kernel makes aio_complete() static
979 #
980 AC_DEFUN([LC_HAVE_AIO_COMPLETE], [
981 LB_CHECK_COMPILE([if kernel has exported aio_complete() ],
982 aio_complete, [
983         #include <linux/aio.h>
984 ],[
985         aio_complete(NULL, 0, 0);
986 ],[
987         AC_DEFINE(HAVE_AIO_COMPLETE, 1, [aio_complete defined])
988 ])
989 ]) # LC_HAVE_AIO_COMPLETE
990
991 #
992 # LC_BACKING_DEV_INFO_REMOVAL
993 #
994 # 3.20 kernel removed backing_dev_info from address_space
995 #
996 AC_DEFUN([LC_BACKING_DEV_INFO_REMOVAL], [
997 LB_CHECK_COMPILE([if struct address_space has backing_dev_info],
998 backing_dev_info, [
999         #include <linux/fs.h>
1000 ],[
1001         struct address_space mapping;
1002
1003         mapping.backing_dev_info = NULL;
1004 ],[
1005         AC_DEFINE(HAVE_BACKING_DEV_INFO, 1, [backing_dev_info exist])
1006 ])
1007 ]) # LC_BACKING_DEV_INFO_REMOVAL
1008
1009 #
1010 # LC_HAVE_BDI_CAP_MAP_COPY
1011 #
1012 # 3.20  removed mmap handling for backing devices since
1013 #       it breaks on non-MMU systems. See kernel commit
1014 #       b4caecd48005fbed3949dde6c1cb233142fd69e9
1015 #
1016 AC_DEFUN([LC_HAVE_BDI_CAP_MAP_COPY], [
1017 LB_CHECK_COMPILE([if have 'BDI_CAP_MAP_COPY'],
1018 bdi_cap_map_copy, [
1019         #include <linux/backing-dev.h>
1020 ],[
1021         struct backing_dev_info info;
1022
1023         info.capabilities = BDI_CAP_MAP_COPY;
1024 ],[
1025         AC_DEFINE(HAVE_BDI_CAP_MAP_COPY, 1,
1026                 [BDI_CAP_MAP_COPY exist])
1027 ])
1028 ]) # LC_HAVE_BDI_CAP_MAP_COPY
1029
1030 #
1031 # LC_IOV_ITER_RW
1032 #
1033 # 4.1 kernel has iov_iter_rw
1034 #
1035 AC_DEFUN([LC_IOV_ITER_RW], [
1036 LB_CHECK_COMPILE([if iov_iter_rw exist],
1037 iov_iter_rw, [
1038         #include <linux/fs.h>
1039         #include <linux/uio.h>
1040 ],[
1041         struct iov_iter *iter = NULL;
1042
1043         iov_iter_rw(iter);
1044 ],[
1045         AC_DEFINE(HAVE_IOV_ITER_RW, 1,
1046                 [iov_iter_rw exist])
1047 ])
1048 ]) # LC_IOV_ITER_RW
1049
1050 #
1051 # LC_HAVE_SYNC_READ_WRITE
1052 #
1053 # 4.1 new_sync_[read|write] no longer exported
1054 #
1055 AC_DEFUN([LC_HAVE_SYNC_READ_WRITE], [
1056 LB_CHECK_EXPORT([new_sync_read], [fs/read_write.c],
1057         [AC_DEFINE(HAVE_SYNC_READ_WRITE, 1,
1058                         [new_sync_[read|write] is exported by the kernel])])
1059 ]) # LC_HAVE_SYNC_READ_WRITE
1060
1061 #
1062 # LC_HAVE___BI_CNT
1063 #
1064 # 4.1 redefined bi_cnt as __bi_cnt in commit dac56212e8127dbc0
1065 #
1066 AC_DEFUN([LC_HAVE___BI_CNT], [
1067 LB_CHECK_COMPILE([if Linux kernel has __bi_cnt in struct bio],
1068 have___bi_cnt, [
1069         #include <asm/atomic.h>
1070         #include <linux/bio.h>
1071         #include <linux/blk_types.h>
1072 ],[
1073         struct bio bio = { };
1074         int cnt;
1075         cnt = atomic_read(&bio.__bi_cnt);
1076 ], [
1077         AC_DEFINE(HAVE___BI_CNT, 1,
1078                 [struct bio has __bi_cnt])
1079 ])
1080 ]) # LC_HAVE___BI_CNT
1081
1082 #
1083 # LC_SYMLINK_OPS_USE_NAMEIDATA
1084 #
1085 # For the 4.2+ kernels the file system internal symlink api no
1086 # longer uses struct nameidata as a argument
1087 #
1088 AC_DEFUN([LC_SYMLINK_OPS_USE_NAMEIDATA], [
1089 LB_CHECK_COMPILE([if symlink inode operations have struct nameidata argument],
1090 symlink_use_nameidata, [
1091         #include <linux/namei.h>
1092         #include <linux/fs.h>
1093 ],[
1094         struct nameidata *nd = NULL;
1095
1096         ((struct inode_operations *)0)->follow_link(NULL, nd);
1097         ((struct inode_operations *)0)->put_link(NULL, nd, NULL);
1098 ],[
1099         AC_DEFINE(HAVE_SYMLINK_OPS_USE_NAMEIDATA, 1,
1100                 [symlink inode operations need struct nameidata argument])
1101 ])
1102 ]) # LC_SYMLINK_OPS_USE_NAMEIDATA
1103
1104 #
1105 # LC_BIO_ENDIO_USES_ONE_ARG
1106 #
1107 # 4.2 kernel bio_endio now only takes one argument
1108 #
1109 AC_DEFUN([LC_BIO_ENDIO_USES_ONE_ARG], [
1110 LB_CHECK_COMPILE([if 'bio_endio' with one argument exist],
1111 bio_endio, [
1112         #include <linux/bio.h>
1113 ],[
1114         bio_endio(NULL);
1115 ],[
1116         AC_DEFINE(HAVE_BIO_ENDIO_USES_ONE_ARG, 1,
1117                 [bio_endio takes only one argument])
1118 ])
1119 ]) # LC_BIO_ENDIO_USES_ONE_ARG
1120
1121 #
1122 # LC_ACCOUNT_PAGE_DIRTIED_3ARGS
1123 #
1124 # 4.2 [to 4.5] kernel page dirtied takes 3 arguments
1125 #
1126 AC_DEFUN([LC_ACCOUNT_PAGE_DIRTIED_3ARGS], [
1127 LB_CHECK_COMPILE([if 'account_page_dirtied' with 3 args exists],
1128 account_page_dirtied, [
1129         #include <linux/mm.h>
1130 ],[
1131         account_page_dirtied(NULL, NULL, NULL);
1132 ],[
1133         AC_DEFINE(HAVE_ACCOUNT_PAGE_DIRTIED_3ARGS, 1,
1134                 [account_page_dirtied takes three arguments])
1135 ])
1136 ]) # LC_ACCOUNT_PAGE_DIRTIED_3ARGS
1137
1138 #
1139 # LC_HAVE_INTERVAL_EXP_BLK_INTEGRITY
1140 #
1141 # 4.3 replace interval with interval_exp in 'struct blk_integrity'
1142 # 'struct blk_integrity_profile' is also added in this version,
1143 # thus use this to determine whether 'struct blk_integrity' has profile
1144 #
1145 AC_DEFUN([LC_HAVE_INTERVAL_EXP_BLK_INTEGRITY], [
1146 LB_CHECK_COMPILE([if 'blk_integrity.interval_exp' exist],
1147 blk_integrity_interval_exp, [
1148         #include <linux/blkdev.h>
1149 ],[
1150         ((struct blk_integrity *)0)->interval_exp = 0;
1151 ],[
1152         AC_DEFINE(HAVE_INTERVAL_EXP_BLK_INTEGRITY, 1,
1153                 [blk_integrity.interval_exp exist])
1154 ])
1155 ]) # LC_HAVE_INTERVAL_EXP_BLK_INTEGRITY
1156
1157 #
1158 # LC_HAVE_CACHE_HEAD_HLIST
1159 #
1160 # 4.3 kernel swiched to hlist for cache_head
1161 #
1162 AC_DEFUN([LC_HAVE_CACHE_HEAD_HLIST], [
1163 LB_CHECK_COMPILE([if 'struct cache_head' has 'cache_list' field],
1164 cache_head_has_hlist, [
1165         #include <linux/sunrpc/cache.h>
1166 ],[
1167         do {} while(sizeof(((struct cache_head *)0)->cache_list));
1168 ],[
1169         AC_DEFINE(HAVE_CACHE_HEAD_HLIST, 1,
1170                 [cache_head has hlist cache_list])
1171 ])
1172 ]) # LC_HAVE_CACHE_HEAD_HLIST
1173
1174 #
1175 # LC_HAVE_XATTR_HANDLER_SIMPLIFIED
1176 #
1177 # Kernel version 4.3 commit e409de992e3ea3674393465f07cc71c948edd87a
1178 # simplified xattr_handler handling by passing in the handler pointer
1179 #
1180 AC_DEFUN([LC_HAVE_XATTR_HANDLER_SIMPLIFIED], [
1181 tmp_flags="$EXTRA_KCFLAGS"
1182 EXTRA_KCFLAGS="-Werror"
1183 LB_CHECK_COMPILE([if 'struct xattr_handler' functions pass in handler pointer],
1184 xattr_handler_simplified, [
1185         #include <linux/xattr.h>
1186 ],[
1187         struct xattr_handler handler;
1188
1189         ((struct xattr_handler *)0)->get(&handler, NULL, NULL, NULL, 0);
1190         ((struct xattr_handler *)0)->set(&handler, NULL, NULL, NULL, 0, 0);
1191 ],[
1192         AC_DEFINE(HAVE_XATTR_HANDLER_SIMPLIFIED, 1, [handler pointer is parameter])
1193 ])
1194 EXTRA_KCFLAGS="$tmp_flags"
1195 ]) # LC_HAVE_XATTR_HANDLER_SIMPLIFIED
1196
1197 #
1198 # LC_HAVE_BIP_ITER_BIO_INTEGRITY_PAYLOAD
1199 #
1200 # 4.3 replace interval with interval_exp in 'struct blk_integrity'.
1201 #
1202 AC_DEFUN([LC_HAVE_BIP_ITER_BIO_INTEGRITY_PAYLOAD], [
1203 LB_CHECK_COMPILE([if 'bio_integrity_payload.bip_iter' exist],
1204 bio_integrity_payload_bip_iter, [
1205         #include <linux/bio.h>
1206 ],[
1207         ((struct bio_integrity_payload *)0)->bip_iter.bi_size = 0;
1208 ],[
1209         AC_DEFINE(HAVE_BIP_ITER_BIO_INTEGRITY_PAYLOAD, 1,
1210                 [bio_integrity_payload.bip_iter exist])
1211 ])
1212 ]) # LC_HAVE_BIP_ITER_BIO_INTEGRITY_PAYLOAD
1213
1214 #
1215 # LC_BIO_INTEGRITY_PREP_FN
1216 #
1217 # Lustre kernel patch extents bio_integrity_prep to accept optional
1218 # generate/verify_fn as extra args.
1219 #
1220 AC_DEFUN([LC_BIO_INTEGRITY_PREP_FN], [
1221 LB_CHECK_COMPILE([if 'bio_integrity_prep_fn' exists],
1222 bio_integrity_prep_fn, [
1223         #include <linux/bio.h>
1224 ],[
1225         bio_integrity_prep_fn(NULL, NULL, NULL);
1226 ],[
1227         AC_DEFINE(HAVE_BIO_INTEGRITY_PREP_FN, 1,
1228                 [kernel has bio_integrity_prep_fn])
1229         AC_SUBST(PATCHED_INTEGRITY_INTF)
1230 ],[
1231         AC_SUBST(PATCHED_INTEGRITY_INTF, [#])
1232 ])
1233 ]) # LC_BIO_INTEGRITY_PREP_FN
1234
1235 #
1236 # LC_HAVE_BI_OPF
1237 #
1238 # 4.4/4.8 redefined bi_rw as bi_opf (SLES12/kernel commit 4382e33ad37486)
1239 #
1240 AC_DEFUN([LC_HAVE_BI_OPF], [
1241 LB_CHECK_COMPILE([if Linux kernel has bi_opf in struct bio],
1242 have_bi_opf, [
1243         #include <linux/bio.h>
1244 ],[
1245         struct bio bio;
1246
1247         bio.bi_opf = 0;
1248 ], [
1249         AC_DEFINE(HAVE_BI_OPF, 1,
1250                 [struct bio has bi_opf])
1251 ])
1252 ]) # LC_HAVE_BI_OPF
1253
1254 #
1255 # LC_HAVE_SUBMIT_BIO_2ARGS
1256 #
1257 # 4.4 removed an argument from submit_bio
1258 #
1259 AC_DEFUN([LC_HAVE_SUBMIT_BIO_2ARGS], [
1260 LB_CHECK_COMPILE([if submit_bio takes two arguments],
1261 have_submit_bio_2args, [
1262         #include <linux/bio.h>
1263 ],[
1264         struct bio bio;
1265         submit_bio(READ, &bio);
1266 ], [
1267         AC_DEFINE(HAVE_SUBMIT_BIO_2ARGS, 1,
1268                 [submit_bio takes two arguments])
1269 ])
1270 ]) # LC_HAVE_SUBMIT_BIO_2_ARGS
1271
1272 #
1273 # LC_HAVE_CLEAN_BDEV_ALIASES
1274 #
1275 # 4.4/4.9 unmap_underlying_metadata was replaced by clean_bdev_aliases
1276 # (SLES12/kernel commit 29f3ad7d8380364c)
1277 #
1278 AC_DEFUN([LC_HAVE_CLEAN_BDEV_ALIASES], [
1279 LB_CHECK_COMPILE([if kernel has clean_bdev_aliases],
1280 have_clean_bdev_aliases, [
1281         #include <linux/buffer_head.h>
1282 ],[
1283         struct block_device bdev;
1284         clean_bdev_aliases(&bdev,1,1);
1285 ], [
1286         AC_DEFINE(HAVE_CLEAN_BDEV_ALIASES, 1,
1287                 [kernel has clean_bdev_aliases])
1288 ])
1289 ]) # LC_HAVE_CLEAN_BDEV_ALIASES
1290
1291 #
1292 # LC_HAVE_LOCKS_LOCK_FILE_WAIT
1293 #
1294 # 4.4 kernel have moved locks API users to
1295 # locks_lock_inode_wait()
1296 #
1297 AC_DEFUN([LC_HAVE_LOCKS_LOCK_FILE_WAIT], [
1298 LB_CHECK_COMPILE([if 'locks_lock_file_wait' exists],
1299 locks_lock_file_wait, [
1300         #include <linux/fs.h>
1301 ],[
1302         locks_lock_file_wait(NULL, NULL);
1303 ],[
1304         AC_DEFINE(HAVE_LOCKS_LOCK_FILE_WAIT, 1,
1305                 [kernel has locks_lock_file_wait])
1306 ])
1307 ]) # LC_HAVE_LOCKS_LOCK_FILE_WAIT
1308
1309 #
1310 # LC_HAVE_KEY_PAYLOAD_DATA_ARRAY
1311 #
1312 # 4.4 kernel merged type-specific data with the payload data for keys
1313 #
1314 AC_DEFUN([LC_HAVE_KEY_PAYLOAD_DATA_ARRAY], [
1315 LB_CHECK_COMPILE([if 'struct key' has 'payload.data' as an array],
1316 key_payload_data_array, [
1317         #include <linux/key.h>
1318 ],[
1319         struct key key = { };
1320
1321         key.payload.data[0] = NULL;
1322 ],[
1323         AC_DEFINE(HAVE_KEY_PAYLOAD_DATA_ARRAY, 1, [payload.data is an array])
1324 ])
1325 ]) #LC_HAVE_KEY_PAYLOAD_DATA_ARRAY
1326
1327 #
1328 # LC_HAVE_XATTR_HANDLER_NAME
1329 #
1330 # Kernel version 4.4 commit 98e9cb5711c68223f0e4d5201b9a6add255ec550
1331 # add a name member to struct xattr_handler
1332 #
1333 AC_DEFUN([LC_HAVE_XATTR_HANDLER_NAME], [
1334 tmp_flags="$EXTRA_KCFLAGS"
1335 EXTRA_KCFLAGS="-Werror"
1336 LB_CHECK_COMPILE([if 'struct xattr_handler' has a name member],
1337 xattr_handler_name, [
1338         #include <linux/xattr.h>
1339 ],[
1340         ((struct xattr_handler *)NULL)->name = NULL;
1341 ],[
1342         AC_DEFINE(HAVE_XATTR_HANDLER_NAME, 1, [xattr_handler has a name member])
1343 ])
1344 EXTRA_KCFLAGS="$tmp_flags"
1345 ]) # LC_HAVE_XATTR_HANDLER_NAME
1346
1347 #
1348 # LC_HAVE_FILE_DENTRY
1349 #
1350 # 4.5 adds wrapper file_dentry
1351 #
1352 AC_DEFUN([LC_HAVE_FILE_DENTRY], [
1353 LB_CHECK_COMPILE([if Linux kernel has 'file_dentry'],
1354 file_dentry, [
1355         #include <linux/fs.h>
1356 ],[
1357         file_dentry(NULL);
1358 ], [
1359         AC_DEFINE(HAVE_FILE_DENTRY, 1,
1360                 [kernel has file_dentry])
1361 ])
1362 ]) # LC_HAVE_FILE_DENTRY
1363
1364 #
1365 # LC_HAVE_INODE_LOCK
1366 #
1367 # 4.5 introduced inode_lock
1368 #
1369 AC_DEFUN([LC_HAVE_INODE_LOCK], [
1370 LB_CHECK_COMPILE([if 'inode_lock' is defined],
1371 inode_lock, [
1372         #include <linux/fs.h>
1373 ],[
1374         inode_lock(NULL);
1375 ], [
1376         AC_DEFINE(HAVE_INODE_LOCK, 1,
1377                   [inode_lock is defined])
1378 ])
1379 ]) # LC_HAVE_INODE_LOCK
1380
1381 #
1382 # LC_HAVE_IOP_GET_LINK
1383 #
1384 # 4.5 vfs replaced iop->follow_link with
1385 # iop->get_link
1386 #
1387 AC_DEFUN([LC_HAVE_IOP_GET_LINK], [
1388 LB_CHECK_COMPILE([if 'iop' has 'get_link'],
1389 inode_ops_get_link, [
1390         #include <linux/fs.h>
1391 ],[
1392         struct inode_operations iop;
1393         iop.get_link = NULL;
1394 ],[
1395         AC_DEFINE(HAVE_IOP_GET_LINK, 1,
1396                 [have iop get_link])
1397 ])
1398 ]) # LC_HAVE_IOP_GET_LINK
1399
1400 #
1401 # LC_HAVE_IN_COMPAT_SYSCALL
1402 #
1403 # 4.6 renamed is_compat_task to in_compat_syscall
1404 #
1405 AC_DEFUN([LC_HAVE_IN_COMPAT_SYSCALL], [
1406 LB_CHECK_COMPILE([if 'in_compat_syscall' is defined],
1407 in_compat_syscall, [
1408         #include <linux/compat.h>
1409 ],[
1410         in_compat_syscall();
1411 ],[
1412         AC_DEFINE(HAVE_IN_COMPAT_SYSCALL, 1,
1413                 [have in_compat_syscall])
1414 ])
1415 ]) # LC_HAVE_IN_COMPAT_SYSCALL
1416
1417 #
1418 # LC_HAVE_XATTR_HANDLER_INODE_PARAM
1419 #
1420 # Kernel version 4.6 commit b296821a7c42fa58baa17513b2b7b30ae66f3336
1421 # and commit 5930122683dff58f0846b0f0405b4bd598a3ba6a added inode parameter
1422 # to xattr_handler functions
1423 #
1424 AC_DEFUN([LC_HAVE_XATTR_HANDLER_INODE_PARAM], [
1425 tmp_flags="$EXTRA_KCFLAGS"
1426 EXTRA_KCFLAGS="-Werror"
1427 LB_CHECK_COMPILE([if 'struct xattr_handler' functions have inode parameter],
1428 xattr_handler_inode_param, [
1429         #include <linux/xattr.h>
1430 ],[
1431         const struct xattr_handler handler;
1432
1433         ((struct xattr_handler *)0)->get(&handler, NULL, NULL, NULL, NULL, 0);
1434         ((struct xattr_handler *)0)->set(&handler, NULL, NULL, NULL, NULL, 0, 0);
1435 ],[
1436         AC_DEFINE(HAVE_XATTR_HANDLER_INODE_PARAM, 1, [needs inode parameter])
1437 ])
1438 EXTRA_KCFLAGS="$tmp_flags"
1439 ]) # LC_HAVE_XATTR_HANDLER_INODE_PARAM
1440
1441 #
1442 # LC_D_IN_LOOKUP
1443 #
1444 # Kernel version 4.6 commit 85c7f81041d57cfe9dc97f4680d5586b54534a39
1445 # introduced parallel lookups in the VFS layer. The inline function
1446 # d_in_lookup was added to notify when the same item was being queried
1447 # at the same time.
1448 #
1449 AC_DEFUN([LC_D_IN_LOOKUP], [
1450 tmp_flags="$EXTRA_KCFLAGS"
1451 EXTRA_KCFLAGS="-Werror"
1452 LB_CHECK_COMPILE([if 'd_in_lookup' is defined],
1453 d_in_lookup, [
1454         #include <linux/dcache.h>
1455 ],[
1456         d_in_lookup(NULL);
1457 ],[
1458         AC_DEFINE(HAVE_D_IN_LOOKUP, 1, [d_in_lookup is defined])
1459 ])
1460 EXTRA_KCFLAGS="$tmp_flags"
1461 ]) # LC_D_IN_LOOKUP
1462
1463 #
1464 # LC_LOCK_PAGE_MEMCG
1465 #
1466 # Kernel version 4.6 adds lock_page_memcg
1467 #
1468 AC_DEFUN([LC_LOCK_PAGE_MEMCG], [
1469 LB_CHECK_COMPILE([if 'lock_page_memcg' is defined],
1470 lock_page_memcg, [
1471         #include <linux/memcontrol.h>
1472 ],[
1473         lock_page_memcg(NULL);
1474 ],[
1475         AC_DEFINE(HAVE_LOCK_PAGE_MEMCG, 1,
1476                 [lock_page_memcg is defined])
1477 ])
1478 ]) # LC_LOCK_PAGE_MEMCG
1479
1480 #
1481 # LC_DIRECTIO_2ARGS
1482 #
1483 # Kernel version 4.7 commit c8b8e32d700fe943a935e435ae251364d016c497
1484 # direct-io: eliminate the offset argument to ->direct_IO
1485 #
1486 AC_DEFUN([LC_DIRECTIO_2ARGS], [
1487 LB_CHECK_COMPILE([if '->direct_IO()' taken 2 arguments],
1488 direct_io_2args, [
1489         #include <linux/fs.h>
1490 ],[
1491         struct address_space_operations ops = { };
1492         struct iov_iter *iter = NULL;
1493         struct kiocb *iocb = NULL;
1494         int rc;
1495
1496         rc = ops.direct_IO(iocb, iter);
1497 ],[
1498         AC_DEFINE(HAVE_DIRECTIO_2ARGS, 1,
1499                 [direct_IO need 2 arguments])
1500 ])
1501 ]) # LC_DIRECTIO_2ARGS
1502
1503 #
1504 # LC_GENERIC_WRITE_SYNC_2ARGS
1505 #
1506 # Kernel version 4.7 commit dde0c2e79848298cc25621ad080d47f94dbd7cce
1507 # fs: add IOCB_SYNC and IOCB_DSYNC
1508 #
1509 AC_DEFUN([LC_GENERIC_WRITE_SYNC_2ARGS], [
1510 LB_CHECK_COMPILE([if 'generic_write_sync()' taken 2 arguments],
1511 generic_write_sync_2args, [
1512         #include <linux/fs.h>
1513 ],[
1514         struct kiocb *iocb = NULL;
1515         ssize_t rc;
1516
1517         rc = generic_write_sync(iocb, 0);
1518 ],[
1519         AC_DEFINE(HAVE_GENERIC_WRITE_SYNC_2ARGS, 1,
1520                 [generic_write_sync need 2 arguments])
1521 ])
1522 ]) # LC_GENERIC_WRITE_SYNC_2ARGS
1523
1524 #
1525 # LC_FOP_ITERATE_SHARED
1526 #
1527 # Kernel v4.6-rc3-29-g6192269 adds iterate_shared method to file_operations
1528 #
1529 AC_DEFUN([LC_FOP_ITERATE_SHARED], [
1530 LB_CHECK_COMPILE([if 'file_operations' has 'iterate_shared'],
1531 fop_iterate_shared, [
1532         #include <linux/fs.h>
1533 ],[
1534         struct file_operations fop;
1535         fop.iterate_shared = NULL;
1536 ],[
1537         AC_DEFINE(HAVE_FOP_ITERATE_SHARED, 1,
1538                 [file_operations has iterate_shared])
1539 ])
1540 ]) # LC_FOP_ITERATE_SHARED
1541
1542 #
1543 # LC_HAVE_POSIX_ACL_VALID_USER_NS
1544 #
1545 # 4.8 posix_acl_valid takes struct user_namespace
1546 #
1547 AC_DEFUN([LC_HAVE_POSIX_ACL_VALID_USER_NS], [
1548 LB_CHECK_COMPILE([if 'posix_acl_valid' takes 'struct user_namespace'],
1549 posix_acl_valid, [
1550         #include <linux/fs.h>
1551         #include <linux/posix_acl.h>
1552 ],[
1553         posix_acl_valid((struct user_namespace*)NULL, (const struct posix_acl*)NULL);
1554 ],[
1555         AC_DEFINE(HAVE_POSIX_ACL_VALID_USER_NS, 1,
1556                 [posix_acl_valid takes struct user_namespace])
1557 ])
1558 ]) # LC_HAVE_POSIX_ACL_VALID_USER_NS
1559
1560 #
1561 # LC_D_COMPARE_4ARGS
1562 #
1563 # Kernel version 4.8 commit 6fa67e707559303e086303aeecc9e8b91ef497d5
1564 # get rid of 'parent' argument of ->d_compare()
1565 #
1566 AC_DEFUN([LC_D_COMPARE_4ARGS], [
1567 LB_CHECK_COMPILE([if 'd_compare' taken 4 arguments],
1568 d_compare_4args, [
1569         #include <linux/dcache.h>
1570 ],[
1571         ((struct dentry_operations*)0)->d_compare(NULL,0,NULL,NULL);
1572 ],[
1573         AC_DEFINE(HAVE_D_COMPARE_4ARGS, 1,
1574                 [d_compare need 4 arguments])
1575 ])
1576 ]) # LC_D_COMPARE_4ARGS
1577
1578 #
1579 # LC_FULL_NAME_HASH_3ARGS
1580 #
1581 # Kernel version 4.8 commit 8387ff2577eb9ed245df9a39947f66976c6bcd02
1582 # vfs: make the string hashes salt the hash
1583 #
1584 AC_DEFUN([LC_FULL_NAME_HASH_3ARGS], [
1585 LB_CHECK_COMPILE([if 'full_name_hash' taken 3 arguments],
1586 full_name_hash_3args, [
1587         #include <linux/stringhash.h>
1588 ],[
1589         unsigned int hash;
1590         hash = full_name_hash(NULL,NULL,0);
1591 ],[
1592         AC_DEFINE(HAVE_FULL_NAME_HASH_3ARGS, 1,
1593                 [full_name_hash need 3 arguments])
1594 ])
1595 ]) # LC_FULL_NAME_HASH_3ARGS
1596
1597 #
1598 # LC_STRUCT_POSIX_ACL_XATTR
1599 #
1600 # Kernel version 4.8 commit 2211d5ba5c6c4e972ba6dbc912b2897425ea6621
1601 # posix_acl: xattr representation cleanups
1602 #
1603 AC_DEFUN([LC_STRUCT_POSIX_ACL_XATTR], [
1604 LB_CHECK_COMPILE([if 'struct posix_acl_xattr_{header,entry}' defined],
1605 struct_posix_acl_xattr, [
1606         #include <linux/fs.h>
1607         #include <linux/posix_acl_xattr.h>
1608 ],[
1609         struct posix_acl_xattr_header *h = NULL;
1610         struct posix_acl_xattr_entry  *e;
1611         e = (void *)(h + 1);
1612 ],[
1613         AC_DEFINE(HAVE_STRUCT_POSIX_ACL_XATTR, 1,
1614                 [struct posix_acl_xattr_{header,entry} defined])
1615 ])
1616 ]) # LC_STRUCT_POSIX_ACL_XATTR
1617
1618 #
1619 # LC_IOP_XATTR
1620 #
1621 # Kernel version 4.8 commit fd50ecaddf8372a1d96e0daeaac0f93cf04e4d42
1622 # removed {get,set,remove}xattr inode operations
1623 #
1624 AC_DEFUN([LC_IOP_XATTR], [
1625 LB_CHECK_COMPILE([if 'inode_operations' has {get,set,remove}xattr members],
1626 inode_ops_xattr, [
1627         #include <linux/fs.h>
1628 ],[
1629         struct inode_operations iop;
1630         iop.setxattr = NULL;
1631         iop.getxattr = NULL;
1632         iop.removexattr = NULL;
1633 ],[
1634         AC_DEFINE(HAVE_IOP_XATTR, 1,
1635                 [inode_operations has {get,set,remove}xattr members])
1636 ])
1637 ]) # LC_IOP_XATTR
1638
1639 #
1640 # LC_GROUP_INFO_GID
1641 #
1642 # Kernel version 4.9 commit 81243eacfa400f5f7b89f4c2323d0de9982bb0fb
1643 # cred: simpler, 1D supplementary groups
1644 #
1645 AC_DEFUN([LC_GROUP_INFO_GID], [
1646 LB_CHECK_COMPILE([if 'struct group_info' has member 'gid'],
1647 group_info_gid, [
1648         #include <linux/cred.h>
1649 ],[
1650         kgid_t *p;
1651         p = ((struct group_info *)0)->gid;
1652 ],[
1653         AC_DEFINE(HAVE_GROUP_INFO_GID, 1,
1654                 [struct group_info has member gid])
1655 ])
1656 ]) # LC_GROUP_INFO_GID
1657
1658 #
1659 # LC_VFS_SETXATTR
1660 #
1661 # Kernel version 4.9 commit 5d6c31910bc0713e37628dc0ce677dcb13c8ccf4
1662 # added __vfs_{get,set,remove}xattr helpers
1663 #
1664 AC_DEFUN([LC_VFS_SETXATTR], [
1665 LB_CHECK_COMPILE([if '__vfs_setxattr' helper is available],
1666 vfs_setxattr, [
1667         #include <linux/xattr.h>
1668 ],[
1669         __vfs_setxattr(NULL, NULL, NULL, NULL, 0, 0);
1670 ],[
1671         AC_DEFINE(HAVE_VFS_SETXATTR, 1,
1672                 ['__vfs_setxattr is available])
1673 ])
1674 ]) # LC_VFS_SETXATTR
1675
1676 #
1677 # LC_POSIX_ACL_UPDATE_MODE
1678 #
1679 # Kernel version 4.9 commit 073931017b49d9458aa351605b43a7e34598caef
1680 # posix_acl: Clear SGID bit when setting file permissions
1681 #
1682 AC_DEFUN([LC_POSIX_ACL_UPDATE_MODE], [
1683 LB_CHECK_COMPILE([if 'posix_acl_update_mode' exists],
1684 posix_acl_update_mode, [
1685         #include <linux/fs.h>
1686         #include <linux/posix_acl.h>
1687 ],[
1688         posix_acl_update_mode(NULL, NULL, NULL);
1689 ],[
1690         AC_DEFINE(HAVE_POSIX_ACL_UPDATE_MODE, 1,
1691                 ['posix_acl_update_mode' is available])
1692 ])
1693 ]) # LC_POSIX_ACL_UPDATE_MODE
1694
1695 #
1696 # LC_IOP_GENERIC_READLINK
1697 #
1698 # Kernel version 4.10 commit dfeef68862edd7d4bafe68ef7aeb5f658ef24bb5
1699 # removed generic_readlink from individual file systems
1700 #
1701 AC_DEFUN([LC_IOP_GENERIC_READLINK], [
1702 LB_CHECK_COMPILE([if 'generic_readlink' still exist],
1703 inode_ops_readlink, [
1704         #include <linux/fs.h>
1705 ],[
1706         struct inode_operations iop;
1707         iop.readlink = generic_readlink;
1708 ],[
1709         AC_DEFINE(HAVE_IOP_GENERIC_READLINK, 1,
1710                 [generic_readlink has been removed])
1711 ])
1712 ]) # LC_IOP_GENERIC_READLINK
1713
1714 #
1715 # LC_HAVE_VM_FAULT_ADDRESS
1716 #
1717 # Kernel version 4.10 commit 1a29d85eb0f19b7d8271923d8917d7b4f5540b3e
1718 # removed virtual_address field. Need to use address field instead
1719 #
1720 AC_DEFUN([LC_HAVE_VM_FAULT_ADDRESS], [
1721 LB_CHECK_COMPILE([if 'struct vm_fault' replaced virtual_address with address field],
1722 vm_fault_address, [
1723         #include <linux/mm.h>
1724 ],[
1725         struct vm_fault vmf;
1726         vmf.address = NULL;
1727 ],[
1728         AC_DEFINE(HAVE_VM_FAULT_ADDRESS, 1,
1729                 [virtual_address has been replaced by address field])
1730 ])
1731 ]) # LC_HAVE_VM_FAULT_ADDRESS
1732
1733 #
1734 # LC_INODEOPS_ENHANCED_GETATTR
1735 #
1736 # Kernel version 4.11 commit a528d35e8bfcc521d7cb70aaf03e1bd296c8493f
1737 # expanded getattr to be able to get more stat information.
1738 #
1739 AC_DEFUN([LC_INODEOPS_ENHANCED_GETATTR], [
1740 LB_CHECK_COMPILE([if 'inode_operations' getattr member can gather advance stats],
1741 getattr_path, [
1742         #include <linux/fs.h>
1743 ],[
1744         struct path path;
1745
1746         ((struct inode_operations *)1)->getattr(&path, NULL, 0, 0);
1747 ],[
1748         AC_DEFINE(HAVE_INODEOPS_ENHANCED_GETATTR, 1,
1749                 [inode_operations .getattr member function can gather advance stats])
1750 ])
1751 ]) # LC_INODEOPS_ENHANCED_GETATTR
1752
1753 #
1754 # LC_VM_OPERATIONS_REMOVE_VMF_ARG
1755 #
1756 # Kernel version 4.11 commit 11bac80004499ea59f361ef2a5516c84b6eab675
1757 # removed struct vm_area_struct as an argument for vm_operations since
1758 # in the same kernel version struct vma_area_struct was folded into
1759 # struct vm_fault.
1760 #
1761 AC_DEFUN([LC_VM_OPERATIONS_REMOVE_VMF_ARG], [
1762 LB_CHECK_COMPILE([if 'struct vm_operations' removed struct vm_area_struct],
1763 vm_operations_no_vm_area_struct, [
1764         #include <linux/mm.h>
1765 ],[
1766         struct vm_fault vmf;
1767
1768         ((struct vm_operations_struct *)0)->fault(&vmf);
1769         ((struct vm_operations_struct *)0)->page_mkwrite(&vmf);
1770 ],[
1771         AC_DEFINE(HAVE_VM_OPS_USE_VM_FAULT_ONLY, 1,
1772                 ['struct vm_operations' remove struct vm_area_struct argument])
1773 ])
1774 ]) # LC_VM_OPERATIONS_REMOVE_VMF_ARG
1775
1776 #
1777 # LC_HAVE_KEY_USAGE_REFCOUNT
1778 #
1779 # Kernel version 4.11 commit fff292914d3a2f1efd05ca71c2ba72a3c663201e
1780 # converted key.usage from atomic_t to refcount_t.
1781 #
1782 AC_DEFUN([LC_HAVE_KEY_USAGE_REFCOUNT], [
1783 LB_CHECK_COMPILE([if 'key.usage' is refcount_t],
1784 key_usage_refcount, [
1785         #include <linux/key.h>
1786 ],[
1787         struct key key = { };
1788
1789         refcount_read(&key.usage);
1790 ],[
1791         AC_DEFINE(HAVE_KEY_USAGE_REFCOUNT, 1, [key.usage is of type refcount_t])
1792 ])
1793 ]) #LC_HAVE_KEY_USAGE_REFCOUNT
1794
1795 #
1796 # LC_HAVE_CRYPTO_MAX_ALG_NAME_128
1797 #
1798 # Kernel version 4.11 commit f437a3f477cce402dbec6537b29e9e33962c9f73
1799 # switched CRYPTO_MAX_ALG_NAME from 64 to 128.
1800 #
1801 AC_DEFUN([LC_HAVE_CRYPTO_MAX_ALG_NAME_128], [
1802 LB_CHECK_COMPILE([if 'CRYPTO_MAX_ALG_NAME' is 128],
1803 crypto_max_alg_name, [
1804         #include <linux/crypto.h>
1805 ],[
1806         #if CRYPTO_MAX_ALG_NAME != 128
1807         exit(1);
1808         #endif
1809 ],[
1810         AC_DEFINE(HAVE_CRYPTO_MAX_ALG_NAME_128, 1,
1811                 ['CRYPTO_MAX_ALG_NAME' is 128])
1812 ])
1813 ]) # LC_HAVE_CRYPTO_MAX_ALG_NAME_128
1814
1815 #
1816 # Kernel version 4.12 commit 47f38c539e9a42344ff5a664942075bd4df93876
1817 # CURRENT_TIME is not 64 bit time safe so it was replaced with
1818 # current_time()
1819 #
1820 AC_DEFUN([LC_CURRENT_TIME], [
1821 LB_CHECK_COMPILE([if CURRENT_TIME has been replaced with current_time],
1822 current_time, [
1823         #include <linux/fs.h>
1824 ],[
1825         struct iattr attr;
1826
1827         attr.ia_atime = current_time(NULL);
1828 ],[
1829         AC_DEFINE(HAVE_CURRENT_TIME, 1,
1830                 [current_time() has replaced CURRENT_TIME])
1831 ])
1832 ]) # LIBCFS_CURRENT_TIME
1833
1834 #
1835 # Kernel version 4.12-rc3 85787090a21eb749d8b347eaf9ff1a455637473c
1836 # changed struct super_block s_uuid into a proper uuid_t
1837 #
1838 AC_DEFUN([LC_SUPER_BLOCK_S_UUID], [
1839 LB_CHECK_COMPILE([if 'struct super_block' s_uuid is uuid_t],
1840 super_block_s_uuid, [
1841         #include <linux/fs.h>
1842 ],[
1843         struct super_block sb;
1844
1845         uuid_parse(NULL, &sb.s_uuid);
1846 ],[
1847         AC_DEFINE(HAVE_S_UUID_AS_UUID_T, 1, ['s_uuid' is an uuid_t])
1848 ])
1849 ]) # LC_SUPER_BLOCK_S_UUID
1850
1851 #
1852 # LC_SUPER_SETUP_BDI_NAME
1853 #
1854 # Kernel version 4.12 commit 9594caf216dc0fe3e318b34af0127276db661241
1855 # unified bdi handling
1856 #
1857 AC_DEFUN([LC_SUPER_SETUP_BDI_NAME], [
1858 LB_CHECK_COMPILE([if 'super_setup_bdi_name' exist],
1859 super_setup_bdi_name, [
1860         #include <linux/fs.h>
1861 ],[
1862         super_setup_bdi_name(NULL, "lustre");
1863 ],[
1864         AC_DEFINE(HAVE_SUPER_SETUP_BDI_NAME, 1,
1865                 ['super_setup_bdi_name' is available])
1866 ])
1867 ]) # LC_SUPER_SETUP_BDI_NAME
1868
1869 #
1870 # LC_BI_STATUS
1871 #
1872 # 4.12 replace bi_error to bi_status
1873 #
1874 AC_DEFUN([LC_BI_STATUS], [
1875 LB_CHECK_COMPILE([if 'bi_status' exist],
1876 bi_status, [
1877         #include <linux/blk_types.h>
1878 ],[
1879         ((struct bio *)0)->bi_status = 0;
1880 ],[
1881         AC_DEFINE(HAVE_BI_STATUS, 1,
1882                 ['bi_status' is available])
1883 ])
1884 ]) # LC_BI_STATUS
1885
1886 #
1887 # LC_BIO_INTEGRITY_ENABLED
1888 #
1889 # 4.13 removed bio_integrity_enabled
1890 #
1891 AC_DEFUN([LC_BIO_INTEGRITY_ENABLED], [
1892 LB_CHECK_COMPILE([if 'bio_integrity_enabled' exist],
1893 bio_integrity_enabled, [
1894         #include <linux/bio.h>
1895 ],[
1896         bio_integrity_enabled(NULL);
1897 ],[
1898         AC_DEFINE(HAVE_BIO_INTEGRITY_ENABLED, 1,
1899                 ['bio_integrity_enabled' is available])
1900 ])
1901 ]) # LC_BIO_INTEGRITY_ENABLED
1902
1903 #
1904 # LC_PAGEVEC_INIT_ONE_PARAM
1905 #
1906 # 4.14 pagevec_init takes one parameter
1907 #
1908 AC_DEFUN([LC_PAGEVEC_INIT_ONE_PARAM], [
1909 LB_CHECK_COMPILE([if 'pagevec_init' takes one parameter],
1910 pagevec_init, [
1911         #include <linux/pagevec.h>
1912 ],[
1913         pagevec_init(NULL);
1914 ],[
1915         AC_DEFINE(HAVE_PAGEVEC_INIT_ONE_PARAM, 1,
1916                 ['pagevec_init' takes one parameter])
1917 ])
1918 ]) # LC_PAGEVEC_INIT_ONE_PARAM
1919
1920 #
1921 # LC_BI_BDEV
1922 #
1923 # 4.14 replaced bi_bdev to bi_disk
1924 #
1925 AC_DEFUN([LC_BI_BDEV], [
1926 LB_CHECK_COMPILE([if 'bi_bdev' exist],
1927 bi_bdev, [
1928         #include <linux/bio.h>
1929 ],[
1930         ((struct bio *)0)->bi_bdev = NULL;
1931 ],[
1932         AC_DEFINE(HAVE_BI_BDEV, 1,
1933                 ['bi_bdev' is available])
1934 ])
1935 ]) # LC_BI_BDEV
1936
1937 #
1938 # LC_IS_ENCRYPTED
1939 #
1940 # 4.14 introduced IS_ENCRYPTED and S_ENCRYPTED
1941 #
1942 AC_DEFUN([LC_IS_ENCRYPTED], [
1943 LB_CHECK_COMPILE([if IS_ENCRYPTED is defined],
1944 is_encrypted, [
1945         #include <linux/fs.h>
1946 ],[
1947         IS_ENCRYPTED((struct inode *)0);
1948 ],[
1949         has_is_encrypted="yes"
1950 ])
1951 ]) # LC_IS_ENCRYPTED
1952
1953 #
1954 # LC_I_PAGES
1955 #
1956 # kernel 4.17 commit b93b016313b3ba8003c3b8bb71f569af91f19fc7
1957 #
1958 AC_DEFUN([LC_I_PAGES], [
1959 LB_CHECK_COMPILE([if struct address_space has i_pages],
1960 i_pages, [
1961         #include <linux/fs.h>
1962 ],[
1963         struct address_space mapping = {};
1964         void *i_pages;
1965
1966         i_pages = &mapping.i_pages;
1967 ],[
1968         AC_DEFINE(HAVE_I_PAGES, 1,
1969                 [struct address_space has i_pages])
1970 ])
1971 ]) # LC_I_PAGES
1972
1973 #
1974 # LC_VM_FAULT_T
1975 #
1976 # kernel 4.17 commit 3d3539018d2cbd12e5af4a132636ee7fd8d43ef0
1977 # mm: create the new vm_fault_t type
1978 #
1979 AC_DEFUN([LC_VM_FAULT_T], [
1980 LB_CHECK_COMPILE([if vm_fault_t type exists],
1981 vm_fault_t, [
1982         #include <linux/mm_types.h>
1983 ],[
1984         vm_fault_t x = VM_FAULT_SIGBUS;
1985         (void)x
1986 ],[
1987         AC_DEFINE(HAVE_VM_FAULT_T, 1,
1988                 [if vm_fault_t type exists])
1989 ])
1990 ]) # LC_VM_FAULT_T
1991
1992 #
1993 # LC_INODE_TIMESPEC64
1994 #
1995 # kernel 4.17-rc7 commit 8efd6894ff089adeeac7cb9f32125b85d963d1bc
1996 # fs: add timespec64_truncate()
1997 # kernel 4.18 commit 95582b00838837fc07e042979320caf917ce3fe6
1998 # inode timestamps switched to timespec64
1999 # kernel 4.19-rc2 commit 976516404ff3fab2a8caa8bd6f5efc1437fed0b8
2000 # y2038: remove unused time interfaces
2001 # ...
2002 #  timespec_trunc
2003 # ...
2004 # When inode times are timespec64 stop using the deprecated
2005 # time interfaces.
2006 #
2007 AC_DEFUN([LC_INODE_TIMESPEC64], [
2008 tmp_flags="$EXTRA_KCFLAGS"
2009 EXTRA_KCFLAGS="-Werror"
2010 LB_CHECK_COMPILE([if inode timestamps are struct timespec64],
2011 inode_timespec64, [
2012         #include <linux/fs.h>
2013 ],[
2014         struct inode *inode = NULL;
2015         struct timespec64 ts = {};
2016
2017         inode->i_atime = timespec64_trunc(ts, 1);
2018         (void)inode;
2019 ],[
2020         AC_DEFINE(HAVE_INODE_TIMESPEC64, 1,
2021                 [inode times are using timespec64])
2022 ])
2023 EXTRA_KCFLAGS="$tmp_flags"
2024 ]) # LC_INODE_TIMESPEC64
2025
2026 #
2027 # LC___XA_SET_MARK
2028 #
2029 # kernel 4.20 commit v4.19-rc5-248-g9b89a0355144
2030 # xarray: Add XArray marks - replaced radix_tree_tag_set
2031 #
2032 AC_DEFUN([LC___XA_SET_MARK], [
2033 tmp_flags="$EXTRA_KCFLAGS"
2034 EXTRA_KCFLAGS="-Werror"
2035 LB_CHECK_COMPILE([if '__xa_set_mark' exists],
2036 __xa_set_mark, [
2037         #include <linux/fs.h>
2038         #include <linux/radix-tree.h>
2039 ],[
2040         radix_tree_tag_set(NULL, 0, PAGECACHE_TAG_DIRTY);
2041 ],[
2042         AC_DEFINE(HAVE_RADIX_TREE_TAG_SET, 1,
2043                 [__xa_set_mark exists])
2044 ])
2045 EXTRA_KCFLAGS="$tmp_flags"
2046 ]) # LC___XA_SET_MARK
2047
2048 #
2049 # LC_UAPI_LINUX_MOUNT_H
2050 #
2051 # kernel 4.20 commit e262e32d6bde0f77fb0c95d977482fc872c51996
2052 # vfs: Suppress MS_* flag defs within the kernel ...
2053 #
2054 AC_DEFUN([LC_UAPI_LINUX_MOUNT_H], [
2055 tmp_flags="$EXTRA_KCFLAGS"
2056 EXTRA_KCFLAGS="-Werror"
2057 LB_CHECK_COMPILE([if MS_RDONLY was moved to uapi/linux/mount.h],
2058 uapi_linux_mount, [
2059         #include <uapi/linux/mount.h>
2060 ],[
2061         int x = MS_RDONLY;
2062         (void)x;
2063 ],[
2064         AC_DEFINE(HAVE_UAPI_LINUX_MOUNT_H, 1,
2065                 [if MS_RDONLY was moved to uapi/linux/mount.h])
2066 ])
2067 EXTRA_KCFLAGS="$tmp_flags"
2068 ]) # LC_UAPI_LINUX_MOUNT_H
2069
2070 #
2071 # LC_HAVE_SUNRPC_CACHE_HASH_LOCK_IS_A_SPINLOCK
2072 #
2073 # kernel 4.20 commit 1863d77f15da0addcd293a1719fa5d3ef8cde3ca
2074 # SUNRPC: Replace the cache_detail->hash_lock with a regular spinlock
2075 #
2076 # Now that the reader functions are all RCU protected, use a regular
2077 # spinlock rather than a reader/writer lock.
2078 #
2079 AC_DEFUN([LC_HAVE_SUNRPC_CACHE_HASH_LOCK_IS_A_SPINLOCK], [
2080 tmp_flags="$EXTRA_KCFLAGS"
2081 EXTRA_KCFLAGS="-Werror"
2082 LB_CHECK_COMPILE([if cache_detail->hash_lock is a spinlock],
2083 hash_lock_isa_spinlock_t, [
2084         #include <linux/sunrpc/cache.h>
2085 ],[
2086         spinlock_t *lock = &(((struct cache_detail *)0)->hash_lock);
2087         spin_lock(lock);
2088 ],[
2089         AC_DEFINE(HAVE_CACHE_HASH_SPINLOCK, 1,
2090                 [if cache_detail->hash_lock is a spinlock])
2091 ])
2092 EXTRA_KCFLAGS="$tmp_flags"
2093 ]) # LC_HAVE_SUNRPC_CACHE_HASH_LOCK_IS_A_SPINLOCK
2094
2095 #
2096 # LC_HAS_LINUX_SELINUX_ENABLED
2097 #
2098 # kernel 5.1 commit 3d252529480c68bfd6a6774652df7c8968b28e41
2099 # SELinux: Remove unused selinux_is_enabled
2100 #
2101 AC_DEFUN([LC_HAS_LINUX_SELINUX_ENABLED], [
2102 tmp_flags="$EXTRA_KCFLAGS"
2103 EXTRA_KCFLAGS="-Werror"
2104 LB_CHECK_COMPILE([if linux/selinux.h exists],
2105 selinux_is_enabled, [
2106         #include <linux/selinux.h>
2107 ],[
2108         bool has_selinux = selinux_is_enabled();
2109         (void)has_selinux;
2110 ],[
2111         AC_DEFINE(HAVE_LINUX_SELINUX_IS_ENABLED, 1,
2112                 [if linux/selinux.h exists])
2113 ])
2114 EXTRA_KCFLAGS="$tmp_flags"
2115 ]) # LC_HAS_LINUX_SELINUX_ENABLED
2116
2117 #
2118 # LB_HAVE_BVEC_ITER_ALL
2119 #
2120 # kernel 5.1 commit 6dc4f100c175dd0511ae8674786e7c9006cdfbfa
2121 # block: allow bio_for_each_segment_all() to iterate over multi-page bvec
2122 #
2123 AC_DEFUN([LB_HAVE_BVEC_ITER_ALL], [
2124 tmp_flags="$EXTRA_KCFLAGS"
2125 EXTRA_KCFLAGS="-Werror"
2126 LB_CHECK_COMPILE([if bvec_iter_all exists for multi-page bvec iternation],
2127 ext4fs_dirhash, [
2128         #include <linux/bvec.h>
2129 ],[
2130         struct bvec_iter_all iter;
2131         (void)iter;
2132 ],[
2133         AC_DEFINE(HAVE_BVEC_ITER_ALL, 1,
2134                 [if bvec_iter_all exists for multi-page bvec iternation])
2135 ])
2136 EXTRA_KCFLAGS="$tmp_flags"
2137 ]) # LB_HAVE_BVEC_ITER_ALL
2138
2139 #
2140 # LC_ACCOUNT_PAGE_DIRTIED
2141 #
2142 # After 5.2 kernel page dirtied is not exported
2143 #
2144 AC_DEFUN([LC_ACCOUNT_PAGE_DIRTIED], [
2145 LB_CHECK_EXPORT([account_page_dirtied], [mm/page-writeback.c],
2146         [AC_DEFINE(HAVE_ACCOUNT_PAGE_DIRTIED_EXPORT, 1,
2147                         [account_page_dirtied is exported])])
2148 ]) # LC_ACCOUNT_PAGE_DIRTIED
2149
2150 #
2151 # LC_KEYRING_SEARCH_4ARGS
2152 #
2153 # Kernel 5.2 commit dcf49dbc8077
2154 # keys: Add a 'recurse' flag for keyring searches
2155 #
2156 AC_DEFUN([LC_KEYRING_SEARCH_4ARGS], [
2157 LB_CHECK_COMPILE([if 'keyring_search' has 4 args],
2158 keyring_search_4args, [
2159         #include <linux/key.h>
2160 ],[
2161         key_ref_t keyring;
2162         keyring_search(keyring, NULL, NULL, false);
2163 ],[
2164         AC_DEFINE(HAVE_KEYRING_SEARCH_4ARGS, 1,
2165                 [keyring_search has 4 args])
2166 ])
2167 ]) # LC_KEYRING_SEARCH_4ARGS
2168
2169 #
2170 # LC_BIO_BI_PHYS_SEGMENTS
2171 #
2172 # kernel 5.3-rc1 commit 14ccb66b3f585b2bc21e7256c96090abed5a512c
2173 # block: remove the bi_phys_segments field in struct bio
2174 #
2175 AC_DEFUN([LC_BIO_BI_PHYS_SEGMENTS], [
2176 tmp_flags="$EXTRA_KCFLAGS"
2177 EXTRA_KCFLAGS="-Werror"
2178 LB_CHECK_COMPILE([if struct bio has bi_phys_segments member],
2179 bye_bio_bi_phys_segments, [
2180         #include <linux/bio.h>
2181 ],[
2182         struct bio *bio = NULL;
2183         bio->bi_phys_segments++;
2184 ],[
2185         AC_DEFINE(HAVE_BIO_BI_PHYS_SEGMENTS, 1,
2186                 [struct bio has bi_phys_segments member])
2187 ])
2188 EXTRA_KCFLAGS="$tmp_flags"
2189 ]) # LC_BIO_BI_PHYS_SEGMENTS
2190
2191 #
2192 # LC_LM_COMPARE_OWNER_EXISTS
2193 #
2194 # kernel 5.3-rc3 commit f85d93385e9fe6886a751f647f6812a89bf6bee3
2195 # locks: Cleanup lm_compare_owner and lm_owner_key
2196 # removed lm_compare_owner
2197 #
2198 AC_DEFUN([LC_LM_COMPARE_OWNER_EXISTS], [
2199 tmp_flags="$EXTRA_KCFLAGS"
2200 EXTRA_KCFLAGS="-Werror"
2201 LB_CHECK_COMPILE([if lock_manager_operations has lm_compare_owner],
2202 lock_manager_ops_lm_compare_owner, [
2203         #include <linux/fs.h>
2204 ],[
2205         struct lock_manager_operations lm_ops;
2206         lm_ops.lm_compare_owner = NULL;
2207 ],[
2208         AC_DEFINE(HAVE_LM_COMPARE_OWNER, 1,
2209                 [lock_manager_operations has lm_compare_owner])
2210 ])
2211 EXTRA_KCFLAGS="$tmp_flags"
2212 ]) # LC_LM_COMPARE_OWNER_EXISTS
2213
2214 AC_DEFUN([LC_PROG_LINUX_SRC], [])
2215 AC_DEFUN([LC_PROG_LINUX_RESULTS], [])
2216
2217 #
2218 # LC_FSCRYPT_SUPPORT
2219 #
2220 # 5.4 introduced fscrypt encryption policies v2
2221 #
2222 AC_DEFUN([LC_FSCRYPT_SUPPORT], [
2223 LB_CHECK_COMPILE([for fscrypt in-kernel support],
2224 fscrypt_support, [
2225         #define __FS_HAS_ENCRYPTION 0
2226         #include <linux/fscrypt.h>
2227 ],[
2228         fscrypt_ioctl_get_policy_ex(NULL, NULL);
2229 ],[
2230         has_fscrypt_support="yes"
2231 ])
2232 ]) # LC_FSCRYPT_SUPPORT
2233
2234 #
2235 # LC_PROG_LINUX
2236 #
2237 # Lustre linux kernel checks
2238 #
2239 AC_DEFUN([LC_PROG_LINUX], [
2240         AC_MSG_NOTICE([Lustre kernel checks
2241 ==============================================================================])
2242
2243         LC_CONFIG_PINGER
2244         LC_CONFIG_CHECKSUM
2245         LC_CONFIG_FLOCK
2246         LC_CONFIG_HEALTH_CHECK_WRITE
2247         LC_CONFIG_LRU_RESIZE
2248         LC_CONFIG_FHANDLE
2249         LC_CONFIG_GSS
2250
2251         LC_GLIBC_SUPPORT_FHANDLES
2252         LC_GLIBC_SUPPORT_COPY_FILE_RANGE
2253         LC_OPENSSL_SSK
2254         LC_OPENSSL_GETSEPOL
2255
2256         # 3.10
2257         LC_HAVE_PROJECT_QUOTA
2258
2259         # 3.11
2260         LC_INVALIDATE_RANGE
2261         LC_HAVE_DIR_CONTEXT
2262         LC_D_COMPARE_5ARGS
2263         LC_HAVE_DCOUNT
2264         LC_HAVE_DENTRY_D_U_D_ALIAS
2265         LC_HAVE_DENTRY_D_CHILD
2266         LC_PID_NS_FOR_CHILDREN
2267
2268         # 3.12
2269         LC_OLDSIZE_TRUNCATE_PAGECACHE
2270         LC_PTR_ERR_OR_ZERO_MISSING
2271         LC_KIOCB_KI_LEFT
2272
2273         # 3.13
2274         LC_VFS_RENAME_5ARGS
2275         LC_VFS_UNLINK_3ARGS
2276         LC_HAVE_D_IS_POSITIVE
2277
2278         # 3.14
2279         LC_HAVE_BVEC_ITER
2280         LC_HAVE_TRUNCATE_IPAGES_FINAL
2281         LC_IOPS_RENAME_WITH_FLAGS
2282         LC_IOP_SET_ACL
2283
2284         # 3.15
2285         LC_VFS_RENAME_6ARGS
2286
2287         # 3.16
2288         LC_DIRECTIO_USE_ITER
2289         LC_HAVE_IOV_ITER_INIT_DIRECTION
2290         LC_HAVE_IOV_ITER_TRUNCATE
2291         LC_HAVE_FILE_OPERATIONS_READ_WRITE_ITER
2292
2293         # 3.17
2294         LC_HAVE_INTERVAL_BLK_INTEGRITY
2295         LC_KEY_MATCH_DATA
2296
2297         # 3.18
2298         LC_PERCPU_COUNTER_INIT
2299         LC_NFS_FILLDIR_USE_CTX
2300
2301         # 3.19
2302         LC_KIOCB_HAS_NBYTES
2303         LC_HAVE_DQUOT_QC_DQBLK
2304         LC_HAVE_AIO_COMPLETE
2305
2306         # 3.20
2307         LC_BACKING_DEV_INFO_REMOVAL
2308         LC_HAVE_BDI_CAP_MAP_COPY
2309
2310         # 4.1.0
2311         LC_IOV_ITER_RW
2312         LC_HAVE_SYNC_READ_WRITE
2313         LC_HAVE___BI_CNT
2314
2315         # 4.2
2316         LC_BIO_ENDIO_USES_ONE_ARG
2317         LC_SYMLINK_OPS_USE_NAMEIDATA
2318         LC_ACCOUNT_PAGE_DIRTIED_3ARGS
2319
2320         # 4.3
2321         LC_HAVE_INTERVAL_EXP_BLK_INTEGRITY
2322         LC_HAVE_BIP_ITER_BIO_INTEGRITY_PAYLOAD
2323         LC_HAVE_CACHE_HEAD_HLIST
2324         LC_HAVE_XATTR_HANDLER_SIMPLIFIED
2325
2326         # 4.4
2327         LC_HAVE_LOCKS_LOCK_FILE_WAIT
2328         LC_HAVE_KEY_PAYLOAD_DATA_ARRAY
2329         LC_HAVE_XATTR_HANDLER_NAME
2330         LC_HAVE_BI_OPF
2331         LC_HAVE_SUBMIT_BIO_2ARGS
2332         LC_HAVE_CLEAN_BDEV_ALIASES
2333
2334         # 4.5
2335         LC_HAVE_FILE_DENTRY
2336
2337         # 4.5
2338         LC_HAVE_INODE_LOCK
2339         LC_HAVE_IOP_GET_LINK
2340
2341         # 4.6
2342         LC_HAVE_IN_COMPAT_SYSCALL
2343         LC_HAVE_XATTR_HANDLER_INODE_PARAM
2344         LC_LOCK_PAGE_MEMCG
2345
2346         # 4.7
2347         LC_D_IN_LOOKUP
2348         LC_DIRECTIO_2ARGS
2349         LC_GENERIC_WRITE_SYNC_2ARGS
2350         LC_FOP_ITERATE_SHARED
2351
2352         # 4.8
2353         LC_HAVE_POSIX_ACL_VALID_USER_NS
2354         LC_D_COMPARE_4ARGS
2355         LC_FULL_NAME_HASH_3ARGS
2356         LC_STRUCT_POSIX_ACL_XATTR
2357         LC_IOP_XATTR
2358
2359         # 4.9
2360         LC_GROUP_INFO_GID
2361         LC_VFS_SETXATTR
2362         LC_POSIX_ACL_UPDATE_MODE
2363
2364         # 4.10
2365         LC_IOP_GENERIC_READLINK
2366         LC_HAVE_VM_FAULT_ADDRESS
2367
2368         # 4.11
2369         LC_INODEOPS_ENHANCED_GETATTR
2370         LC_VM_OPERATIONS_REMOVE_VMF_ARG
2371         LC_HAVE_KEY_USAGE_REFCOUNT
2372         LC_HAVE_CRYPTO_MAX_ALG_NAME_128
2373
2374         # 4.12
2375         LC_CURRENT_TIME
2376         LC_SUPER_BLOCK_S_UUID
2377         LC_SUPER_SETUP_BDI_NAME
2378         LC_BI_STATUS
2379
2380         # 4.13
2381         LC_BIO_INTEGRITY_ENABLED
2382
2383         # 4.14
2384         LC_PAGEVEC_INIT_ONE_PARAM
2385         LC_BI_BDEV
2386
2387         # 4.17
2388         LC_VM_FAULT_T
2389         LC_I_PAGES
2390
2391         # 4.18
2392         LC_INODE_TIMESPEC64
2393
2394         # 4.20
2395         LC___XA_SET_MARK
2396         LC_UAPI_LINUX_MOUNT_H
2397         LC_HAVE_SUNRPC_CACHE_HASH_LOCK_IS_A_SPINLOCK
2398
2399         # 5.1
2400         LC_HAS_LINUX_SELINUX_ENABLED
2401         LB_HAVE_BVEC_ITER_ALL
2402
2403         # 5.2
2404         LC_ACCOUNT_PAGE_DIRTIED
2405         LC_KEYRING_SEARCH_4ARGS
2406
2407         # 5.3
2408         LC_BIO_BI_PHYS_SEGMENTS
2409         LC_LM_COMPARE_OWNER_EXISTS
2410
2411         # kernel patch to extend integrity interface
2412         LC_BIO_INTEGRITY_PREP_FN
2413
2414         #
2415         AS_IF([test "x$enable_server" != xno], [
2416                 LC_STACK_SIZE
2417                 LC_QUOTA_CONFIG
2418         ])
2419         LC_POSIX_ACL_CONFIG
2420 ]) # LC_PROG_LINUX
2421
2422 #
2423 # LC_CONFIG_CLIENT
2424 #
2425 # Check whether to build the client side of Lustre
2426 #
2427 AC_DEFUN([LC_CONFIG_CLIENT], [
2428 AC_MSG_CHECKING([whether to build Lustre client support])
2429 AC_ARG_ENABLE([client],
2430         AC_HELP_STRING([--disable-client],
2431                 [disable Lustre client support]),
2432         [], [enable_client="yes"])
2433 AC_MSG_RESULT([$enable_client])
2434 ]) # LC_CONFIG_CLIENT
2435
2436 #
2437 # --enable-mpitests
2438 #
2439 AC_DEFUN([LB_CONFIG_MPITESTS], [
2440 AC_ARG_ENABLE([mpitests],
2441         AC_HELP_STRING([--enable-mpitests=<yes|no|mpicc wrapper>],
2442                        [include mpi tests]), [
2443                 enable_mpitests="yes"
2444                 case $enableval in
2445                 yes)
2446                         MPICC_WRAPPER="mpicc"
2447                         MPI_BIN=$(eval which $MPICC_WRAPPER | xargs dirname)
2448                         ;;
2449                 no)
2450                         enable_mpitests="no"
2451                         MPI_BIN=""
2452                         ;;
2453                 *)
2454                         MPICC_WRAPPER=$enableval
2455                         MPI_BIN=$(eval echo $MPICC_WRAPPER | xargs dirname)
2456                         ;;
2457                 esac
2458         ], [
2459                 enable_mpitests="yes"
2460                 MPICC_WRAPPER="mpicc"
2461                 MPI_BIN=$(eval which $MPICC_WRAPPER | xargs dirname)
2462         ])
2463
2464         if test "x$enable_mpitests" != "xno"; then
2465                 oldcc=$CC
2466                 CC=$MPICC_WRAPPER
2467                 AC_CACHE_CHECK([whether mpitests can be built],
2468                 lb_cv_mpi_tests, [AC_COMPILE_IFELSE([AC_LANG_SOURCE([
2469                         #include <mpi.h>
2470                         int main(void) {
2471                                 int flag;
2472                                 MPI_Initialized(&flag);
2473                                 return 0;
2474                         }
2475                 ])], [lb_cv_mpi_tests="yes"], [lb_cv_mpi_tests="no"])
2476                 ])
2477                 enable_mpitests=$lb_cv_mpi_tests
2478                 CC=$oldcc
2479         fi
2480         AC_SUBST(MPI_BIN)
2481         AC_SUBST(MPICC_WRAPPER)
2482 ]) # LB_CONFIG_MPITESTS
2483
2484 #
2485 # LC_CONFIG_QUOTA
2486 #
2487 # whether to enable quota support global control
2488 #
2489 AC_DEFUN([LC_CONFIG_QUOTA], [
2490 AC_MSG_CHECKING([whether to enable quota support global control])
2491 AC_ARG_ENABLE([quota],
2492         AC_HELP_STRING([--enable-quota],
2493                 [enable quota support]),
2494         [], [enable_quota="yes"])
2495 AS_IF([test "x$enable_quota" = xyes],
2496         [AC_MSG_RESULT([yes])],
2497         [AC_MSG_RESULT([no])])
2498 ]) # LC_CONFIG_QUOTA
2499
2500 #
2501 # LC_QUOTA
2502 #
2503 AC_DEFUN([LC_QUOTA], [
2504 #check global
2505 LC_CONFIG_QUOTA
2506 #check for utils
2507 AS_IF([test "x$enable_quota" != xno -a "x$enable_utils" != xno], [
2508         AC_CHECK_HEADER([sys/quota.h],
2509                 [AC_DEFINE(HAVE_SYS_QUOTA_H, 1,
2510                         [Define to 1 if you have <sys/quota.h>.])],
2511                 [AC_MSG_ERROR([don't find <sys/quota.h> in your system])])
2512 ])
2513 ]) # LC_QUOTA
2514
2515 #
2516 # LC_OSD_ADDON
2517 #
2518 # configure support for optional OSD implementation
2519 #
2520 AC_DEFUN([LC_OSD_ADDON], [
2521 AC_MSG_CHECKING([whether to use OSD addon])
2522 AC_ARG_WITH([osd],
2523         AC_HELP_STRING([--with-osd=path],
2524                 [set path to optional osd]),
2525         [
2526         case "$with_osd" in
2527         no)
2528                 ENABLEOSDADDON=0
2529                 ;;
2530         *)
2531                 OSDADDON="$with_osd"
2532                 ENABLEOSDADDON=1
2533                 ;;
2534         esac
2535         ], [
2536                 ENABLEOSDADDON=0
2537         ])
2538 AS_IF([test $ENABLEOSDADDON -eq 0], [
2539         AC_MSG_RESULT([no])
2540         OSDADDON=""
2541 ], [
2542         OSDMODNAME=$(basename $OSDADDON)
2543         AS_IF([test -e $LUSTRE/$OSDMODNAME], [
2544                 AC_MSG_RESULT([can't link])
2545                 OSDADDON=""
2546         ], [ln -s $OSDADDON $LUSTRE/$OSDMODNAME], [
2547                 AC_MSG_RESULT([$OSDMODNAME])
2548                 OSDADDON="obj-m += $OSDMODNAME/"
2549         ], [
2550                 AC_MSG_RESULT([can't link])
2551                 OSDADDON=""
2552         ])
2553 ])
2554 AC_SUBST(OSDADDON)
2555 ]) # LC_OSD_ADDON
2556
2557 #
2558 # LC_CONFIG_CRYPTO
2559 #
2560 # Check whether to enable Lustre client crypto
2561 #
2562 AC_DEFUN([LC_CONFIG_CRYPTO], [
2563 AC_MSG_CHECKING([whether to enable Lustre client crypto])
2564 AC_ARG_ENABLE([crypto],
2565         AC_HELP_STRING([--enable-crypto],
2566                 [enable Lustre client crypto]),
2567         [], [enable_crypto="auto"])
2568 AS_IF([test "x$enable_crypto" != xno -a "x$enable_dist" = xno], [
2569         AC_MSG_RESULT(
2570         )
2571         LC_IS_ENCRYPTED
2572         LC_FSCRYPT_SUPPORT])
2573 AS_IF([test "x$has_fscrypt_support" = xyes], [
2574         AC_DEFINE(HAVE_LUSTRE_CRYPTO, 1, [Enable Lustre client crypto via in-kernel fscrypt])
2575         enable_crypto=yes],
2576         [AS_IF([test "x$has_is_encrypted" = xyes], [
2577               AC_DEFINE(HAVE_LUSTRE_CRYPTO, 1, [Enable Lustre client crypto via embedded llcrypt])
2578               AC_DEFINE(CONFIG_LL_ENCRYPTION, 1, [embedded llcrypt])
2579               enable_crypto=yes
2580               enable_llcrypt=yes], [
2581               AS_IF([test "x$enable_crypto" = xyes],
2582                     [AC_MSG_ERROR([Lustre client crypto cannot be enabled because of lack of encryption support in your kernel.])])
2583               AS_IF([test "x$enable_crypto" != xno -a "x$enable_dist" = xno],
2584                     [AC_MSG_WARN(Lustre client crypto cannot be enabled because of lack of encryption support in your kernel.)])
2585               enable_crypto=no])])
2586 AS_IF([test "x$enable_dist" != xno], [
2587         enable_crypto=yes
2588         enable_llcrypt=yes])
2589 AC_MSG_RESULT([$enable_crypto])
2590 ]) # LC_CONFIG_CRYPTO
2591
2592 #
2593 # LC_CONFIGURE
2594 #
2595 # other configure checks
2596 #
2597 AC_DEFUN([LC_CONFIGURE], [
2598 AC_MSG_NOTICE([Lustre core checks
2599 ==============================================================================])
2600
2601 AS_IF([test $target_cpu == "i686" -o $target_cpu == "x86_64"],
2602         [CFLAGS="$CFLAGS -Wall -Werror"])
2603
2604 # maximum MDS thread count
2605 LC_MDS_MAX_THREADS
2606
2607 # lustre/utils/gss/gss_util.c
2608 # lustre/utils/gss/gssd_proc.c
2609 # lustre/utils/gss/krb5_util.c
2610 # lustre/utils/llog_reader.c
2611 # lustre/utils/create_iam.c
2612 # lustre/utils/libiam.c
2613 AC_CHECK_HEADERS([netdb.h endian.h])
2614 AC_CHECK_FUNCS([gethostbyname])
2615
2616 # lustre/utils/llverfs.c lustre/utils/libmount_utils_ldiskfs.c
2617 AC_CHECK_HEADERS([ext2fs/ext2fs.h], [], [
2618         AS_IF([test "x$enable_utils" = xyes -a "x$enable_ldiskfs" = xyes], [
2619                 AC_MSG_ERROR([
2620 ext2fs.h not found. Please install e2fsprogs development package.
2621                 ])
2622         ])
2623 ])
2624
2625 # lustre/tests/statx_test.c
2626 AC_CHECK_FUNCS([statx])
2627
2628 # lustre/utils/lfs.c
2629 AS_IF([test "$enable_dist" = "no"], [
2630                 AC_CHECK_LIB([z], [crc32], [
2631                                  AC_CHECK_HEADER([zlib.h], [], [
2632                                                  AC_MSG_ERROR([zlib.h not found.])])
2633                                  ], [
2634                                  AC_MSG_ERROR([
2635                 zlib library not found. Please install zlib development package.])
2636                 ])
2637 ])
2638
2639 SELINUX=""
2640
2641 AC_CHECK_LIB([selinux], [is_selinux_enabled],
2642         [AC_CHECK_HEADERS([selinux/selinux.h],
2643                         [SELINUX="-lselinux"
2644                         AC_DEFINE([HAVE_SELINUX], 1,
2645                                 [support for selinux ])],
2646                         [AC_MSG_WARN([
2647
2648 No libselinux-devel package found, unable to build selinux enabled tools
2649 ])
2650 ])],
2651         [AC_MSG_WARN([
2652
2653 No selinux package found, unable to build selinux enabled tools
2654 ])
2655 ])
2656 AC_SUBST(SELINUX)
2657
2658 AC_CHECK_LIB([keyutils], [add_key])
2659
2660 # Super safe df
2661 AC_MSG_CHECKING([whether to report minimum OST free space])
2662 AC_ARG_ENABLE([mindf],
2663         AC_HELP_STRING([--enable-mindf],
2664                 [Make statfs report the minimum available space on any single OST instead of the sum of free space on all OSTs]),
2665         [], [enable_mindf="no"])
2666 AC_MSG_RESULT([$enable_mindf])
2667 AS_IF([test "$enable_mindf" = "yes"],
2668         [AC_DEFINE([MIN_DF], 1, [Report minimum OST free space])])
2669
2670 AC_MSG_CHECKING([whether to randomly failing memory alloc])
2671 AC_ARG_ENABLE([fail_alloc],
2672         AC_HELP_STRING([--disable-fail-alloc],
2673                 [disable randomly alloc failure]),
2674         [], [enable_fail_alloc="yes"])
2675 AC_MSG_RESULT([$enable_fail_alloc])
2676 AS_IF([test "x$enable_fail_alloc" != xno],
2677         [AC_DEFINE([RANDOM_FAIL_ALLOC], 1,
2678                 [enable randomly alloc failure])])
2679
2680 AC_MSG_CHECKING([whether to check invariants (expensive cpu-wise)])
2681 AC_ARG_ENABLE([invariants],
2682         AC_HELP_STRING([--enable-invariants],
2683                 [enable invariant checking (cpu intensive)]),
2684         [], [enable_invariants="no"])
2685 AC_MSG_RESULT([$enable_invariants])
2686 AS_IF([test "x$enable_invariants" = xyes],
2687         [AC_DEFINE([CONFIG_LUSTRE_DEBUG_EXPENSIVE_CHECK], 1,
2688                 [enable invariant checking])])
2689
2690 AC_MSG_CHECKING([whether to track references with lu_ref])
2691 AC_ARG_ENABLE([lu_ref],
2692         AC_HELP_STRING([--enable-lu_ref],
2693                 [enable lu_ref reference tracking code]),
2694         [], [enable_lu_ref="no"])
2695 AC_MSG_RESULT([$enable_lu_ref])
2696 AS_IF([test "x$enable_lu_ref" = xyes],
2697         [AC_DEFINE([USE_LU_REF], 1,
2698                 [enable lu_ref reference tracking code])])
2699
2700 AC_MSG_CHECKING([whether to enable page state tracking])
2701 AC_ARG_ENABLE([pgstate-track],
2702         AC_HELP_STRING([--enable-pgstate-track],
2703                 [enable page state tracking]),
2704         [], [enable_pgstat_track="no"])
2705 AC_MSG_RESULT([$enable_pgstat_track])
2706 AS_IF([test "x$enable_pgstat_track" = xyes],
2707         [AC_DEFINE([CONFIG_DEBUG_PAGESTATE_TRACKING], 1,
2708                 [enable page state tracking code])])
2709
2710 PKG_PROG_PKG_CONFIG
2711 AC_MSG_CHECKING([systemd unit file directory])
2712 AC_ARG_WITH([systemdsystemunitdir],
2713         [AS_HELP_STRING([--with-systemdsystemunitdir=DIR],
2714                 [Directory for systemd service files])],
2715         [], [with_systemdsystemunitdir=auto])
2716 AS_IF([test "x$with_systemdsystemunitdir" = "xyes" -o "x$with_systemdsystemunitdir" = "xauto"],
2717         [def_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)
2718         AS_IF([test "x$def_systemdsystemunitdir" = "x"],
2719                 [AS_IF([test "x$with_systemdsystemunitdir" = "xyes"],
2720                 [AC_MSG_ERROR([systemd support requested but pkg-config unable to query systemd package])])
2721                 with_systemdsystemunitdir=no],
2722         [with_systemdsystemunitdir="$def_systemdsystemunitdir"])])
2723 AS_IF([test "x$with_systemdsystemunitdir" != "xno"],
2724         [AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])])
2725 AC_MSG_RESULT([$with_systemdsystemunitdir])
2726
2727 AC_MSG_CHECKING([bash-completion directory])
2728 AC_ARG_WITH([bash-completion-dir],
2729         AS_HELP_STRING([--with-bash-completion-dir[=PATH]],
2730                 [Install the bash auto-completion script in this directory.]),
2731         [],
2732         [with_bash_completion_dir=yes])
2733 AS_IF([test "x$with_bash_completion_dir" = "xyes"], [
2734         BASH_COMPLETION_DIR="`pkg-config --variable=completionsdir bash-completion`"
2735         AS_IF([test "x$BASH_COMPLETION_DIR" = "x"], [
2736                 [BASH_COMPLETION_DIR="$datadir/bash-completion/completions"]
2737         ])
2738 ], [
2739         BASH_COMPLETION_DIR="$with_bash_completion_dir"
2740 ])
2741 AC_SUBST([BASH_COMPLETION_DIR])
2742 AC_MSG_RESULT([$BASH_COMPLETION_DIR])
2743 ]) # LC_CONFIGURE
2744
2745 #
2746 # LC_CONDITIONALS
2747 #
2748 # AM_CONDITIONALS for lustre
2749 #
2750 AC_DEFUN([LC_CONDITIONALS], [
2751 AM_CONDITIONAL(MPITESTS, test x$enable_mpitests = xyes, Build MPI Tests)
2752 AM_CONDITIONAL(CLIENT, test x$enable_client = xyes)
2753 AM_CONDITIONAL(SERVER, test x$enable_server = xyes)
2754 AM_CONDITIONAL(SPLIT, test x$enable_split = xyes)
2755 AM_CONDITIONAL(EXT2FS_DEVEL, test x$ac_cv_header_ext2fs_ext2fs_h = xyes)
2756 AM_CONDITIONAL(GSS, test x$enable_gss = xyes)
2757 AM_CONDITIONAL(GSS_KEYRING, test x$enable_gss_keyring = xyes)
2758 AM_CONDITIONAL(GSS_PIPEFS, test x$enable_gss_pipefs = xyes)
2759 AM_CONDITIONAL(GSS_SSK, test x$enable_ssk = xyes)
2760 AM_CONDITIONAL(LIBPTHREAD, test x$enable_libpthread = xyes)
2761 AM_CONDITIONAL(HAVE_SYSTEMD, test "x$with_systemdsystemunitdir" != "xno")
2762 AM_CONDITIONAL(ENABLE_BASH_COMPLETION, test "x$with_bash_completion_dir" != "xno")
2763 AM_CONDITIONAL(XATTR_HANDLER, test "x$lb_cv_compile_xattr_handler_flags" = xyes)
2764 AM_CONDITIONAL(SELINUX, test "$SELINUX" = "-lselinux")
2765 AM_CONDITIONAL(GETSEPOL, test x$enable_getsepol = xyes)
2766 AM_CONDITIONAL(LLCRYPT, test x$enable_llcrypt = xyes)
2767 ]) # LC_CONDITIONALS
2768
2769 #
2770 # LC_CONFIG_FILES
2771 #
2772 # files that should be generated with AC_OUTPUT
2773 #
2774 AC_DEFUN([LC_CONFIG_FILES],
2775 [AC_CONFIG_FILES([
2776 lustre/Makefile
2777 lustre/autoMakefile
2778 lustre/autoconf/Makefile
2779 lustre/conf/Makefile
2780 lustre/conf/resource/Makefile
2781 lustre/contrib/Makefile
2782 lustre/doc/Makefile
2783 lustre/include/Makefile
2784 lustre/include/lustre/Makefile
2785 lustre/include/uapi/linux/lustre/Makefile
2786 lustre/kernel_patches/targets/4.18-rhel8.1.target
2787 lustre/kernel_patches/targets/4.18-rhel8.target
2788 lustre/kernel_patches/targets/3.10-rhel7.8.target
2789 lustre/kernel_patches/targets/3.10-rhel7.7.target
2790 lustre/kernel_patches/targets/3.10-rhel7.6.target
2791 lustre/kernel_patches/targets/3.10-rhel7.5.target
2792 lustre/kernel_patches/targets/4.14-rhel7.5.target
2793 lustre/kernel_patches/targets/4.14-rhel7.6.target
2794 lustre/kernel_patches/targets/4.12-sles12sp4.target
2795 lustre/kernel_patches/targets/4.12-sles15sp1.target
2796 lustre/kernel_patches/targets/3.x-fc18.target
2797 lustre/ldlm/Makefile
2798 lustre/fid/Makefile
2799 lustre/fid/autoMakefile
2800 lustre/llite/Makefile
2801 lustre/llite/autoMakefile
2802 lustre/lov/Makefile
2803 lustre/lov/autoMakefile
2804 lustre/mdc/Makefile
2805 lustre/mdc/autoMakefile
2806 lustre/lmv/Makefile
2807 lustre/lmv/autoMakefile
2808 lustre/lfsck/Makefile
2809 lustre/lfsck/autoMakefile
2810 lustre/mdt/Makefile
2811 lustre/mdt/autoMakefile
2812 lustre/mdd/Makefile
2813 lustre/mdd/autoMakefile
2814 lustre/fld/Makefile
2815 lustre/fld/autoMakefile
2816 lustre/obdclass/Makefile
2817 lustre/obdclass/autoMakefile
2818 lustre/obdecho/Makefile
2819 lustre/obdecho/autoMakefile
2820 lustre/ofd/Makefile
2821 lustre/ofd/autoMakefile
2822 lustre/osc/Makefile
2823 lustre/osc/autoMakefile
2824 lustre/ost/Makefile
2825 lustre/ost/autoMakefile
2826 lustre/osd-ldiskfs/Makefile
2827 lustre/osd-ldiskfs/autoMakefile
2828 lustre/osd-zfs/Makefile
2829 lustre/osd-zfs/autoMakefile
2830 lustre/mgc/Makefile
2831 lustre/mgc/autoMakefile
2832 lustre/mgs/Makefile
2833 lustre/mgs/autoMakefile
2834 lustre/target/Makefile
2835 lustre/ptlrpc/Makefile
2836 lustre/ptlrpc/autoMakefile
2837 lustre/ptlrpc/gss/Makefile
2838 lustre/ptlrpc/gss/autoMakefile
2839 lustre/quota/Makefile
2840 lustre/quota/autoMakefile
2841 lustre/scripts/Makefile
2842 lustre/scripts/systemd/Makefile
2843 lustre/tests/Makefile
2844 lustre/tests/mpi/Makefile
2845 lustre/tests/kernel/Makefile
2846 lustre/tests/kernel/autoMakefile
2847 lustre/utils/Makefile
2848 lustre/utils/gss/Makefile
2849 lustre/osp/Makefile
2850 lustre/osp/autoMakefile
2851 lustre/lod/Makefile
2852 lustre/lod/autoMakefile
2853 ])
2854 ]) # LC_CONFIG_FILES