Whamcloud - gitweb
620963c27439d8fc2a03915d47b39e841960d2ea
[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 libcfs_is_module=yes
9 ldiskfs_is_ext4=yes
10 ])
11
12 #
13 # LC_PATH_DEFAULTS
14 #
15 # lustre specific paths
16 #
17 AC_DEFUN([LC_PATH_DEFAULTS],
18 [# ptlrpc kernel build requires this
19 LUSTRE="$PWD/lustre"
20 AC_SUBST(LUSTRE)
21
22 # mount.lustre
23 rootsbindir='$(CROSS_PATH)/sbin'
24 AC_SUBST(rootsbindir)
25
26 demodir='$(docdir)/demo'
27 AC_SUBST(demodir)
28
29 pkgexampledir='${pkgdatadir}/examples'
30 AC_SUBST(pkgexampledir)
31 ])
32
33 #
34 # LC_TARGET_SUPPORTED
35 #
36 # is the target os supported?
37 #
38 AC_DEFUN([LC_TARGET_SUPPORTED],
39 [case $target_os in
40         linux* | darwin*)
41 $1
42                 ;;
43         *)
44 $2
45                 ;;
46 esac
47 ])
48
49 #
50 # LC_CONFIG_OBD_BUFFER_SIZE
51 #
52 # the maximum buffer size of lctl ioctls
53 #
54 AC_DEFUN([LC_CONFIG_OBD_BUFFER_SIZE],
55 [AC_MSG_CHECKING([maximum OBD ioctl size])
56 AC_ARG_WITH([obd-buffer-size],
57         AC_HELP_STRING([--with-obd-buffer-size=[size]],
58                         [set lctl ioctl maximum bytes (default=8192)]),
59         [
60                 OBD_BUFFER_SIZE=$with_obd_buffer_size
61         ],[
62                 OBD_BUFFER_SIZE=8192
63         ])
64 AC_MSG_RESULT([$OBD_BUFFER_SIZE bytes])
65 AC_DEFINE_UNQUOTED(CONFIG_LUSTRE_OBD_MAX_IOCTL_BUFFER, $OBD_BUFFER_SIZE, [IOCTL Buffer Size])
66 ])
67
68 #
69 # LC_READLINK_SSIZE_T
70 #
71 AC_DEFUN([LC_READLINK_SSIZE_T],
72 [AC_MSG_CHECKING([if readlink returns ssize_t])
73 AC_TRY_COMPILE([
74         #include <unistd.h>
75 ],[
76         ssize_t readlink(const char *, char *, size_t);
77 ],[
78         AC_MSG_RESULT([yes])
79         AC_DEFINE(HAVE_POSIX_1003_READLINK, 1, [readlink returns ssize_t])
80 ],[
81         AC_MSG_RESULT([no])
82 ])
83 ])
84
85 #
86 # LC_FUNC_DEV_SET_RDONLY
87 #
88 # check whether dev_set_rdonly is exported.  This is needed until we
89 # have another mechanism to fence IO from the underlying device.
90 #
91 AC_DEFUN([LC_FUNC_DEV_SET_RDONLY],
92 [LB_CHECK_SYMBOL_EXPORT([dev_set_rdonly],
93 [block/ll_rw_block.c,block/blk-core.c],[
94         AC_DEFINE(HAVE_DEV_SET_RDONLY, 1, [kernel exports dev_set_rdonly])
95 ],[
96         AC_MSG_WARN([kernel missing dev_set_rdonly patch for testing])
97 ])
98 ])
99
100 #
101 # Ensure stack size big than 8k in Lustre server (all kernels)
102 #
103 AC_DEFUN([LC_STACK_SIZE],
104 [AC_MSG_CHECKING([stack size big than 8k])
105 LB_LINUX_TRY_COMPILE([
106         #include <linux/thread_info.h>
107 ],[
108         #if THREAD_SIZE < 8192
109         #error "stack size < 8192"
110         #endif
111 ],[
112         AC_MSG_RESULT(yes)
113 ],[
114         AC_MSG_ERROR([Lustre requires that Linux is configured with at least a 8KB stack.])
115 ])
116 ])
117
118 #
119 # Allow the user to set the MDS thread upper limit
120 #
121 AC_DEFUN([LC_MDS_MAX_THREADS],
122 [
123         AC_ARG_WITH([mds_max_threads],
124         AC_HELP_STRING([--with-mds-max-threads=count],
125                        [maximum threads available on the MDS: (default=512)]),
126         [
127                 MDS_THREAD_COUNT=$with_mds_max_threads
128                 AC_DEFINE_UNQUOTED(MDS_MAX_THREADS, $MDS_THREAD_COUNT, [maximum number of MDS threads])
129         ])
130 ])
131
132 #
133 # LC_CONFIG_PINGER
134 #
135 # the pinger is temporary, until we have the recovery node in place
136 #
137 AC_DEFUN([LC_CONFIG_PINGER],
138 [AC_MSG_CHECKING([whether to enable pinger support])
139 AC_ARG_ENABLE([pinger],
140         AC_HELP_STRING([--disable-pinger],
141                         [disable recovery pinger support]),
142         [],[enable_pinger='yes'])
143 AC_MSG_RESULT([$enable_pinger])
144 if test x$enable_pinger != xno ; then
145   AC_DEFINE(ENABLE_PINGER, 1, Use the Pinger)
146 fi
147 ])
148
149 #
150 # LC_CONFIG_CHECKSUM
151 #
152 # do checksum of bulk data between client and OST
153 #
154 AC_DEFUN([LC_CONFIG_CHECKSUM],
155 [AC_MSG_CHECKING([whether to enable data checksum support])
156 AC_ARG_ENABLE([checksum],
157        AC_HELP_STRING([--disable-checksum],
158                        [disable data checksum support]),
159        [],[enable_checksum='yes'])
160 AC_MSG_RESULT([$enable_checksum])
161 if test x$enable_checksum != xno ; then
162   AC_DEFINE(ENABLE_CHECKSUM, 1, do data checksums)
163 fi
164 ])
165
166 #
167 # LC_CONFIG_LIBLUSTRE_RECOVERY
168 #
169 AC_DEFUN([LC_CONFIG_LIBLUSTRE_RECOVERY],
170 [AC_MSG_CHECKING([whether to enable liblustre recovery support])
171 AC_ARG_ENABLE([liblustre-recovery],
172         AC_HELP_STRING([--disable-liblustre-recovery],
173                         [disable liblustre recovery support]),
174         [],[enable_liblustre_recovery='yes'])
175 AC_MSG_RESULT([$enable_liblustre_recovery])
176 if test x$enable_liblustre_recovery != xno ; then
177   AC_DEFINE(ENABLE_LIBLUSTRE_RECOVERY, 1, Liblustre Can Recover)
178 fi
179 ])
180
181 #
182 # LC_CONFIG_HEALTH_CHECK_WRITE
183 #
184 # Turn off the actual write to the disk
185 #
186 AC_DEFUN([LC_CONFIG_HEALTH_CHECK_WRITE],
187 [AC_MSG_CHECKING([whether to enable a write with the health check])
188 AC_ARG_ENABLE([health_write],
189         AC_HELP_STRING([--enable-health_write],
190                         [enable disk writes when doing health check]),
191         [],[enable_health_write='no'])
192 AC_MSG_RESULT([$enable_health_write])
193 if test x$enable_health_write != xno ; then
194   AC_DEFINE(USE_HEALTH_CHECK_WRITE, 1, Write when Checking Health)
195 fi
196 ])
197
198 AC_DEFUN([LC_CONFIG_LRU_RESIZE],
199 [AC_MSG_CHECKING([whether to enable lru self-adjusting])
200 AC_ARG_ENABLE([lru_resize],
201         AC_HELP_STRING([--enable-lru-resize],
202                         [enable lru resize support]),
203         [],[enable_lru_resize='yes'])
204 AC_MSG_RESULT([$enable_lru_resize])
205 if test x$enable_lru_resize != xno; then
206    AC_DEFINE(HAVE_LRU_RESIZE_SUPPORT, 1, [Enable lru resize support])
207 fi
208 ])
209
210 #
211 # Quota support. The kernel must support CONFIG_QUOTA.
212 #
213 AC_DEFUN([LC_QUOTA_CONFIG],
214 [LB_LINUX_CONFIG_IM([QUOTA],[],[
215         AC_MSG_ERROR([Lustre quota requires that CONFIG_QUOTA is enabled in your kernel.])
216         ])
217 ])
218
219 # truncate_complete_page() has never been exported from an upstream kernel
220 # remove_from_page_cache() was exported between 2.6.35 and 2.6.38
221 # delete_from_page_cache() is exported from 2.6.39
222 AC_DEFUN([LC_EXPORT_TRUNCATE_COMPLETE_PAGE],
223          [LB_CHECK_SYMBOL_EXPORT([truncate_complete_page],
224                                  [mm/truncate.c],
225                                  [AC_DEFINE(HAVE_TRUNCATE_COMPLETE_PAGE, 1,
226                                             [kernel export truncate_complete_page])])
227           LB_CHECK_SYMBOL_EXPORT([remove_from_page_cache],
228                                  [mm/filemap.c],
229                                  [AC_DEFINE(HAVE_REMOVE_FROM_PAGE_CACHE, 1,
230                                             [kernel export remove_from_page_cache])])
231           LB_CHECK_SYMBOL_EXPORT([delete_from_page_cache],
232                                  [mm/filemap.c],
233                                  [AC_DEFINE(HAVE_DELETE_FROM_PAGE_CACHE, 1,
234                                             [kernel export delete_from_page_cache])])
235          ])
236
237 #
238 # LC_CAPA_CRYPTO
239 #
240 AC_DEFUN([LC_CAPA_CRYPTO],
241 [LB_LINUX_CONFIG_IM([CRYPTO],[],[
242         AC_MSG_ERROR([Lustre capability require that CONFIG_CRYPTO is enabled in your kernel.])
243 ])
244 LB_LINUX_CONFIG_IM([CRYPTO_HMAC],[],[
245         AC_MSG_ERROR([Lustre capability require that CONFIG_CRYPTO_HMAC is enabled in your kernel.])
246 ])
247 LB_LINUX_CONFIG_IM([CRYPTO_SHA1],[],[
248         AC_MSG_ERROR([Lustre capability require that CONFIG_CRYPTO_SHA1 is enabled in your kernel.])
249 ])
250 ])
251
252 #
253 # LC_CONFIG_RMTCLIENT
254 #
255 dnl FIXME
256 dnl the AES symbol usually tied with arch, e.g. CRYPTO_AES_586
257 dnl FIXME
258 AC_DEFUN([LC_CONFIG_RMTCLIENT],
259 [LB_LINUX_CONFIG_IM([CRYPTO_AES],[],[
260         AC_MSG_WARN([Lustre remote client require that CONFIG_CRYPTO_AES is enabled in your kernel.])
261 ])
262 ])
263
264 #
265 # LC_CONFIG_GSS_KEYRING (default 'auto', tests for dependencies, if found, enables; only called if gss is enabled)
266 #
267 AC_DEFUN([LC_CONFIG_GSS_KEYRING],
268 [AC_MSG_CHECKING([whether to enable gss keyring backend])
269  AC_ARG_ENABLE([gss_keyring],
270                [AC_HELP_STRING([--disable-gss-keyring],
271                                [disable gss keyring backend])],
272                [],[enable_gss_keyring='auto'])
273  AC_MSG_RESULT([$enable_gss_keyring])
274
275  if test x$enable_gss_keyring != xno; then
276         LB_LINUX_CONFIG_IM([KEYS],[],
277                            [gss_keyring_conf_test='fail';
278                             AC_MSG_WARN([GSS keyring backend require that CONFIG_KEYS be enabled in your kernel.])])
279
280         AC_CHECK_LIB([keyutils], [keyctl_search], [],
281                      [gss_keyring_conf_test='fail';
282                       AC_MSG_WARN([libkeyutils is not found, which is required by gss keyring backend])],)
283
284         if test x$gss_keyring_conf_test != xfail; then
285                 AC_DEFINE([HAVE_GSS_KEYRING], [1], [Define this if you enable gss keyring backend])
286                 enable_gss_keyring='yes'
287         else
288                 if test x$enable_gss_keyring == xyes; then
289                         AC_MSG_ERROR([Cannot enable gss_keyring. See above for details.])
290                 else
291                         AC_MSG_WARN([Cannot enable gss keyring.  See above for details.])
292                 fi
293         fi
294  fi
295 ])
296
297 AC_DEFUN([LC_CONFIG_SUNRPC],
298 [LB_LINUX_CONFIG_IM([SUNRPC],[],
299                     [if test x$sunrpc_required == xyes; then
300                          AC_MSG_ERROR([kernel SUNRPC support is required by using GSS.])
301                      fi])
302 ])
303
304 #
305 # LC_CONFIG_GSS (default 'auto' (tests for dependencies, if found, enables))
306 #
307 # Build gss and related tools of Lustre. Currently both kernel and user space
308 # parts are depend on linux platform.
309 #
310 AC_DEFUN([LC_CONFIG_GSS],
311 [AC_MSG_CHECKING([whether to enable gss/krb5 support])
312  AC_ARG_ENABLE([gss],
313                [AC_HELP_STRING([--enable-gss], [enable gss/krb5 support])],
314                [],[enable_gss='auto'])
315  AC_MSG_RESULT([$enable_gss])
316
317  if test x$enable_gss != xno; then
318         LC_CONFIG_GSS_KEYRING
319         sunrpc_required=$enable_gss
320         LC_CONFIG_SUNRPC
321         sunrpc_required=no
322
323         LB_LINUX_CONFIG_IM([CRYPTO_MD5],[],
324                            [AC_MSG_WARN([kernel MD5 support is recommended by using GSS.])])
325         LB_LINUX_CONFIG_IM([CRYPTO_SHA1],[],
326                            [AC_MSG_WARN([kernel SHA1 support is recommended by using GSS.])])
327         LB_LINUX_CONFIG_IM([CRYPTO_SHA256],[],
328                            [AC_MSG_WARN([kernel SHA256 support is recommended by using GSS.])])
329         LB_LINUX_CONFIG_IM([CRYPTO_SHA512],[],
330                            [AC_MSG_WARN([kernel SHA512 support is recommended by using GSS.])])
331
332         require_krb5=$enable_gss
333         AC_KERBEROS_V5
334         require_krb5=no
335
336         if test x$KRBDIR != x; then
337                 AC_CHECK_LIB([gssapi], [gss_export_lucid_sec_context],
338                              [GSSAPI_LIBS="$GSSAPI_LDFLAGS -lgssapi";
339                               gss_conf_test='success'],
340                              [AC_CHECK_LIB([gssglue], [gss_export_lucid_sec_context],
341                                            [GSSAPI_LIBS="$GSSAPI_LDFLAGS -lgssglue";
342                                             gss_conf_test='success'],
343                                            [if test x$enable_gss == xyes; then
344                                                 AC_MSG_ERROR([libgssapi or libgssglue is not found, which is required by GSS.])
345                                             else
346                                                 AC_MSG_WARN([libgssapi or libgssglue is not found, which is required by GSS.])
347                                             fi])],)
348                 AC_SUBST(GSSAPI_LIBS)
349         fi
350
351         if test x$gss_conf_test == xsuccess; then
352                 AC_DEFINE([HAVE_GSS], [1], [Define this is if you enable gss])
353                 enable_gss='yes'
354         fi
355
356  fi
357 ])
358
359 # 2.6.24
360
361 # 2.6.24 has bio_endio with 2 args
362 AC_DEFUN([LC_BIO_ENDIO_2ARG],
363 [AC_MSG_CHECKING([if kernel has bio_endio with 2 args])
364 LB_LINUX_TRY_COMPILE([
365         #include <linux/bio.h>
366 ],[
367         bio_endio(NULL, 0);
368 ], [
369         AC_MSG_RESULT([yes])
370         AC_DEFINE(HAVE_BIO_ENDIO_2ARG, 1,
371                 [kernel has bio_endio with 2 args])
372 ],[
373         AC_MSG_RESULT([no])
374 ])
375 ])
376
377 # 2.6.24 removes long aged procfs entry -> deleted member
378 AC_DEFUN([LC_PROCFS_DELETED],
379 [AC_MSG_CHECKING([if kernel has deleted member in procfs entry struct])
380 LB_LINUX_TRY_COMPILE([
381         #include <linux/proc_fs.h>
382 ],[
383         struct proc_dir_entry pde;
384
385         pde.deleted = sizeof(pde);
386 ], [
387         AC_MSG_RESULT([yes])
388         AC_DEFINE(HAVE_PROCFS_DELETED, 1,
389                 [kernel has deleted member in procfs entry struct])
390 ],[
391         AC_MSG_RESULT([no])
392 ])
393 ])
394
395 #
396 # 2.6.27
397 #
398
399 # up to v2.6.27 had a 3 arg version (inode, mask, nameidata)
400 # v2.6.27->v2.6.37 had a 2 arg version (inode, mask)
401 # v2.6.37->v3.0 had a 3 arg version (inode, mask, nameidata)
402 # v3.1 onward have a 2 arg version (inode, mask)
403 AC_DEFUN([LC_INODE_PERMISION_2ARGS],
404 [AC_MSG_CHECKING([inode_operations->permission has two args])
405 LB_LINUX_TRY_COMPILE([
406         #include <linux/fs.h>
407 ],[
408         struct inode *inode __attribute__ ((unused));
409
410         inode = NULL;
411         inode->i_op->permission(NULL, 0);
412 ],[
413         AC_DEFINE(HAVE_INODE_PERMISION_2ARGS, 1,
414                   [inode_operations->permission has two args])
415         AC_MSG_RESULT([yes])
416 ],[
417         AC_MSG_RESULT([no])
418 ])
419 ])
420
421 # 2.6.34 has quotactl_ops->[sg]et_dqblk that take struct fs_disk_quota
422 AC_DEFUN([LC_HAVE_DQUOT_FS_DISK_QUOTA],
423 tmp_flags="$EXTRA_KCFLAGS"
424 EXTRA_KCFLAGS="-Werror"
425 [AC_MSG_CHECKING([if quotactl_ops.set_dqblk takes struct fs_disk_quota])
426 LB_LINUX_TRY_COMPILE([
427         #include <linux/fs.h>
428         #include <linux/quota.h>
429 ],[
430         struct quotactl_ops qops = {};
431         struct fs_disk_quota fdq;
432         qops.set_dqblk(NULL, 0, 0, &fdq);
433 ],[
434         AC_DEFINE(HAVE_DQUOT_FS_DISK_QUOTA, 1, [quotactl_ops.set_dqblk takes struct fs_disk_quota])
435         AC_MSG_RESULT([yes])
436 ],[
437         AC_MSG_RESULT([no])
438 ])
439 EXTRA_KCFLAGS="$tmp_flags"
440 ])
441
442 # 2.6.34 has renamed dquot options to dquot_*, check for dquot_suspend
443 AC_DEFUN([LC_HAVE_DQUOT_SUSPEND],
444 [AC_MSG_CHECKING([if dquot_suspend is defined])
445 LB_LINUX_TRY_COMPILE([
446         #include <linux/quotaops.h>
447 ],[
448         dquot_suspend(NULL, -1);
449 ],[
450         AC_DEFINE(HAVE_DQUOT_SUSPEND, 1, [dquot_suspend is defined])
451         AC_MSG_RESULT([yes])
452 ],[
453         AC_MSG_RESULT([no])
454 ])
455 ])
456
457 #
458 # 2.6.27 sles11 move the quotaio_v1{2}.h from include/linux to fs
459 # 2.6.32 move the quotaio_v1{2}.h from fs to fs/quota
460 AC_DEFUN([LC_HAVE_QUOTAIO_H],
461 [LB_CHECK_FILE([$LINUX/include/linux/quotaio_v2.h],[
462         AC_DEFINE(HAVE_QUOTAIO_H, 1,
463                 [kernel has include/linux/quotaio_v2.h])
464 ],[LB_CHECK_FILE([$LINUX/fs/quotaio_v2.h],[
465                AC_DEFINE(HAVE_FS_QUOTAIO_H, 1,
466                 [kernel has fs/quotaio_v1.h])
467 ],[LB_CHECK_FILE([$LINUX/fs/quota/quotaio_v2.h],[
468                AC_DEFINE(HAVE_FS_QUOTA_QUOTAIO_H, 1,
469                 [kernel has fs/quota/quotaio_v2.h])
470 ],[
471         AC_MSG_RESULT([no])
472 ])
473 ])
474 ])
475 ])
476
477 # 2.6.32
478
479 # 2.6.32 replaces 2 functions blk_queue_max_phys_segments and blk_queue_max_hw_segments by blk_queue_max_segments
480 AC_DEFUN([LC_BLK_QUEUE_MAX_SEGMENTS],
481 [AC_MSG_CHECKING([if blk_queue_max_segments is defined])
482 LB_LINUX_TRY_COMPILE([
483         #include <linux/blkdev.h>
484 ],[
485         blk_queue_max_segments(NULL, 0);
486 ],[
487         AC_MSG_RESULT(yes)
488         AC_DEFINE(HAVE_BLK_QUEUE_MAX_SEGMENTS, 1,
489                   [blk_queue_max_segments is defined])
490 ],[
491         AC_MSG_RESULT(no)
492 ])
493 ])
494
495 #
496 # LC_QUOTA64
497 #
498 # Check if kernel has been patched for 64-bit quota limits support.
499 # The upstream version of this patch in RHEL6 2.6.32 kernels introduces
500 # the constant QFMT_VFS_V1 in include/linux/quota.h, so we can check for
501 # that in the absence of quotaio_v1.h in the kernel headers.
502 #
503 AC_DEFUN([LC_QUOTA64],[
504         AC_MSG_CHECKING([if kernel has 64-bit quota limits support])
505 tmp_flags="$EXTRA_KCFLAGS"
506 EXTRA_KCFLAGS="-I$LINUX/fs"
507         LB_LINUX_TRY_COMPILE([
508                 #include <linux/kernel.h>
509                 #include <linux/fs.h>
510                 #if defined(HAVE_FS_QUOTA_QUOTAIO_H)
511                 # include <quota/quotaio_v2.h>
512                 struct v2r1_disk_dqblk dqblk_r1;
513                 #else
514                 #include <linux/quota.h>
515                 int ver = QFMT_VFS_V1;
516                 #endif
517         ],[],[
518                 AC_DEFINE(HAVE_QUOTA64, 1, [have quota64])
519                 AC_MSG_RESULT([yes])
520         ],[
521                 LB_CHECK_FILE([$LINUX/include/linux/lustre_version.h],[
522                         AC_MSG_ERROR([You have got no 64-bit kernel quota support.])
523                 ],[])
524                 AC_MSG_RESULT([no])
525         ])
526 EXTRA_KCFLAGS=$tmp_flags
527 ])
528
529 #
530 # 2.6.36 fs_struct.lock use spinlock instead of rwlock.
531 #
532 AC_DEFUN([LC_FS_STRUCT_RWLOCK],
533 [AC_MSG_CHECKING([if fs_struct.lock use rwlock])
534 LB_LINUX_TRY_COMPILE([
535         #include <asm/atomic.h>
536         #include <linux/spinlock.h>
537         #include <linux/fs_struct.h>
538 ],[
539         ((struct fs_struct *)0)->lock = (rwlock_t){ 0 };
540 ],[
541         AC_DEFINE(HAVE_FS_STRUCT_RWLOCK, 1,
542                   [fs_struct.lock use rwlock])
543         AC_MSG_RESULT([yes])
544 ],[
545         AC_MSG_RESULT([no])
546 ])
547 ])
548
549 #
550 # 2.6.36 super_operations add evict_inode method. it hybird of
551 # delete_inode & clear_inode.
552 #
553 AC_DEFUN([LC_SBOPS_EVICT_INODE],
554 [AC_MSG_CHECKING([if super_operations.evict_inode exist])
555 LB_LINUX_TRY_COMPILE([
556         #include <linux/fs.h>
557 ],[
558         ((struct super_operations *)0)->evict_inode(NULL);
559 ],[
560         AC_DEFINE(HAVE_SBOPS_EVICT_INODE, 1,
561                 [super_operations.evict_inode() is exist in kernel])
562         AC_MSG_RESULT([yes])
563 ],[
564         AC_MSG_RESULT([no])
565 ])
566 ])
567
568 #
569 # 2.6.35 file_operations.fsync taken 2 arguments.
570 # 3.0.0 file_operations.fsync takes 4 arguments.
571 #
572 AC_DEFUN([LC_FILE_FSYNC],
573 [AC_MSG_CHECKING([if file_operations.fsync takes 4 or 2 arguments])
574 LB_LINUX_TRY_COMPILE([
575         #include <linux/fs.h>
576 ],[
577         ((struct file_operations *)0)->fsync(NULL, 0, 0, 0);
578 ],[
579         AC_DEFINE(HAVE_FILE_FSYNC_4ARGS, 1,
580                 [file_operations.fsync takes 4 arguments])
581         AC_MSG_RESULT([yes, 4 args])
582 ],[
583         LB_LINUX_TRY_COMPILE([
584                 #include <linux/fs.h>
585         ],[
586            ((struct file_operations *)0)->fsync(NULL, 0);
587         ],[
588                 AC_DEFINE(HAVE_FILE_FSYNC_2ARGS, 1,
589                         [file_operations.fsync takes 2 arguments])
590                 AC_MSG_RESULT([yes, 2 args])
591         ],[
592                 AC_MSG_RESULT([no])
593         ])
594 ])
595 ])
596
597 #
598 # 2.6.37 remove kernel_locked
599 #
600 AC_DEFUN([LC_KERNEL_LOCKED],
601 [AC_MSG_CHECKING([if kernel_locked is defined])
602 LB_LINUX_TRY_COMPILE([
603         #include <linux/smp_lock.h>
604 ],[
605         kernel_locked();
606 ],[
607         AC_MSG_RESULT([yes])
608         AC_DEFINE(HAVE_KERNEL_LOCKED, 1,
609                 [kernel_locked is defined])
610 ],[
611         AC_MSG_RESULT([no])
612 ])
613 ])
614
615 #
616 # 2.6.38 dentry_operations.d_compare() taken 7 arguments.
617 #
618 AC_DEFUN([LC_D_COMPARE_7ARGS],
619 [AC_MSG_CHECKING([if d_compare taken 7 arguments])
620 LB_LINUX_TRY_COMPILE([
621         #include <linux/dcache.h>
622 ],[
623         ((struct dentry_operations*)0)->d_compare(NULL,NULL,NULL,NULL,0,NULL,NULL);
624 ],[
625         AC_DEFINE(HAVE_D_COMPARE_7ARGS, 1,
626                 [d_compare need 7 arguments])
627         AC_MSG_RESULT([yes])
628 ],[
629         AC_MSG_RESULT([no])
630 ])
631 ])
632
633 #
634 # 2.6.38 dentry_operations.d_delete() defined 'const' for 1st parameter.
635 #
636 AC_DEFUN([LC_D_DELETE_CONST],
637 [AC_MSG_CHECKING([if d_delete has const declare on first parameter])
638 tmp_flags="$EXTRA_KCFLAGS"
639 EXTRA_KCFLAGS="-Werror"
640 LB_LINUX_TRY_COMPILE([
641         #include <linux/dcache.h>
642 ],[
643         const struct dentry *d = NULL;
644         ((struct dentry_operations*)0)->d_delete(d);
645 ],[
646         AC_DEFINE(HAVE_D_DELETE_CONST, const,
647                 [d_delete first parameter declared const])
648         AC_MSG_RESULT([yes])
649 ],[
650         AC_DEFINE(HAVE_D_DELETE_CONST, , [])
651         AC_MSG_RESULT([no])
652 ])
653 EXTRA_KCFLAGS="$tmp_flags"
654 ])
655
656 #
657 # 2.6.38 dcache_lock removed. rcu-walk commited.
658 #
659 AC_DEFUN([LC_DCACHE_LOCK],
660 [AC_MSG_CHECKING([if dcache_lock is exist])
661 LB_LINUX_TRY_COMPILE([
662         #include <linux/dcache.h>
663 ],[
664         spin_lock(&dcache_lock);
665 ],[
666         AC_DEFINE(HAVE_DCACHE_LOCK, 1,
667                 [dcache_lock is exist])
668         AC_MSG_RESULT([yes])
669 ],[
670         AC_MSG_RESULT([no])
671 ])
672 ])
673
674 #
675 # 2.6.38 inode.i_rcu added.
676 #
677 AC_DEFUN([LC_INODE_I_RCU],
678 [AC_MSG_CHECKING([if inode.i_rcu exists])
679 LB_LINUX_TRY_COMPILE([
680         #include <linux/fs.h>
681 ],[
682         struct inode ino;
683         struct rcu_head rcu = {};
684         ino.i_rcu = rcu;
685 ],[
686         AC_DEFINE(HAVE_INODE_I_RCU, 1,
687                 [inode.i_rcu exists])
688         AC_MSG_RESULT([yes])
689 ],[
690         AC_MSG_RESULT([no])
691 ])
692 ])
693
694 #
695 # 2.6.38 export blkdev_get_by_dev
696 #
697 AC_DEFUN([LC_BLKDEV_GET_BY_DEV],
698 [LB_CHECK_SYMBOL_EXPORT([blkdev_get_by_dev],
699 [fs/block_dev.c],[
700 AC_DEFINE(HAVE_BLKDEV_GET_BY_DEV, 1,
701             [blkdev_get_by_dev is exported by the kernel])
702 ],[
703 ])
704 ])
705
706 #
707 # 2.6.38 export simple_setattr
708 #
709 AC_DEFUN([LC_EXPORT_SIMPLE_SETATTR],
710 [LB_CHECK_SYMBOL_EXPORT([simple_setattr],
711 [fs/libfs.c],[
712 AC_DEFINE(HAVE_SIMPLE_SETATTR, 1,
713             [simple_setattr is exported by the kernel])
714 ],[
715 ])
716 ])
717
718 #
719 # 2.6.39 remove unplug_fn from request_queue.
720 #
721 AC_DEFUN([LC_REQUEST_QUEUE_UNPLUG_FN],
722 [AC_MSG_CHECKING([if request_queue has unplug_fn field])
723 LB_LINUX_TRY_COMPILE([
724         #include <linux/blkdev.h>
725 ],[
726         do{ }while(sizeof(((struct request_queue *)0)->unplug_fn));
727 ],[
728         AC_DEFINE(HAVE_REQUEST_QUEUE_UNPLUG_FN, 1,
729                   [request_queue has unplug_fn field])
730         AC_MSG_RESULT([yes])
731 ],[
732         AC_MSG_RESULT([no])
733 ])
734 ])
735
736 #
737 # 2.6.39 replace get_sb with mount in struct file_system_type
738 #
739 AC_DEFUN([LC_HAVE_FSTYPE_MOUNT],
740 [AC_MSG_CHECKING([if file_system_type has mount field])
741 LB_LINUX_TRY_COMPILE([
742         #include <linux/fs.h>
743 ],[
744         struct file_system_type fst;
745         void *i = (void *) fst.mount;
746 ],[
747         AC_DEFINE(HAVE_FSTYPE_MOUNT, 1,
748                 [struct file_system_type has mount field])
749         AC_MSG_RESULT([yes])
750 ],[
751         AC_MSG_RESULT([no])
752 ])
753 ])
754
755 #
756 # 3.0 dirty_inode() has a flag parameter
757 # see kernel commit aa38572954ade525817fe88c54faebf85e5a61c0
758 #
759 AC_DEFUN([LC_DIRTY_INODE_WITH_FLAG],
760 [AC_MSG_CHECKING([if dirty_inode super_operation takes flag])
761 LB_LINUX_TRY_COMPILE([
762         #include <linux/fs.h>
763 ],[
764         struct inode *inode;
765         inode->i_sb->s_op->dirty_inode(NULL, 0);
766 ],[
767         AC_DEFINE(HAVE_DIRTY_INODE_HAS_FLAG, 1,
768                   [dirty_inode super_operation takes flag])
769         AC_MSG_RESULT([yes])
770 ],[
771         AC_MSG_RESULT([no])
772 ])
773 ])
774
775 #
776 # 2.6.38 generic_permission taken 4 parameters.
777 # in fact, it means rcu-walk aware permission bring.
778 #
779 # 3.1 generic_permission taken 2 parameters.
780 # see kernel commit 2830ba7f34ebb27c4e5b8b6ef408cd6d74860890
781 #
782 AC_DEFUN([LC_GENERIC_PERMISSION],
783 [AC_MSG_CHECKING([if generic_permission take 2 or 4 arguments])
784 LB_LINUX_TRY_COMPILE([
785         #include <linux/fs.h>
786 ],[
787         generic_permission(NULL, 0);
788 ],[
789         AC_DEFINE(HAVE_GENERIC_PERMISSION_2ARGS, 1,
790                   [generic_permission taken 2 arguments])
791         AC_MSG_RESULT([yes, 2 args])
792 ],[
793         LB_LINUX_TRY_COMPILE([
794                 #include <linux/fs.h>
795         ],[
796                 generic_permission(NULL, 0, 0, NULL);
797         ],[
798                 AC_DEFINE(HAVE_GENERIC_PERMISSION_4ARGS, 1,
799                           [generic_permission taken 4 arguments])
800                 AC_MSG_RESULT([yes, 4 args])
801         ],[
802                 AC_MSG_RESULT([no])
803         ])
804 ])
805 ])
806
807 #
808 # 3.1 renames lock-manager ops(lock_manager_operations) from fl_xxx to lm_xxx
809 # see kernel commit 8fb47a4fbf858a164e973b8ea8ef5e83e61f2e50
810 #
811 AC_DEFUN([LC_LM_XXX_LOCK_MANAGER_OPS],
812 [AC_MSG_CHECKING([if lock-manager ops renamed to lm_xxx])
813 LB_LINUX_TRY_COMPILE([
814         #include <linux/fs.h>
815 ],[
816         struct lock_manager_operations lm_ops;
817         lm_ops.lm_compare_owner = NULL;
818 ],[
819         AC_DEFINE(HAVE_LM_XXX_LOCK_MANAGER_OPS, 1,
820                   [lock-manager ops renamed to lm_xxx])
821         AC_MSG_RESULT([yes])
822 ],[
823         AC_MSG_RESULT([no])
824 ])
825 ])
826
827 #
828 # 3.1 kills inode->i_alloc_sem, use i_dio_count and inode_dio_wait/
829 #     inode_dio_done instead.
830 # see kernel commit bd5fe6c5eb9c548d7f07fe8f89a150bb6705e8e3
831 #
832 AC_DEFUN([LC_INODE_DIO_WAIT],
833 [AC_MSG_CHECKING([if inode->i_alloc_sem is killed and use inode_dio_wait/done.])
834 LB_LINUX_TRY_COMPILE([
835         #include <linux/fs.h>
836 ],[
837         inode_dio_wait((struct inode *)0);
838         inode_dio_done((struct inode *)0);
839 ],[
840         AC_DEFINE(HAVE_INODE_DIO_WAIT, 1,
841                   [inode->i_alloc_sem is killed and use inode_dio_wait/done])
842         AC_MSG_RESULT([yes])
843 ],[
844         AC_MSG_RESULT([no])
845 ])
846 ])
847
848 #
849 # 3.1 adds get_acl method to inode_operations to read ACL from disk.
850 # see kernel commit 4e34e719e457f2e031297175410fc0bd4016a085
851 #
852 AC_DEFUN([LC_IOP_GET_ACL],
853 [AC_MSG_CHECKING([inode_operations has .get_acl member function])
854 LB_LINUX_TRY_COMPILE([
855         #include <linux/fs.h>
856 ],[
857         struct inode_operations iop;
858         iop.get_acl = NULL;
859 ],[
860         AC_DEFINE(HAVE_IOP_GET_ACL, 1,
861                   [inode_operations has .get_acl member function])
862         AC_MSG_RESULT([yes])
863 ],[
864         AC_MSG_RESULT([no])
865 ])
866 ])
867
868 #
869 # 3.1.1 has ext4_blocks_for_truncate
870 #
871 AC_DEFUN([LC_BLOCKS_FOR_TRUNCATE],
872 [AC_MSG_CHECKING([if kernel has ext4_blocks_for_truncate])
873 LB_LINUX_TRY_COMPILE([
874         #include <linux/fs.h>
875         #include "$LINUX/fs/ext4/ext4_jbd2.h"
876         #include "$LINUX/fs/ext4/truncate.h"
877 ],[
878         ext4_blocks_for_truncate(NULL);
879 ],[
880         AC_MSG_RESULT([yes])
881         AC_DEFINE(HAVE_BLOCKS_FOR_TRUNCATE, 1,
882                   [kernel has ext4_blocks_for_truncate])
883 ],[
884         AC_MSG_RESULT([no])
885 ])
886 ])
887
888 #
889 # 3.1 introduced generic_file_llseek_size()
890 #
891 AC_DEFUN([LC_FILE_LLSEEK_SIZE],
892         [LB_CHECK_SYMBOL_EXPORT([generic_file_llseek_size],
893         [fs/read_write.c],
894         [AC_DEFINE(HAVE_FILE_LLSEEK_SIZE, 1,
895                    [generic_file_llseek_size is exported by the kernel])])
896 ])
897
898 #
899 # 3.2 request_queue.make_request_fn defined as function returns with void
900 # see kernel commit 5a7bbad27a410350e64a2d7f5ec18fc73836c14f
901 #
902 AC_DEFUN([LC_HAVE_VOID_MAKE_REQUEST_FN],
903 [AC_MSG_CHECKING([if request_queue.make_request_fn returns void but not int])
904 LB_LINUX_TRY_COMPILE([
905         #include <linux/blkdev.h>
906 ],[
907         int ret;
908         make_request_fn         *mrf;
909         ret = mrf(NULL, NULL);
910 ],[
911         AC_MSG_RESULT([no])
912 ],[
913         AC_DEFINE(HAVE_VOID_MAKE_REQUEST_FN, 1,
914                   [request_queue.make_request_fn returns void but not int])
915         AC_MSG_RESULT([yes])
916 ])
917 ])
918
919 #
920 # 3.2 protects inode->i_nlink from direct modification
921 # see kernel commit a78ef704a8dd430225955f0709b22d4a6ba21deb
922 # at the same time adds set_nlink(), so checks set_nlink() for it.
923 #
924 AC_DEFUN([LC_HAVE_PROTECT_I_NLINK],
925 [AC_MSG_CHECKING([if inode->i_nlink is protected from direct modification])
926 LB_LINUX_TRY_COMPILE([
927         #include <linux/fs.h>
928 ],[
929         struct inode i;
930         set_nlink(&i, 1);
931 ],[
932         AC_DEFINE(HAVE_PROTECT_I_NLINK, 1,
933                   [inode->i_nlink is protected from direct modification])
934         AC_MSG_RESULT([yes])
935 ],[
936         AC_MSG_RESULT([no])
937 ])
938 ])
939
940 #
941 # 3.3 introduces migrate_mode.h and migratepage has 4 args
942 #
943 AC_DEFUN([LC_HAVE_MIGRATE_HEADER],
944 [LB_CHECK_FILE([$LINUX/include/linux/migrate.h],[
945                 AC_DEFINE(HAVE_MIGRATE_H, 1,
946                 [kernel has include/linux/migrate.h])
947 ],[LB_CHECK_FILE([$LINUX/include/linux/migrate_mode.h],[
948                 AC_DEFINE(HAVE_MIGRATE_MODE_H, 1,
949                         [kernel has include/linux/migrate_mode.h])
950 ],[
951         AC_MSG_RESULT([no])
952 ])
953 ])
954 ])
955
956 AC_DEFUN([LC_MIGRATEPAGE_4ARGS],
957 [AC_MSG_CHECKING([if address_space_operations.migratepage has 4 args])
958 LB_LINUX_TRY_COMPILE([
959         #include <linux/fs.h>
960 #ifdef HAVE_MIGRATE_H
961         #include <linux/migrate.h>
962 #elif defined(HAVE_MIGRATE_MODE_H)
963         #include <linux/migrate_mode.h>
964 #endif
965 ],[
966         struct address_space_operations aops;
967
968         aops.migratepage(NULL, NULL, NULL, MIGRATE_ASYNC);
969 ],[
970         AC_DEFINE(HAVE_MIGRATEPAGE_4ARGS, 1,
971                 [address_space_operations.migratepage has 4 args])
972         AC_MSG_RESULT([yes])
973 ],[
974         AC_MSG_RESULT([no])
975 ])
976 ])
977
978 #
979 # 3.3 switchs super_operations to use dentry as parameter (but not vfsmount)
980 # see kernel commit 34c80b1d93e6e20ca9dea0baf583a5b5510d92d4
981 #
982 AC_DEFUN([LC_SUPEROPS_USE_DENTRY],
983 [AC_MSG_CHECKING([if super_operations use dentry as parameter])
984 tmp_flags="$EXTRA_KCFLAGS"
985 EXTRA_KCFLAGS="-Werror"
986 LB_LINUX_TRY_COMPILE([
987         #include <linux/fs.h>
988         int show_options(struct seq_file *seq, struct dentry *root){
989                 return 0;
990         }
991 ],[
992         struct super_operations ops;
993         ops.show_options = show_options;
994 ],[
995         AC_DEFINE(HAVE_SUPEROPS_USE_DENTRY, 1,
996                   [super_operations use dentry as parameter])
997         AC_MSG_RESULT([yes])
998 ],[
999         AC_MSG_RESULT([no])
1000 ])
1001 EXTRA_KCFLAGS="$tmp_flags"
1002 ])
1003
1004 #
1005 # 3.3 switchs inode_operations to use umode_t as parameter (but not int)
1006 # see kernel commit 1a67aafb5f72a436ca044293309fa7e6351d6a35
1007 #
1008 AC_DEFUN([LC_INODEOPS_USE_UMODE_T],
1009 [AC_MSG_CHECKING([if inode_operations use umode_t as parameter])
1010 tmp_flags="$EXTRA_KCFLAGS"
1011 EXTRA_KCFLAGS="-Werror"
1012 LB_LINUX_TRY_COMPILE([
1013         #include <linux/fs.h>
1014         #include <linux/types.h>
1015         int my_mknod(struct inode *dir, struct dentry *dchild,
1016                      umode_t mode, dev_t dev)
1017         {
1018                 return 0;
1019         }
1020 ],[
1021         struct inode_operations ops;
1022         ops.mknod = my_mknod;
1023 ],[
1024         AC_DEFINE(HAVE_INODEOPS_USE_UMODE_T, 1,
1025                   [inode_operations use umode_t as parameter])
1026         AC_MSG_RESULT([yes])
1027 ],[
1028         AC_MSG_RESULT([no])
1029 ])
1030 EXTRA_KCFLAGS="$tmp_flags"
1031 ])
1032
1033 # 3.4 kmap_atomic removes second argument
1034 # see kernel commit 1ec9c5ddc17aa398f05646abfcbaf315b544e62f
1035 #
1036 AC_DEFUN([LC_KMAP_ATOMIC_HAS_1ARG],
1037 [AC_MSG_CHECKING([if kmap_atomic has only 1 argument])
1038 LB_LINUX_TRY_COMPILE([
1039         #include <linux/highmem.h>
1040 ],[
1041         kmap_atomic(NULL);
1042 ],[
1043         AC_DEFINE(HAVE_KMAP_ATOMIC_HAS_1ARG, 1,
1044                   [have kmap_atomic has only 1 argument])
1045         AC_MSG_RESULT([yes])
1046 ],[
1047         AC_MSG_RESULT([no])
1048 ])
1049 ])
1050
1051 #
1052 # 3.4 switchs touch_atime to struct path
1053 # see kernel commit 68ac1234fb949b66941d94dce4157742799fc581
1054 #
1055 AC_DEFUN([LC_TOUCH_ATIME_1ARG],
1056 [AC_MSG_CHECKING([if touch_atime use one argument])
1057 LB_LINUX_TRY_COMPILE([
1058         #include <linux/fs.h>
1059 ],[
1060         touch_atime((struct path *)NULL);
1061 ],[
1062         AC_DEFINE(HAVE_TOUCH_ATIME_1ARG, 1,
1063                   [touch_atime use one argument])
1064         AC_MSG_RESULT([yes])
1065 ],[
1066         AC_MSG_RESULT([no])
1067 ])
1068 ])
1069
1070 #
1071 # 3.4 converts d_alloc_root to d_make_root
1072 # see kernel commit 32991ab305ace7017c62f8eecbe5eb36dc32e13b
1073 #
1074 AC_DEFUN([LC_HAVE_D_MAKE_ROOT],
1075 [AC_MSG_CHECKING([if have d_make_root])
1076 LB_LINUX_TRY_COMPILE([
1077         #include <linux/fs.h>
1078 ],[
1079         d_make_root((struct inode *)NULL);
1080 ],[
1081         AC_DEFINE(HAVE_D_MAKE_ROOT, 1,
1082                   [have d_make_root])
1083         AC_MSG_RESULT([yes])
1084 ],[
1085         AC_MSG_RESULT([no])
1086 ])
1087 ])
1088
1089 #
1090 # 3.5 renames end_writeback() back to clear_inode()...
1091 # see kernel commit dbd5768f87ff6fb0a4fe09c4d7b6c4a24de99430
1092 #
1093 AC_DEFUN([LC_HAVE_CLEAR_INODE],
1094 [AC_MSG_CHECKING([if have clear_inode])
1095 LB_LINUX_TRY_COMPILE([
1096         #include <linux/fs.h>
1097 ],[
1098         clear_inode((struct inode *)NULL);
1099 ],[
1100         AC_DEFINE(HAVE_CLEAR_INODE, 1,
1101                   [have clear_inode])
1102         AC_MSG_RESULT([yes])
1103 ],[
1104         AC_MSG_RESULT([no])
1105 ])
1106 ])
1107
1108 #
1109 # 3.5 encode_fh has parent inode passed in directly
1110 # see kernel commit b0b0382b
1111 #
1112 AC_DEFUN([LC_HAVE_ENCODE_FH_PARENT],
1113 [AC_MSG_CHECKING([if encode_fh have parent inode as parameter])
1114 tmp_flags="$EXTRA_KCFLAGS"
1115 EXTRA_KCFLAGS="-Werror"
1116 LB_LINUX_TRY_COMPILE([
1117         #include <linux/exportfs.h>
1118         #include <linux/fs.h>
1119         #include <linux/types.h>
1120         int ll_encode_fh(struct inode *i, __u32 *a, int *b, struct inode *p)
1121         {
1122                 return 0;
1123         }
1124 ],[
1125         struct export_operations exp_op;
1126         exp_op.encode_fh = ll_encode_fh;
1127 ],[
1128         AC_DEFINE(HAVE_ENCODE_FH_PARENT, 1,
1129                   [have parent inode as parameter])
1130         AC_MSG_RESULT([yes])
1131 ],[
1132         AC_MSG_RESULT([no])
1133 ])
1134 EXTRA_KCFLAGS="$tmp_flags"
1135 ])
1136
1137 # 3.5 has generic_file_llseek_size with 5 args
1138 AC_DEFUN([LC_FILE_LLSEEK_SIZE_5ARG],
1139 [AC_MSG_CHECKING([if kernel has generic_file_llseek_size with 5 args])
1140 LB_LINUX_TRY_COMPILE([
1141         #include <linux/fs.h>
1142 ],[
1143         generic_file_llseek_size(NULL, 0, 0, 0, 0);
1144 ], [
1145         AC_MSG_RESULT([yes])
1146         AC_DEFINE(HAVE_FILE_LLSEEK_SIZE_5ARGS, 1,
1147                 [kernel has generic_file_llseek_size with 5 args])
1148 ],[
1149         AC_MSG_RESULT([no])
1150 ])
1151 ])
1152
1153 #
1154 # 3.6 switch i_dentry/d_alias from list to hlist
1155 #
1156 AC_DEFUN([LC_HAVE_DENTRY_D_ALIAS_HLIST],
1157 [AC_MSG_CHECKING([if i_dentry/d_alias uses hlist])
1158 tmp_flags="$EXTRA_KCFLAGS"
1159 EXTRA_KCFLAGS="-Werror"
1160 LB_LINUX_TRY_COMPILE([
1161         #include <linux/fs.h>
1162         #include <linux/list.h>
1163 ],[
1164         struct inode inode;
1165         struct dentry dentry;
1166         struct hlist_head head;
1167         struct hlist_node node;
1168         inode.i_dentry = head;
1169         dentry.d_alias = node;
1170 ],[
1171         AC_DEFINE(HAVE_DENTRY_D_ALIAS_HLIST, 1,
1172                   [have i_dentry/d_alias uses hlist])
1173         AC_MSG_RESULT([yes])
1174 ],[
1175         AC_MSG_RESULT([no])
1176 ])
1177 EXTRA_KCFLAGS="$tmp_flags"
1178 ])
1179
1180 #
1181 # 3.6 dentry_open uses struct path as first argument
1182 # see kernel commit 765927b2
1183 #
1184 AC_DEFUN([LC_DENTRY_OPEN_USE_PATH],
1185 [AC_MSG_CHECKING([if dentry_open uses struct path as first argument])
1186 tmp_flags="$EXTRA_KCFLAGS"
1187 EXTRA_KCFLAGS="-Werror"
1188 LB_LINUX_TRY_COMPILE([
1189         #include <linux/fs.h>
1190         #include <linux/path.h>
1191 ],[
1192         struct path path;
1193         dentry_open(&path, 0, NULL);
1194 ],[
1195         AC_DEFINE(HAVE_DENTRY_OPEN_USE_PATH, 1,
1196                   [dentry_open uses struct path as first argument])
1197         AC_MSG_RESULT([yes])
1198 ],[
1199         AC_MSG_RESULT([no])
1200 ])
1201 EXTRA_KCFLAGS="$tmp_flags"
1202 ])
1203
1204 #
1205 # 3.6 vfs adds iop->atomic_open
1206 #
1207 AC_DEFUN([LC_HAVE_IOP_ATOMIC_OPEN],
1208 [AC_MSG_CHECKING([if iop has atomic_open])
1209 LB_LINUX_TRY_COMPILE([
1210         #include <linux/fs.h>
1211 ],[
1212         struct inode_operations iop;
1213         iop.atomic_open = NULL;
1214 ],[
1215         AC_DEFINE(HAVE_IOP_ATOMIC_OPEN, 1,
1216                   [have iop atomic_open])
1217         AC_MSG_RESULT([yes])
1218 ],[
1219         AC_MSG_RESULT([no])
1220 ])
1221 ])
1222
1223 #
1224 # 3.7 posix_acl_{to,from}_xattr take struct user_namespace
1225 #
1226 AC_DEFUN([LC_HAVE_POSIXACL_USER_NS],
1227 [AC_MSG_CHECKING([if posix_acl_to_xattr takes struct user_namespace])
1228 LB_LINUX_TRY_COMPILE([
1229         #include <linux/fs.h>
1230         #include <linux/posix_acl_xattr.h>
1231 ],[
1232         posix_acl_to_xattr((struct user_namespace *)NULL, NULL, NULL, 0);
1233 ],[
1234         AC_DEFINE(HAVE_POSIXACL_USER_NS, 1,
1235                   [posix_acl_to_xattr takes struct user_namespace])
1236         AC_MSG_RESULT([yes])
1237 ],[
1238         AC_MSG_RESULT([no])
1239 ])
1240 ])
1241
1242 #
1243 # 3.9 uses hlist_for_each_entry with 3 args
1244 # b67bfe0d42cac56c512dd5da4b1b347a23f4b70a
1245 #
1246 AC_DEFUN([LC_HAVE_HLIST_FOR_EACH_3ARG],
1247 [AC_MSG_CHECKING([if hlist_for_each_entry has 3 args])
1248 LB_LINUX_TRY_COMPILE([
1249         #include <linux/list.h>
1250         #include <linux/fs.h>
1251 ],[
1252         struct inode *inode;
1253         struct dentry *dentry;
1254         hlist_for_each_entry(dentry, &inode->i_dentry, d_alias) {
1255                 continue;
1256         }
1257 ],[
1258         AC_DEFINE(HAVE_HLIST_FOR_EACH_3ARG, 1, [3 args])
1259         AC_MSG_RESULT([yes])
1260 ],[
1261         AC_MSG_RESULT([no])
1262 ])
1263 ])
1264
1265 #
1266 # 3.9 killed f_vfsmnt by
1267 # 182be684784334598eee1d90274e7f7aa0063616
1268 # replacement is f_path.mnt
1269 #
1270 AC_DEFUN([LC_HAVE_F_PATH_MNT],
1271 [AC_MSG_CHECKING([if struct file has f_path.mnt])
1272 LB_LINUX_TRY_COMPILE([
1273         #include <linux/fs.h>
1274 ],[
1275         struct file *fp = NULL;
1276         struct path  path;
1277
1278         path.mnt = fp->f_path.mnt;
1279 ],[
1280         AC_DEFINE(HAVE_F_PATH_MNT,1,[yes])
1281         AC_MSG_RESULT([yes])
1282 ],[
1283         AC_MSG_RESULT([no])
1284 ])
1285 ])
1286
1287 #
1288 # LC_PROG_LINUX
1289 #
1290 # Lustre linux kernel checks
1291 #
1292 AC_DEFUN([LC_PROG_LINUX],
1293          [
1294          LC_CONFIG_PINGER
1295          LC_CONFIG_CHECKSUM
1296          LC_CONFIG_LIBLUSTRE_RECOVERY
1297          LC_CONFIG_HEALTH_CHECK_WRITE
1298          LC_CONFIG_LRU_RESIZE
1299          LC_LLITE_LLOOP_MODULE
1300
1301          LC_CAPA_CRYPTO
1302          LC_CONFIG_RMTCLIENT
1303          LC_CONFIG_GSS
1304
1305          # 2.6.24
1306          LC_BIO_ENDIO_2ARG
1307          LC_PROCFS_DELETED
1308
1309          # 2.6.27.15-2 sles11
1310          LC_HAVE_QUOTAIO_H
1311
1312          # 2.6.32
1313          LC_BLK_QUEUE_MAX_SEGMENTS
1314
1315          # 2.6.34
1316          LC_HAVE_DQUOT_FS_DISK_QUOTA
1317          LC_HAVE_DQUOT_SUSPEND
1318
1319          # 2.6.35, 3.0.0
1320          LC_FILE_FSYNC
1321          LC_EXPORT_SIMPLE_SETATTR
1322          LC_EXPORT_TRUNCATE_COMPLETE_PAGE
1323
1324          # 2.6.36
1325          LC_FS_STRUCT_RWLOCK
1326          LC_SBOPS_EVICT_INODE
1327
1328          # 2.6.37
1329          LC_KERNEL_LOCKED
1330
1331          # 2.6.38
1332          LC_BLKDEV_GET_BY_DEV
1333          LC_GENERIC_PERMISSION
1334          LC_DCACHE_LOCK
1335          LC_INODE_I_RCU
1336          LC_D_COMPARE_7ARGS
1337          LC_D_DELETE_CONST
1338
1339          # 2.6.39
1340          LC_REQUEST_QUEUE_UNPLUG_FN
1341          LC_HAVE_FSTYPE_MOUNT
1342
1343          # 3.0
1344          LC_DIRTY_INODE_WITH_FLAG
1345
1346          # 3.1
1347          LC_LM_XXX_LOCK_MANAGER_OPS
1348          LC_INODE_DIO_WAIT
1349          LC_IOP_GET_ACL
1350          LC_FILE_LLSEEK_SIZE
1351          LC_INODE_PERMISION_2ARGS
1352
1353          # 3.1.1
1354          LC_BLOCKS_FOR_TRUNCATE
1355
1356          # 3.2
1357          LC_HAVE_VOID_MAKE_REQUEST_FN
1358          LC_HAVE_PROTECT_I_NLINK
1359
1360          # 3.3
1361          LC_HAVE_MIGRATE_HEADER
1362          LC_MIGRATEPAGE_4ARGS
1363          LC_SUPEROPS_USE_DENTRY
1364          LC_INODEOPS_USE_UMODE_T
1365
1366          # 3.4
1367          LC_TOUCH_ATIME_1ARG
1368          LC_HAVE_D_MAKE_ROOT
1369          LC_KMAP_ATOMIC_HAS_1ARG
1370
1371          # 3.5
1372          LC_HAVE_CLEAR_INODE
1373          LC_HAVE_ENCODE_FH_PARENT
1374          LC_FILE_LLSEEK_SIZE_5ARG
1375
1376          # 3.6
1377          LC_HAVE_DENTRY_D_ALIAS_HLIST
1378          LC_DENTRY_OPEN_USE_PATH
1379          LC_HAVE_IOP_ATOMIC_OPEN
1380
1381          # 3.7
1382          LC_HAVE_POSIXACL_USER_NS
1383
1384          # 3.9
1385          LC_HAVE_HLIST_FOR_EACH_3ARG
1386          LC_HAVE_F_PATH_MNT
1387
1388          #
1389          if test x$enable_server != xno ; then
1390                 LC_FUNC_DEV_SET_RDONLY
1391                 LC_STACK_SIZE
1392                 LC_QUOTA64
1393                 LC_QUOTA_CONFIG
1394          fi
1395 ])
1396
1397 #
1398 # LC_CONFIG_CLIENT
1399 #
1400 # Check whether to build the client side of Lustre
1401 #
1402 AC_DEFUN([LC_CONFIG_CLIENT],
1403 [AC_MSG_CHECKING([whether to build Lustre client support])
1404 AC_ARG_ENABLE([client],
1405         AC_HELP_STRING([--disable-client],
1406                         [disable Lustre client support]),
1407         [],[enable_client='yes'])
1408 AC_MSG_RESULT([$enable_client])
1409 ])
1410
1411 #
1412 # LC_CONFIG_LIBLUSTRE
1413 #
1414 # whether to build liblustre
1415 #
1416 AC_DEFUN([LC_CONFIG_LIBLUSTRE],
1417 [AC_MSG_CHECKING([whether to build Lustre library])
1418 AC_ARG_ENABLE([liblustre],
1419         AC_HELP_STRING([--disable-liblustre],
1420                         [disable building of Lustre library]),
1421         [],[enable_liblustre=$with_sysio])
1422 AC_MSG_RESULT([$enable_liblustre])
1423 # only build sysio if liblustre is built
1424 with_sysio="$enable_liblustre"
1425
1426 AC_MSG_CHECKING([whether to build liblustre tests])
1427 AC_ARG_ENABLE([liblustre-tests],
1428         AC_HELP_STRING([--enable-liblustre-tests],
1429                         [enable liblustre tests, if --disable-tests is used]),
1430         [],[enable_liblustre_tests=$enable_tests])
1431 if test x$enable_liblustre != xyes ; then
1432    enable_liblustre_tests='no'
1433 fi
1434 AC_MSG_RESULT([$enable_liblustre_tests])
1435
1436 AC_MSG_CHECKING([whether to enable liblustre acl])
1437 AC_ARG_ENABLE([liblustre-acl],
1438         AC_HELP_STRING([--disable-liblustre-acl],
1439                         [disable ACL support for liblustre]),
1440         [],[enable_liblustre_acl=yes])
1441 AC_MSG_RESULT([$enable_liblustre_acl])
1442 if test x$enable_liblustre_acl = xyes ; then
1443   AC_DEFINE(LIBLUSTRE_POSIX_ACL, 1, Liblustre Support ACL-enabled MDS)
1444 fi
1445
1446 #
1447 # --enable-mpitest
1448 #
1449 AC_ARG_ENABLE(mpitests,
1450         AC_HELP_STRING([--enable-mpitests=yes|no|mpicc wrapper],
1451                            [include mpi tests]),
1452         [
1453          enable_mpitests=yes
1454          case $enableval in
1455          yes)
1456                 MPICC_WRAPPER=mpicc
1457                 ;;
1458          no)
1459                 enable_mpitests=no
1460                 ;;
1461          *)
1462                 MPICC_WRAPPER=$enableval
1463                  ;;
1464          esac
1465         ],
1466         [
1467         MPICC_WRAPPER=mpicc
1468         enable_mpitests=yes
1469         ]
1470 )
1471
1472 if test x$enable_mpitests != xno; then
1473         AC_MSG_CHECKING([whether mpitests can be built])
1474         oldcc=$CC
1475         CC=$MPICC_WRAPPER
1476         AC_LINK_IFELSE(
1477             [AC_LANG_PROGRAM([[
1478                     #include <mpi.h>
1479                 ]],[[
1480                     int flag;
1481                     MPI_Initialized(&flag);
1482                 ]])],
1483             [
1484                     AC_MSG_RESULT([yes])
1485             ],[
1486                     AC_MSG_RESULT([no])
1487                     enable_mpitests=no
1488         ])
1489         CC=$oldcc
1490 fi
1491 AC_SUBST(MPICC_WRAPPER)
1492
1493 AC_MSG_NOTICE([Enabling Lustre configure options for libsysio])
1494 ac_configure_args="$ac_configure_args --with-lustre-hack --with-sockets"
1495
1496 LC_CONFIG_PINGER
1497 LC_CONFIG_LIBLUSTRE_RECOVERY
1498 ])
1499
1500 #
1501 # LC_CONFIG_QUOTA
1502 #
1503 # whether to enable quota support global control
1504 #
1505 AC_DEFUN([LC_CONFIG_QUOTA],
1506 [AC_ARG_ENABLE([quota],
1507         AC_HELP_STRING([--enable-quota],
1508                         [enable quota support]),
1509         [],[enable_quota='yes'])
1510 ])
1511
1512 AC_DEFUN([LC_QUOTA],
1513 [#check global
1514 LC_CONFIG_QUOTA
1515 #check for utils
1516 if test x$enable_quota != xno -a x$enable_utils != xno; then
1517 AC_CHECK_HEADER(sys/quota.h,
1518                 [AC_DEFINE(HAVE_SYS_QUOTA_H, 1, [Define to 1 if you have <sys/quota.h>.])],
1519                 [AC_MSG_ERROR([don't find <sys/quota.h> in your system])])
1520 fi
1521 ])
1522
1523 #
1524 # LC_CONFIG_SPLIT
1525 #
1526 # whether to enable split support
1527 #
1528 AC_DEFUN([LC_CONFIG_SPLIT],
1529 [AC_MSG_CHECKING([whether to enable split support])
1530 AC_ARG_ENABLE([split],
1531         AC_HELP_STRING([--enable-split],
1532                         [enable split support]),
1533         [],[enable_split='no'])
1534 AC_MSG_RESULT([$enable_split])
1535 if test x$enable_split != xno; then
1536    AC_DEFINE(HAVE_SPLIT_SUPPORT, 1, [enable split support])
1537 fi
1538 ])
1539
1540 #
1541 # LC_LLITE_LLOOP_MODULE
1542 # lloop_llite.ko does not currently work with page sizes
1543 # of 64k or larger.
1544 #
1545 AC_DEFUN([LC_LLITE_LLOOP_MODULE],
1546 [AC_MSG_CHECKING([whether to enable llite_lloop module])
1547 LB_LINUX_TRY_COMPILE([
1548         #include <asm/page.h>
1549 ],[
1550         #if PAGE_SIZE >= 65536
1551         #error "PAGE_SIZE >= 65536"
1552         #endif
1553 ],[
1554         enable_llite_lloop_module='yes'
1555         AC_MSG_RESULT([yes])
1556 ],[
1557         enable_llite_lloop_module='no'
1558         AC_MSG_RESULT([no])
1559 ])
1560 ])
1561
1562 #
1563 # LC_OSD_ADDON
1564 #
1565 # configure support for optional OSD implementation
1566 #
1567 AC_DEFUN([LC_OSD_ADDON],
1568 [AC_MSG_CHECKING([for osd])
1569 AC_ARG_WITH([osd],
1570         AC_HELP_STRING([--with-osd=path],
1571                        [set path to optional osd]),
1572         [
1573                 case $with_osd in
1574                         no)     ENABLEOSDADDON=0
1575                                 ;;
1576                         *)      OSDADDON="${with_osd}"
1577                                 ENABLEOSDADDON=1
1578                                 ;;
1579                 esac
1580         ], [
1581                 ENABLEOSDADDON=0
1582         ])
1583 if test $ENABLEOSDADDON -eq 0; then
1584         AC_MSG_RESULT([no])
1585         OSDADDON=
1586 else
1587         OSDMODNAME=`basename $OSDADDON`
1588         if test -e $LUSTRE/$OSDMODNAME; then
1589                 AC_MSG_RESULT([can't link])
1590                 OSDADDON=
1591         elif ln -s $OSDADDON $LUSTRE/$OSDMODNAME; then
1592                 AC_MSG_RESULT([$OSDMODNAME])
1593                 OSDADDON="subdir-m += $OSDMODNAME"
1594         else
1595                 AC_MSG_RESULT([can't link])
1596                 OSDADDON=
1597         fi
1598 fi
1599 AC_SUBST(OSDADDON)
1600 ])
1601
1602 #
1603 # LC_CONFIGURE
1604 #
1605 # other configure checks
1606 #
1607 AC_DEFUN([LC_CONFIGURE],
1608 [LC_CONFIG_OBD_BUFFER_SIZE
1609
1610 if test $target_cpu == "i686" -o $target_cpu == "x86_64"; then
1611         CFLAGS="$CFLAGS -Werror"
1612 fi
1613
1614 # maximum MDS thread count
1615 LC_MDS_MAX_THREADS
1616
1617 # include/liblustre.h
1618 AC_CHECK_HEADERS([sys/user.h sys/vfs.h stdint.h blkid/blkid.h])
1619
1620 # liblustre/llite_lib.h
1621 AC_CHECK_HEADERS([xtio.h file.h])
1622
1623 # liblustre/dir.c
1624 AC_CHECK_HEADERS([linux/types.h sys/types.h linux/unistd.h unistd.h])
1625
1626 # liblustre/lutil.c
1627 AC_CHECK_HEADERS([netinet/in.h arpa/inet.h catamount/data.h])
1628 AC_CHECK_FUNCS([inet_ntoa])
1629
1630 # libsysio/src/readlink.c
1631 LC_READLINK_SSIZE_T
1632
1633 # lvfs/prng.c - depends on linux/types.h from liblustre/dir.c
1634 AC_CHECK_HEADERS([linux/random.h], [], [],
1635                  [#ifdef HAVE_LINUX_TYPES_H
1636                   # include <linux/types.h>
1637                   #endif
1638                  ])
1639
1640 # utils/llverfs.c
1641 AC_CHECK_HEADERS([ext2fs/ext2fs.h])
1642
1643 # check for -lz support
1644 ZLIB=""
1645 AC_CHECK_LIB([z],
1646              [adler32],
1647              [AC_CHECK_HEADERS([zlib.h],
1648                                [ZLIB="-lz"
1649                                 AC_DEFINE([HAVE_ADLER], 1,
1650                                           [support alder32 checksum type])],
1651                                [AC_MSG_WARN([No zlib-devel package found,
1652                                              unable to use adler32 checksum])])],
1653              [AC_MSG_WARN([No zlib package found, unable to use adler32 checksum])]
1654 )
1655 AC_SUBST(ZLIB)
1656
1657 SELINUX=""
1658 AC_CHECK_LIB([selinux],
1659                 [is_selinux_enabled],
1660                 [AC_CHECK_HEADERS([selinux.h],
1661                                 [SELINUX="-lselinux"
1662                                 AC_DEFINE([HAVE_SELINUX], 1,
1663                                                 [support for selinux ])],
1664                                 [AC_MSG_WARN([No selinux-devel package found,
1665                                                 unable to build selinux enabled
1666                                                 tools])])],
1667                 [AC_MSG_WARN([No selinux package found, unable to build selinux
1668                                 enabled tools])]
1669 )
1670 AC_SUBST(SELINUX)
1671
1672 # Super safe df
1673 AC_ARG_ENABLE([mindf],
1674       AC_HELP_STRING([--enable-mindf],
1675                       [Make statfs report the minimum available space on any single OST instead of the sum of free space on all OSTs]),
1676       [],[])
1677 if test "$enable_mindf" = "yes" ;  then
1678       AC_DEFINE([MIN_DF], 1, [Report minimum OST free space])
1679 fi
1680
1681 AC_ARG_ENABLE([fail_alloc],
1682         AC_HELP_STRING([--disable-fail-alloc],
1683                 [disable randomly alloc failure]),
1684         [],[enable_fail_alloc=yes])
1685 AC_MSG_CHECKING([whether to randomly failing memory alloc])
1686 AC_MSG_RESULT([$enable_fail_alloc])
1687 if test x$enable_fail_alloc != xno ; then
1688         AC_DEFINE([RANDOM_FAIL_ALLOC], 1, [enable randomly alloc failure])
1689 fi
1690
1691 AC_ARG_ENABLE([invariants],
1692         AC_HELP_STRING([--enable-invariants],
1693                 [enable invariant checking (cpu intensive)]),
1694         [],[])
1695 AC_MSG_CHECKING([whether to check invariants (expensive cpu-wise)])
1696 AC_MSG_RESULT([$enable_invariants])
1697 if test x$enable_invariants = xyes ; then
1698         AC_DEFINE([CONFIG_LUSTRE_DEBUG_EXPENSIVE_CHECK], 1, [enable invariant checking])
1699 fi
1700
1701 AC_ARG_ENABLE([lu_ref],
1702         AC_HELP_STRING([--enable-lu_ref],
1703                 [enable lu_ref reference tracking code]),
1704         [],[])
1705 AC_MSG_CHECKING([whether to track references with lu_ref])
1706 AC_MSG_RESULT([$enable_lu_ref])
1707 if test x$enable_lu_ref = xyes ; then
1708         AC_DEFINE([USE_LU_REF], 1, [enable lu_ref reference tracking code])
1709 fi
1710
1711 AC_ARG_ENABLE([pgstate-track],
1712               AC_HELP_STRING([--enable-pgstate-track],
1713                              [enable page state tracking]),
1714               [enable_pgstat_track='yes'],[])
1715 AC_MSG_CHECKING([whether to enable page state tracking])
1716 AC_MSG_RESULT([$enable_pgstat_track])
1717 if test x$enable_pgstat_track = xyes ; then
1718         AC_DEFINE([CONFIG_DEBUG_PAGESTATE_TRACKING], 1,
1719                   [enable page state tracking code])
1720 fi
1721 ])
1722
1723 #
1724 # LC_CONDITIONALS
1725 #
1726 # AM_CONDITIONALS for lustre
1727 #
1728 AC_DEFUN([LC_CONDITIONALS],
1729 [AM_CONDITIONAL(LIBLUSTRE, test x$enable_liblustre = xyes)
1730 AM_CONDITIONAL(LIBLUSTRE_TESTS, test x$enable_liblustre_tests = xyes)
1731 AM_CONDITIONAL(MPITESTS, test x$enable_mpitests = xyes, Build MPI Tests)
1732 AM_CONDITIONAL(CLIENT, test x$enable_client = xyes)
1733 AM_CONDITIONAL(SERVER, test x$enable_server = xyes)
1734 AM_CONDITIONAL(SPLIT, test x$enable_split = xyes)
1735 AM_CONDITIONAL(BLKID, test x$ac_cv_header_blkid_blkid_h = xyes)
1736 AM_CONDITIONAL(EXT2FS_DEVEL, test x$ac_cv_header_ext2fs_ext2fs_h = xyes)
1737 AM_CONDITIONAL(GSS, test x$enable_gss = xyes)
1738 AM_CONDITIONAL(GSS_KEYRING, test x$enable_gss_keyring = xyes)
1739 AM_CONDITIONAL(GSS_PIPEFS, test x$enable_gss_pipefs = xyes)
1740 AM_CONDITIONAL(LIBPTHREAD, test x$enable_libpthread = xyes)
1741 AM_CONDITIONAL(LLITE_LLOOP, test x$enable_llite_lloop_module = xyes)
1742 ])
1743
1744 #
1745 # LC_CONFIG_FILES
1746 #
1747 # files that should be generated with AC_OUTPUT
1748 #
1749 AC_DEFUN([LC_CONFIG_FILES],
1750 [AC_CONFIG_FILES([
1751 lustre/Makefile
1752 lustre/autoMakefile
1753 lustre/autoconf/Makefile
1754 lustre/conf/Makefile
1755 lustre/contrib/Makefile
1756 lustre/doc/Makefile
1757 lustre/include/Makefile
1758 lustre/include/lustre_ver.h
1759 lustre/include/linux/Makefile
1760 lustre/include/darwin/Makefile
1761 lustre/include/lustre/Makefile
1762 lustre/kernel_patches/targets/2.6-rhel6.target
1763 lustre/kernel_patches/targets/2.6-rhel5.target
1764 lustre/kernel_patches/targets/2.6-sles11.target
1765 lustre/kernel_patches/targets/3.0-sles11.target
1766 lustre/kernel_patches/targets/3.0-sles11sp3.target
1767 lustre/kernel_patches/targets/2.6-fc11.target
1768 lustre/kernel_patches/targets/2.6-fc12.target
1769 lustre/kernel_patches/targets/2.6-fc15.target
1770 lustre/kernel_patches/targets/3.x-fc18.target
1771 lustre/ldlm/Makefile
1772 lustre/fid/Makefile
1773 lustre/fid/autoMakefile
1774 lustre/liblustre/Makefile
1775 lustre/liblustre/tests/Makefile
1776 lustre/liblustre/tests/mpi/Makefile
1777 lustre/llite/Makefile
1778 lustre/llite/autoMakefile
1779 lustre/lclient/Makefile
1780 lustre/lov/Makefile
1781 lustre/lov/autoMakefile
1782 lustre/lvfs/Makefile
1783 lustre/lvfs/autoMakefile
1784 lustre/mdc/Makefile
1785 lustre/mdc/autoMakefile
1786 lustre/lmv/Makefile
1787 lustre/lmv/autoMakefile
1788 lustre/lfsck/Makefile
1789 lustre/lfsck/autoMakefile
1790 lustre/mdt/Makefile
1791 lustre/mdt/autoMakefile
1792 lustre/mdd/Makefile
1793 lustre/mdd/autoMakefile
1794 lustre/fld/Makefile
1795 lustre/fld/autoMakefile
1796 lustre/obdclass/Makefile
1797 lustre/obdclass/autoMakefile
1798 lustre/obdclass/linux/Makefile
1799 lustre/obdecho/Makefile
1800 lustre/obdecho/autoMakefile
1801 lustre/ofd/Makefile
1802 lustre/ofd/autoMakefile
1803 lustre/osc/Makefile
1804 lustre/osc/autoMakefile
1805 lustre/ost/Makefile
1806 lustre/ost/autoMakefile
1807 lustre/osd-ldiskfs/Makefile
1808 lustre/osd-ldiskfs/autoMakefile
1809 lustre/osd-zfs/Makefile
1810 lustre/osd-zfs/autoMakefile
1811 lustre/mgc/Makefile
1812 lustre/mgc/autoMakefile
1813 lustre/mgs/Makefile
1814 lustre/mgs/autoMakefile
1815 lustre/target/Makefile
1816 lustre/ptlrpc/Makefile
1817 lustre/ptlrpc/autoMakefile
1818 lustre/ptlrpc/gss/Makefile
1819 lustre/ptlrpc/gss/autoMakefile
1820 lustre/quota/Makefile
1821 lustre/quota/autoMakefile
1822 lustre/scripts/Makefile
1823 lustre/tests/Makefile
1824 lustre/tests/mpi/Makefile
1825 lustre/utils/Makefile
1826 lustre/utils/gss/Makefile
1827 lustre/osp/Makefile
1828 lustre/osp/autoMakefile
1829 lustre/lod/Makefile
1830 lustre/lod/autoMakefile
1831 lustre/obdclass/darwin/Makefile
1832 ])
1833 ])