ref: 4cff2af5a4ff459f67aaa9cadf56913171891f95
dir: /replay.rc/
#!/bin/rc
flagfmt='r:ream, s:start start'
if(! ifs=() eval `{aux/getflags $*}){
aux/usage
exit usage
}
mk
if(~ $#start 0)
start=0
if(~ $#ream 1){
6.out -r $user -f test.fs
test/6.freplay -l /tmp/fsreplay test.fs
6.out -f /n/replay/data
mount -c /srv/gefs /n/gefs
@{
cd /n/gefs
git/clone gits://shithub.us/ori/git9
sleep 10
cd git9
mk all
echo sync >> /n/gefs/ctl
kill 6.out | rc
}
count=`{awk '{print $2}' < /n/replay/ctl}
echo exit > /n/replay/ctl
}
echo replaying $start .. $count IOs
test/6.freplay -c $start -r /tmp/fsreplay test.fs
for(i in `{seq $start 1 $count}){
echo run $i
kill 6.out | rc
if(! 6.out -m 128 -C -n gefs.replay -f /n/replay/data){
echo busted after op $i
exit
}
mount /srv/gefs.replay /n/gefs.replay
walk /n/gefs.replay | sed 20q
if(! echo step > /n/replay/ctl)
exit
}
kill 6.out | rc