Whamcloud - gitweb
Add slab patches to chaos patch.
[fs/lustre-release.git] / lustre / tests / llmountcleanup.sh
index 81a5832..0448d31 100755 (executable)
@@ -1,45 +1,79 @@
 #!/bin/sh
-LOOP0=/dev/loop0
-LOOP1=/dev/loop1
 
-if [ ! -e $LOOP0 ]; then
-    echo $LOOP0 'doesnt exist: (not) using devfs?' 
-    exit
+SRCDIR="`dirname $0`/"
+. $SRCDIR/common.sh
+
+TIME=`date +'%s'`
+
+$DBGCTL debug_kernel /tmp/debug.1.$TIME 1
+
+if mount | grep '/mnt/lustre'; then
+       umount /mnt/lustre || fail "cannot unmount"
 fi
 
-umount /mnt/obd
+killall acceptor
+rmmod llite
 
-rmmod llight
-rmmod mdc
-/usr/src/obd/utils/obdctl <<EOF
-device 3
+$OBDCTL <<EOF
+name2dev MDCDEV
+cleanup
+detach
+name2dev OSCDEV
+cleanup
+detach
+name2dev OSTDEV
+cleanup
+detach
+name2dev OBDDEV
 cleanup
 detach
-device 2
+name2dev MDSDEV
 cleanup
 detach
-device 1
+name2dev LDLMDEV
 cleanup
 detach
-device 0
+name2dev RPCDEV
 cleanup
 detach
 quit
 EOF
+
+rmmod obdecho
+rmmod mds_extN
+rmmod mds_ext3
+rmmod mds_ext2
 rmmod mds
+rmmod mdc
 rmmod osc
 rmmod ost
+rmmod obdfilter
 rmmod obdext2
-rmmod obdclass
+rmmod ldlm
 rmmod ptlrpc
-/usr/src/portals/linux/utils/ptlctl <<EOF
-setup tcp localhost 1234
-disconnect self
-disconnect mds
+rmmod obdclass
+rmmod extN
+
+$DBGCTL debug_kernel /tmp/debug.2.$TIME 1
+
+$PTLCTL <<EOF
+setup tcp
+disconnect
+del_uuid self
+del_uuid localhost
+del_uuid localhost
+del_uuid localhost
+quit
 EOF
+
+rmmod kqswnal
 rmmod ksocknal
-killall acceptor
+
+$DBGCTL debug_kernel /tmp/debug.3.$TIME 1
+
 rmmod portals
 
-losetup -d $LOOP0
-losetup -d $LOOP1
\ No newline at end of file
+losetup -d ${LOOP}0
+losetup -d ${LOOP}1
+losetup -d ${LOOP}2
+exit 0