Whamcloud - gitweb
b=24078 replay barrier checks sequence allocation
authorMikhail Pershin <mikhail.pershin@oracle.com>
Wed, 15 Dec 2010 15:07:12 +0000 (18:07 +0300)
committerVitaly Fertman <vitaly.fertman@oracle.com>
Fri, 17 Dec 2010 01:22:11 +0000 (04:22 +0300)
i=grev

lustre/tests/replay-single.sh
lustre/tests/test-framework.sh

index e8426fb..3cb5662 100755 (executable)
@@ -55,75 +55,6 @@ test_0b() {
 }
 run_test 0b "ensure object created after recover exists. (3284)"
 
 }
 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
 test_0d() {
     replay_barrier $SINGLEMDS
     umount $MOUNT
index e76c6a0..f77b467 100644 (file)
@@ -1484,6 +1484,11 @@ replay_barrier() {
     local facet=$1
     do_facet $facet sync
     df $MOUNT
     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
     local svc=${facet}_svc
     do_facet $facet $LCTL --device %${!svc} notransno
     do_facet $facet $LCTL --device %${!svc} readonly