$SETSTRIPE $DIR/d31f -s 1048576 -c 1
cp /etc/hosts $DIR/d31f
ls -l $DIR/d31f
- $DIR/d31f/hosts
+ $GETSTRIPE $DIR/d31f/hosts
multiop_bg_pause $DIR/d31f D_c || return 1
MULTIPID2=$!
# ensure that all stripes have some grant before we test client-side cache
setup_test42() {
+ [ "$SETUP_TEST42" ] && return
for i in `seq -f $DIR/f42-%g 1 $OSTCOUNT`; do
dd if=/dev/zero of=$i bs=4k count=1
rm $i
done
+ SETUP_TEST42=DONE
}
# Tests 42* verify that our behaviour is correct WRT caching, file closure,
test_57a() {
# note test will not do anything if MDS is not local
remote_mds_nodsh && skip "remote MDS with nodsh" && return
-
- local MNTDEV="osd.*MDT*.mntdev"
+ local MNTDEV="osd*.*MDT*.mntdev"
DEV=$(do_facet $SINGLEMDS lctl get_param -n $MNTDEV)
[ -z "$DEV" ] && error "can't access $MNTDEV"
for DEV in $(do_facet $SINGLEMDS lctl get_param -n $MNTDEV); do
}
run_test 101 "check read-ahead for random reads ================"
+export SETUP_TEST101=no
setup_test101() {
+ [ "$SETUP_TEST101" = "yes" ] && return
mkdir -p $DIR/$tdir
STRIPE_SIZE=1048576
STRIPE_COUNT=$OSTCOUNT
$SETSTRIPE $DIR/$tfile -s $STRIPE_SIZE -i $STRIPE_OFFSET -c $OSTCOUNT
dd if=/dev/zero of=$DIR/$tfile bs=1024k count=100 2> /dev/null
+ SETUP_TEST101=yes
}
cleanup_test101() {
+ [ "$SETUP_TEST101" = "yes" ] || return
trap 0
rm -rf $DIR/$tdir
- rm -f $DIR/$tfile
+ rm -f $DIR/$tfile
+ SETUP_TEST101=no
}
calc_total() {
cancel_lru_locks osc
ra_check_101 $BSIZE
done
+ cleanup_test101
true
}
run_test 101b "check stride-io mode read-ahead ================="
}
run_test 101d "file read with and without read-ahead enabled ================="
+export SETUP_TEST102=no
setup_test102() {
+ [ "$SETUP_TEST102" = "yes" ] && return
mkdir -p $DIR/$tdir
chown $RUNAS_ID $DIR/$tdir
STRIPE_SIZE=65536
cd $DIR
$1 $TAR cf $TMP/f102.tar $tdir --xattrs
+ SETUP_TEST102=yes
}
cleanup_test102() {
trap 0
+ [ "$SETUP_TEST102" = "yes" ] || return 0
rm -f $TMP/f102.tar
- rm -rf $DIR/d0.sanity/d102
+ SETUP_TEST102=no
}
test_102a() {
for node in $(mdts_nodes); do
devs=$(do_node $node "lctl get_param -n devices" | awk '($3 ~ "mdt" && $4 ~ "MDT") { print $4 }')
for dev in $devs; do
- mntdev=$(do_node $node "lctl get_param -n osd.$dev.mntdev")
+ mntdev=$(do_node $node "lctl get_param -n osd*.$dev.mntdev")
do_node $node "echo $1 >$LDPROC/\\\$(basename $mntdev)/max_dir_size"
done
done