From 250cfab4dee85481ca8003bf75a110e5704af65c Mon Sep 17 00:00:00 2001 From: "Christopher J. Morrone" Date: Thu, 24 Feb 2011 14:11:45 -0800 Subject: [PATCH] Make llite_lloop.ko build conditional 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 Reviewed-on: http://review.whamcloud.com/266 Tested-by: Hudson Reviewed-by: Brian J. Murrell Reviewed-by: Oleg Drokin --- lustre/autoconf/lustre-core.m4 | 24 ++++++++++++++++++++++++ lustre/llite/Makefile.in | 3 ++- lustre/llite/autoMakefile.am | 7 ++++++- 3 files changed, 32 insertions(+), 2 deletions(-) diff --git a/lustre/autoconf/lustre-core.m4 b/lustre/autoconf/lustre-core.m4 index 8c411eb..4eb3c0d7 100644 --- a/lustre/autoconf/lustre-core.m4 +++ b/lustre/autoconf/lustre-core.m4 @@ -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 +],[ + #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) ]) # diff --git a/lustre/llite/Makefile.in b/lustre/llite/Makefile.in index 5bb5717..b37b952 100644 --- a/lustre/llite/Makefile.in +++ b/lustre/llite/Makefile.in @@ -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 diff --git a/lustre/llite/autoMakefile.am b/lustre/llite/autoMakefile.am index 7716097..4f68d57 100644 --- a/lustre/llite/autoMakefile.am +++ b/lustre/llite/autoMakefile.am @@ -35,7 +35,12 @@ # 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@ -- 1.8.3.1