Whamcloud - gitweb
Make llite_lloop.ko build conditional
authorChristopher J. Morrone <morrone2@llnl.gov>
Thu, 24 Feb 2011 22:11:45 +0000 (14:11 -0800)
committerOleg Drokin <green@whamcloud.com>
Thu, 10 Mar 2011 04:44:15 +0000 (20:44 -0800)
The llite_lloop.ko module only works with kernel page sizes smaller
than 64K, so test for the kernel page size and only build the module
conditionally.

Issue: LU-94
Change-Id: I78e416832767bbe29529d152e45addec7a999506
Signed-off-by: Christopher J. Morrone <morrone2@llnl.gov>
Reviewed-on: http://review.whamcloud.com/266
Tested-by: Hudson
Reviewed-by: Brian J. Murrell <brian@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/autoconf/lustre-core.m4
lustre/llite/Makefile.in
lustre/llite/autoMakefile.am

index 8c411eb..4eb3c0d 100644 (file)
@@ -1991,6 +1991,7 @@ AC_DEFUN([LC_PROG_LINUX],
          LC_CONFIG_HEALTH_CHECK_WRITE
          LC_CONFIG_LRU_RESIZE
          LC_QUOTA_MODULE
+         LC_LLITE_LLOOP_MODULE
 
          # RHEL4 patches
          LC_EXPORT_TRUNCATE_COMPLETE
@@ -2550,6 +2551,28 @@ AC_DEFUN([LC_TASK_CLENV_STORE],
 ])
 
 #
+# LC_LLITE_LLOOP_MODULE
+# lloop_llite.ko does not currently work with page sizes
+# of 64k or larger.
+#
+AC_DEFUN([LC_LLITE_LLOOP_MODULE],
+[AC_MSG_CHECKING([whether to enable llite_lloop module])
+LB_LINUX_TRY_COMPILE([
+        #include <asm/page.h>
+],[
+        #if PAGE_SIZE >= 65536
+        #error "PAGE_SIZE >= 65536"
+        #endif
+],[
+        enable_llite_lloop_module='yes'
+        AC_MSG_RESULT([yes])
+],[
+        enable_llite_lloop_module='no'
+        AC_MSG_RESULT([no])
+])
+])
+
+#
 # LC_CONFIGURE
 #
 # other configure checks
@@ -2679,6 +2702,7 @@ AM_CONDITIONAL(GSS, test x$enable_gss = xyes)
 AM_CONDITIONAL(GSS_KEYRING, test x$enable_gss_keyring = xyes)
 AM_CONDITIONAL(GSS_PIPEFS, test x$enable_gss_pipefs = xyes)
 AM_CONDITIONAL(LIBPTHREAD, test x$enable_libpthread = xyes)
+AM_CONDITIONAL(LLITE_LLOOP, test x$enable_llite_lloop_module = xyes)
 ])
 
 #
index 5bb5717..b37b952 100644 (file)
@@ -1,4 +1,5 @@
-MODULES := lustre llite_lloop
+MODULES := lustre
+@LLITE_LLOOP_TRUE@MODULES += llite_lloop
 lustre-objs := dcache.o dir.o file.o llite_close.o llite_lib.o llite_nfs.o
 lustre-objs += rw.o lproc_llite.o namei.o symlink.o llite_mmap.o
 lustre-objs += xattr.o remote_perm.o llite_rmtacl.o llite_capa.o
index 7716097..4f68d57 100644 (file)
 #
 
 if MODULES
-modulefs_DATA = lustre$(KMODEXT) llite_lloop$(KMODEXT)
+if LLITE_LLOOP
+  LLOOP_MOD = llite_lloop$(KMODEXT)
+else
+  LLOOP_MOD =
+endif
+modulefs_DATA = lustre$(KMODEXT) $(LLOOP_MOD)
 endif
 
 MOSTLYCLEANFILES := @MOSTLYCLEANFILES@