Whamcloud - gitweb
b=20816 fix replay-single test 67b
authorAlexander.Zarochentev <alexander.zarochentev@sun.com>
Sun, 10 Jan 2010 19:56:26 +0000 (22:56 +0300)
committerJohann Lombardi <johann@sun.com>
Wed, 13 Jan 2010 21:47:19 +0000 (22:47 +0100)
Exhausting precreation before testing delayed file creation on OST.

i=johann
i=robert.read

lustre/tests/replay-single.sh [changed mode: 0755->0644]

old mode 100755 (executable)
new mode 100644 (file)
index 586e9bc..1790376
@@ -1694,10 +1694,21 @@ test_67b() #bug 3055
 
     at_start || return 0
     CONN1=$(lctl get_param -n osc.*.stats | awk '/_connect/ {total+=$2} END {print total}')
+
+    # exhaust precreations on ost1
+    local OST=$(lfs osts | grep 0": " | awk '{print $2}' | sed -e 's/_UUID$//')
+    local mdtosc=$(get_mdtosc_proc_path $OST)
+    local last_id=$(do_facet mds lctl get_param -n osc.$mdtosc.prealloc_last_id)
+    local next_id=$(do_facet mds lctl get_param -n osc.$mdtosc.prealloc_next_id)
+
+    mkdir -p $DIR/$tdir/${OST}
+    lfs setstripe $DIR/$tdir/${OST} -o 0 -c 1 || error "setstripe"
+    echo "Creating to objid $last_id on ost $OST..."
 #define OBD_FAIL_OST_PAUSE_CREATE        0x223
     do_facet ost1 "lctl set_param fail_val=20000"
     do_facet ost1 "lctl set_param fail_loc=0x80000223"
-    cp /etc/profile $DIR/$tfile || error "cp failed"
+    createmany -o $DIR/$tdir/${OST}/f $next_id $((last_id - next_id + 2))
+
     client_reconnect
     do_facet ost1 "lctl get_param -n ost.OSS.ost_create.timeouts"
     log "phase 2"