Whamcloud - gitweb
Add a check in new_fs() to try and avoid overwriting an in-use block device.
[fs/lustre-release.git] / lustre / tests / mdcreqcleanup.sh
index da87ece..39258a4 100755 (executable)
@@ -1,22 +1,34 @@
+#!/bin/sh
+
+SRCDIR="`dirname $0`"
+. $SRCDIR/common.sh
+
 rmmod llight
 rmmod mdc
-/usr/src/obd/utils/obdctl <<EOF
+
+$OBDCTL <<EOF
 device 0
 cleanup
 detach
 quit
 EOF
+
 rmmod mds
 rmmod osc
 rmmod ost
 rmmod obdext2
 rmmod obdclass
 rmmod ptlrpc
-/usr/src/portals/linux/utils/ptlctl <<EOF
-setup tcp localhost 1234
-disconnect self
-disconnect mds
+
+$PTLCTL <<EOF
+setup tcp
+disconnect localhost
+del_uuid self
+del_uuid mds
 EOF
+
+losetup -d ${LOOP}0
+
 killall acceptor
 rmmod ksocknal
 rmmod portals