From: Mikhail Pershin Date: Wed, 15 Dec 2010 15:07:12 +0000 (+0300) Subject: b=24078 replay barrier checks sequence allocation X-Git-Tag: 2.0.59.0~3 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=aee4bb65c1071271bd6a770297a5e1d2cc779d48 b=24078 replay barrier checks sequence allocation i=grev --- diff --git a/lustre/tests/replay-single.sh b/lustre/tests/replay-single.sh index e8426fb..3cb5662 100755 --- a/lustre/tests/replay-single.sh +++ b/lustre/tests/replay-single.sh @@ -55,75 +55,6 @@ test_0b() { } run_test 0b "ensure object created after recover exists. (3284)" -seq_set_width() -{ - local mds=$1 - local width=$2 - lctl set_param -n seq.cli-srv-$mds-mdc-*.width=$width -} - -seq_get_width() -{ - local mds=$1 - lctl get_param -n seq.cli-srv-$mds-mdc-*.width -} - -# This test should pass for single-mds and multi-mds configs. -# But for different configurations it tests different things. -# -# single-mds -# ---------- -# (1) fld_create replay should happen; -# -# (2) fld_create replay should not return -EEXISTS, if it does -# this means sequence manager recovery code is buggy and allocated -# same sequence two times after recovery. -# -# multi-mds -# --------- -# (1) fld_create replay may not happen, because its home MDS is -# MDS2 which is not involved to revovery; -# -# (2) as fld_create does not happen on MDS1, it does not make any -# problem. -test_0c() { - local label=`mdsdevlabel 1` - [ -z "$label" ] && echo "No label for mds1" && return 1 - - replay_barrier $SINGLEMDS - local sw=`seq_get_width $label` - - # make seq manager switch to next sequence each - # time as new fid is needed. - seq_set_width $label 1 - - # make sure that fld has created at least one new - # entry on server - touch $DIR/$tfile || return 2 - seq_set_width $label $sw - - # fail $SINGLEMDS and start recovery, replay RPCs, etc. - fail $SINGLEMDS - - # wait for recovery finish - sleep 10 - df $MOUNT - - # flush fld cache and dentry cache to make it lookup - # created entry instead of revalidating existent one - umount $MOUNT - zconf_mount `hostname` $MOUNT - - # issue lookup which should call fld lookup which - # should fail if client did not replay fld create - # correctly and server has no fld entry - touch $DIR/$tfile || return 3 - rm $DIR/$tfile || return 4 -} -start_full_debug_logging -run_test 0c "fld create" -stop_full_debug_logging - test_0d() { replay_barrier $SINGLEMDS umount $MOUNT diff --git a/lustre/tests/test-framework.sh b/lustre/tests/test-framework.sh index e76c6a0..f77b467 100644 --- a/lustre/tests/test-framework.sh +++ b/lustre/tests/test-framework.sh @@ -1484,6 +1484,11 @@ replay_barrier() { local facet=$1 do_facet $facet sync df $MOUNT + + # make sure there will be no seq change + local clients=${CLIENTS:-$HOSTNAME} + do_nodes $clients "f=${MOUNT}/fsa-\\\$(hostname); mcreate \\\$f; rm \\\$f" + local svc=${facet}_svc do_facet $facet $LCTL --device %${!svc} notransno do_facet $facet $LCTL --device %${!svc} readonly