Whamcloud - gitweb
LU-1625 test: reduce test duration for nfs mode
[fs/lustre-release.git] / lustre / tests / mmp_mark.sh
1 #!/bin/bash
2 # this will cause debugfs to create the /tmp/debugfs.mark file once it has
3 # passed the MMP startup, then continue reading input until it is killed
4 MARKFILE=$(mktemp)
5 DEBUGFS=${DEBUGFS:-debugfs}
6 DEVICE=$1
7
8 rm -f $MARKFILE
9 echo "$DEBUGFS -w $DEVICE"
10 { echo "dump_inode <2> $MARKFILE"; cat /dev/zero; } | $DEBUGFS -w $DEVICE &
11 debugfspid=$!
12 while [ ! -e $MARKFILE ]; do
13         sleep 1
14 done
15 rm -f $MARKFILE
16 kill -9 $debugfspid