Whamcloud - gitweb
LU-409 stop loading the llite_lloop module for >= 2.6.32 kernels
authorYu Jian <yujian@whamcloud.com>
Thu, 16 Jun 2011 15:27:44 +0000 (23:27 +0800)
committerJohann Lombardi <johann@whamcloud.com>
Fri, 17 Jun 2011 12:07:51 +0000 (05:07 -0700)
The change of block device interface in kernel 2.6.32-131 caused
the llite_lloop module do not work. Since this is an unsupported
feature, let's stop loading this module from load_modules in
test-framework.sh.

Signed-off-by: Yu Jian <yujian@whamcloud.com>
Change-Id: Ic8513dbb02caa93f768a95b9f5798a91f7520ecd
Reviewed-on: http://review.whamcloud.com/954
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Yang Sheng <ys@whamcloud.com>
lustre/tests/test-framework.sh

index 477f70a..011a198 100644 (file)
@@ -291,6 +291,18 @@ load_module() {
     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 ]]; then
+        load_module llite/llite_lloop
+    fi
+}
+
 load_modules_local() {
     if [ -n "$MODPROBE" ]; then
         # use modprobe
@@ -345,7 +357,7 @@ load_modules_local() {
     fi
 
     load_module llite/lustre
-    load_module llite/llite_lloop
+    load_module_llite_lloop
     rm -f $TMP/ogdb-$HOSTNAME
     OGDB=$TMP
     [ -d /r ] && OGDB="/r/tmp"