From ff9f95abb13642fd2a1a183e2f92f390ffdbb1ae Mon Sep 17 00:00:00 2001 From: Richard Henwood Date: Tue, 21 Jun 2011 22:38:28 -0400 Subject: [PATCH] LU-409: only load llite_lloop module if kernel < 2.6.32 or LOAD_LLOOP The change of block device interface in kernel 2.6.32-131 caused the llite_lloop module to fail. llite_lloop module is currently unsupported. This change introduces a test for kernel version to prohibit loading a module with a kernel >= 2.6.32. A LOAD_LLOOP flag (default false) is provided to ignore the kernel test and force loading of llite_lloop if desired. A related version of this change for b1_8 is: http://review.whamcloud.com/954 Change-Id: I63ebc7a8e0a8de6d34ffce5fd625df6db7216d32 Signed-off-by: Richard Henwood Reviewed-on: http://review.whamcloud.com/956 Reviewed-by: Andreas Dilger Reviewed-by: Yang Sheng Tested-by: Hudson Reviewed-by: Oleg Drokin --- lustre/tests/test-framework.sh | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/lustre/tests/test-framework.sh b/lustre/tests/test-framework.sh index 14547a1..392536a 100644 --- a/lustre/tests/test-framework.sh +++ b/lustre/tests/test-framework.sh @@ -16,6 +16,10 @@ export GSS_PIPEFS=false export IDENTITY_UPCALL=default export QUOTA_AUTO=1 +# LOAD_LLOOP: LU-409: only load llite_lloop module if kernel < 2.6.32 or +# LOAD_LLOOP is true. LOAD_LLOOP is false by default. +export LOAD_LLOOP=${LOAD_LLOOP:-false} + #export PDSH="pdsh -S -Rssh -w" # function used by scripts run on remote nodes @@ -364,8 +368,21 @@ load_modules_local() { load_module obdfilter/obdfilter fi + load_module_llite_lloop() { + local n1=$(uname -r | cut -d. -f1) + local n2=$(uname -r | cut -d. -f2) + local n3=$(uname -r | cut -d- -f1 | cut -d. -f3) + + # load the llite_lloop module for < 2.6.32 kernels + if [[ $n1 -lt 2 ]] || [[ $n1 -eq 2 && $n2 -lt 6 ]] || \ + [[ $n1 -eq 2 && $n2 -eq 6 && $n3 -lt 32 ]] || \ + $LOAD_LLOOP; then + load_module llite/llite_lloop + fi + } + load_module llite/lustre - load_module llite/llite_lloop + load_module_llite/llite_lloop [ -d /r ] && OGDB=${OGDB:-"/r/tmp"} OGDB=${OGDB:-$TMP} rm -f $OGDB/ogdb-$HOSTNAME -- 1.8.3.1