Many sub tests in recovery-small.sh and replay-single.sh need to mkdir
on MDT0, use mkdir_on_mdt0() to create such directories.
Test-Parameters: trivial mdscount=2 mdtcount=4 testlist=recovery-small.sh,replay-single.sh
Signed-off-by: Lai Siyao <lai.siyao@whamcloud.com>
Change-Id: Id4a44da062350ea284f51c8c821302aebbfe9dee
Reviewed-on: https://review.whamcloud.com/44544
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
# Bug 113, check that readdir lost recv timeout works.
test_13() {
# Bug 113, check that readdir lost recv timeout works.
test_13() {
- mkdir -p $DIR/$tdir || { error "mkdir failed: $?"; return 1; }
+ mkdir_on_mdt0 $DIR/$tdir || { error "mkdir failed: $?"; return 1; }
touch $DIR/$tdir/newentry || { error "touch failed: $?"; return 2; }
# OBD_FAIL_MDS_READPAGE_NET|OBD_FAIL_ONCE
do_facet $SINGLEMDS "lctl set_param fail_loc=0x80000104"
touch $DIR/$tdir/newentry || { error "touch failed: $?"; return 2; }
# OBD_FAIL_MDS_READPAGE_NET|OBD_FAIL_ONCE
do_facet $SINGLEMDS "lctl set_param fail_loc=0x80000104"
run_test 26b "evict dead exports"
test_27() {
run_test 26b "evict dead exports"
test_27() {
+ mkdir_on_mdt0 $DIR/$tdir
writemany -q -a $DIR/$tdir/$tfile 0 5 &
CLIENT_PID=$!
sleep 1
writemany -q -a $DIR/$tdir/$tfile 0 5 &
CLIENT_PID=$!
sleep 1
#define OBD_FAIL_MDS_SYNC_CAPA_SL 0x1310
do_facet ost1 lctl set_param fail_loc=0x00001310
#define OBD_FAIL_MDS_SYNC_CAPA_SL 0x1310
do_facet ost1 lctl set_param fail_loc=0x00001310
+ mkdir_on_mdt0 $DIR/$tdir
# put a load of file creates/writes/deletes
writemany -q $DIR/$tdir/$tfile 0 5 &
CLIENT_PID=$!
# put a load of file creates/writes/deletes
writemany -q $DIR/$tdir/$tfile 0 5 &
CLIENT_PID=$!
do_facet $SINGLEMDS "lctl get_param -n $cflags" |grep -q skip_orphan
[ $? -ne 0 ] && skip "don't have skip orphan feature" && return
do_facet $SINGLEMDS "lctl get_param -n $cflags" |grep -q skip_orphan
[ $? -ne 0 ] && skip "don't have skip orphan feature" && return
- mkdir -p $DIR/$tdir || error "mkdir dir $DIR/$tdir failed"
+ mkdir_on_mdt0 $DIR/$tdir || error "mkdir dir $DIR/$tdir failed"
# Set the default stripe of $DIR/$tdir to put the files to ost1
$LFS setstripe -c 1 -i 0 $DIR/$tdir
# Set the default stripe of $DIR/$tdir to put the files to ost1
$LFS setstripe -c 1 -i 0 $DIR/$tdir
local CLIENT_PID
local close_pid
local CLIENT_PID
local close_pid
+ mkdir_on_mdt0 $DIR/$tdir
# OBD_FAIL_MDS_REINT_NET_REP 0x119
do_facet $SINGLEMDS lctl set_param fail_loc=0x119
multiop $DIR/$tdir D_c &
# OBD_FAIL_MDS_REINT_NET_REP 0x119
do_facet $SINGLEMDS lctl set_param fail_loc=0x119
multiop $DIR/$tdir D_c &
+ mkdir_on_mdt0 $DIR/$tdir
drop_request "$LFS mkdir -i $mdtidx -c2 $remote_dir" ||
error "lfs mkdir failed"
local diridx=$($LFS getstripe -m $remote_dir)
drop_request "$LFS mkdir -i $mdtidx -c2 $remote_dir" ||
error "lfs mkdir failed"
local diridx=$($LFS getstripe -m $remote_dir)
local remote_dir=$DIR/$tdir/remote_dir
local mdtidx=1
local remote_dir=$DIR/$tdir/remote_dir
local mdtidx=1
+ mkdir_on_mdt0 $DIR/$tdir
drop_reint_reply "$LFS mkdir -i $mdtidx -c2 $remote_dir" ||
error "lfs mkdir failed"
drop_reint_reply "$LFS mkdir -i $mdtidx -c2 $remote_dir" ||
error "lfs mkdir failed"
local remote_dir=$DIR/$tdir/remote_dir
local mdtidx=1
local remote_dir=$DIR/$tdir/remote_dir
local mdtidx=1
+ mkdir_on_mdt0 $DIR/$tdir
drop_update_reply $mdtidx "$LFS mkdir -i $mdtidx -c2 $remote_dir" ||
error "lfs mkdir failed"
drop_update_reply $mdtidx "$LFS mkdir -i $mdtidx -c2 $remote_dir" ||
error "lfs mkdir failed"
local remote_dir=$DIR/$tdir/remote_dir
local MDTIDX=1
local remote_dir=$DIR/$tdir/remote_dir
local MDTIDX=1
+ mkdir_on_mdt0 $DIR/$tdir
$LFS mkdir -i $MDTIDX -c2 $remote_dir || error "lfs mkdir failed"
drop_request "rm -rf $remote_dir" || error "rm remote dir failed"
$LFS mkdir -i $MDTIDX -c2 $remote_dir || error "lfs mkdir failed"
drop_request "rm -rf $remote_dir" || error "rm remote dir failed"
local remote_dir=$DIR/$tdir/remote_dir
local MDTIDX=1
local remote_dir=$DIR/$tdir/remote_dir
local MDTIDX=1
+ mkdir_on_mdt0 $DIR/$tdir
$LFS mkdir -i $MDTIDX -c2 $remote_dir || error "lfs mkdir failed"
drop_reint_reply "rm -rf $remote_dir" || error "rm remote dir failed"
$LFS mkdir -i $MDTIDX -c2 $remote_dir || error "lfs mkdir failed"
drop_reint_reply "rm -rf $remote_dir" || error "rm remote dir failed"
local remote_dir=$DIR/$tdir/remote_dir
local MDTIDX=1
local remote_dir=$DIR/$tdir/remote_dir
local MDTIDX=1
+ mkdir_on_mdt0 $DIR/$tdir
$LFS mkdir -i $MDTIDX -c2 $remote_dir || error "lfs mkdir failed"
drop_update_reply $MDTIDX "rm -rf $remote_dir" ||
error "rm remote dir failed"
$LFS mkdir -i $MDTIDX -c2 $remote_dir || error "lfs mkdir failed"
drop_update_reply $MDTIDX "rm -rf $remote_dir" ||
error "rm remote dir failed"
[ $MDSCOUNT -lt 2 ] && skip "needs >= 2 MDTs"
[ $MDSCOUNT -lt 2 ] && skip "needs >= 2 MDTs"
+ mkdir_on_mdt0 $DIR/$tdir
touch $DIR/$tdir/$tfile
# OBD_FAIL_MDS_REINT_NET_REP 0x119
touch $DIR/$tdir/$tfile
# OBD_FAIL_MDS_REINT_NET_REP 0x119
local local_dir=$DIR/$tdir/local_dir
local MDTIDX=1
local local_dir=$DIR/$tdir/local_dir
local MDTIDX=1
+ mkdir_on_mdt0 $DIR/$tdir
mkdir $DIR/$tdir/local_dir
$LFS mkdir -i $MDTIDX $remote_dir
mkdir $DIR/$tdir/local_dir
$LFS mkdir -i $MDTIDX $remote_dir
- mkdir -p $DIR/d1
- mkdir -p $DIR/d2
- dd if=/dev/zero of=$DIR/d1/$tfile bs=4096 count=1
- dd if=/dev/zero of=$DIR/d2/$tfile bs=4096 count=1
+ mkdir_on_mdt0 $DIR/$tdir
+ mkdir $DIR/$tdir/d1
+ mkdir $DIR/$tdir/d2
+ dd if=/dev/zero of=$DIR/$tdir/d1/$tfile bs=4096 count=1
+ dd if=/dev/zero of=$DIR/$tdir/d2/$tfile bs=4096 count=1
cancel_lru_locks osc
#define OBD_FAIL_PTLRPC_RESEND_RACE 0x525
do_facet $SINGLEMDS "lctl set_param fail_loc=0x80000525"
# RPC1: any reply is to be delayed to disable last_xid logic
cancel_lru_locks osc
#define OBD_FAIL_PTLRPC_RESEND_RACE 0x525
do_facet $SINGLEMDS "lctl set_param fail_loc=0x80000525"
# RPC1: any reply is to be delayed to disable last_xid logic
- ln $DIR/d1/$tfile $DIR/d1/f2 &
+ ln $DIR/$tdir/d1/$tfile $DIR/$tdir/d1/f2 &
sleep 1
# RPC2: setattr1 reply is delayed & resent
# original reply comes to client; the resend get asleep
sleep 1
# RPC2: setattr1 reply is delayed & resent
# original reply comes to client; the resend get asleep
- chmod 666 $DIR/d2/$tfile
+ chmod 666 $DIR/$tdir/d2/$tfile
# RPC3: setattr2 on the same file; run ahead of RPC2 resend
# RPC3: setattr2 on the same file; run ahead of RPC2 resend
- chmod 777 $DIR/d2/$tfile
+ chmod 777 $DIR/$tdir/d2/$tfile
# RPC2 resend wakes up
sleep 5
# RPC2 resend wakes up
sleep 5
- [ $(stat -c "%a" $DIR/d2/$tfile) == 777 ] || error "resend got applied"
+ [ $(stat -c "%a" $DIR/$tdir/d2/$tfile) == 777 ] ||
+ error "resend got applied"
}
run_test 137 "late resend must be skipped if already applied"
}
run_test 137 "late resend must be skipped if already applied"
fi
test_0a() { # was test_0
fi
test_0a() { # was test_0
- mkdir $DIR/$tdir || error "mkdir $DIR/$tdir failed"
+ mkdir_on_mdt0 $DIR/$tdir || error "mkdir $DIR/$tdir failed"
replay_barrier $SINGLEMDS
fail $SINGLEMDS
rmdir $DIR/$tdir
replay_barrier $SINGLEMDS
fail $SINGLEMDS
rmdir $DIR/$tdir
run_test 5 "|x| 220 open(O_CREAT)"
test_6a() { # was test_6
run_test 5 "|x| 220 open(O_CREAT)"
test_6a() { # was test_6
- mkdir $DIR/$tdir || error "mkdir $DIR/$tdir failed"
+ mkdir_on_mdt0 $DIR/$tdir || error "mkdir $DIR/$tdir failed"
replay_barrier $SINGLEMDS
mcreate $DIR/$tdir/$tfile
fail $SINGLEMDS
replay_barrier $SINGLEMDS
mcreate $DIR/$tdir/$tfile
fail $SINGLEMDS
run_test 6a "mkdir + contained create"
test_6b() {
run_test 6a "mkdir + contained create"
test_6b() {
- mkdir $DIR/$tdir || error "mkdir $DIR/$tdir failed"
+ mkdir_on_mdt0 $DIR/$tdir || error "mkdir $DIR/$tdir failed"
replay_barrier $SINGLEMDS
rm -rf $DIR/$tdir
fail $SINGLEMDS
replay_barrier $SINGLEMDS
rm -rf $DIR/$tdir
fail $SINGLEMDS
run_test 6b "|X| rmdir"
test_7() {
run_test 6b "|X| rmdir"
test_7() {
- mkdir $DIR/$tdir || error "mkdir $DIR/$tdir failed"
+ mkdir_on_mdt0 $DIR/$tdir || error "mkdir $DIR/$tdir failed"
replay_barrier $SINGLEMDS
mcreate $DIR/$tdir/$tfile
fail $SINGLEMDS
replay_barrier $SINGLEMDS
mcreate $DIR/$tdir/$tfile
fail $SINGLEMDS
# b=2368
# directory orphans can't be unlinked from PENDING directory
test_37() {
# b=2368
# directory orphans can't be unlinked from PENDING directory
test_37() {
- rmdir $DIR/$tfile 2>/dev/null
- multiop_bg_pause $DIR/$tfile dD_c ||
- error "multiop_bg_pause $DIR/$tfile failed"
+ mkdir_on_mdt0 $DIR/$tdir || error "mkdir $tdir failed"
+ rmdir $DIR/$tdir/$tfile 2>/dev/null
+ multiop_bg_pause $DIR/$tdir/$tfile dD_c ||
+ error "multiop_bg_pause $tfile failed"
+ rmdir $DIR/$tdir/$tfile
replay_barrier $SINGLEMDS
# clear the dmesg buffer so we only see errors from this recovery
replay_barrier $SINGLEMDS
# clear the dmesg buffer so we only see errors from this recovery
#recovery many mds-ost setattr from llog
test_58a() {
#recovery many mds-ost setattr from llog
test_58a() {
- mkdir $DIR/$tdir || error "mkdir $DIR/$tdir failed"
+ mkdir_on_mdt0 $DIR/$tdir || error "mkdir $DIR/$tdir failed"
#define OBD_FAIL_MDS_OST_SETATTR 0x12c
do_facet $SINGLEMDS "lctl set_param fail_loc=0x8000012c"
createmany -o $DIR/$tdir/$tfile-%d 2500
#define OBD_FAIL_MDS_OST_SETATTR 0x12c
do_facet $SINGLEMDS "lctl set_param fail_loc=0x8000012c"
createmany -o $DIR/$tdir/$tfile-%d 2500
local sm_msg=$(printf "%.9s" $orig)
mount_client $MOUNT2 || error "mount_client on $MOUNT2 failed"
local sm_msg=$(printf "%.9s" $orig)
mount_client $MOUNT2 || error "mount_client on $MOUNT2 failed"
- mkdir $DIR/$tdir || error "mkdir $DIR/$tdir failed"
+ mkdir_on_mdt0 $DIR/$tdir || error "mkdir $DIR/$tdir failed"
touch $DIR/$tdir/$tfile || error "touch $DIR/$tdir/$tfile failed"
replay_barrier $SINGLEMDS
setfattr -n trusted.foo -v $orig $DIR/$tdir/$tfile
touch $DIR/$tdir/$tfile || error "touch $DIR/$tdir/$tfile failed"
replay_barrier $SINGLEMDS
setfattr -n trusted.foo -v $orig $DIR/$tdir/$tfile
local sm_msg1=$(printf "%.9s" $orig1)
mount_client $MOUNT2 || error "mount_client on $MOUNT2 failed"
local sm_msg1=$(printf "%.9s" $orig1)
mount_client $MOUNT2 || error "mount_client on $MOUNT2 failed"
- mkdir $DIR/$tdir || error "mkdir $DIR/$tdir failed"
+ mkdir_on_mdt0 $DIR/$tdir || error "mkdir $DIR/$tdir failed"
touch $DIR/$tdir/$tfile || error "touch $DIR/$tdir/$tfile failed"
drop_request "setfattr -n trusted.foo -v $orig $DIR/$tdir/$tfile" ||
error "drop_request for setfattr failed"
touch $DIR/$tdir/$tfile || error "touch $DIR/$tdir/$tfile failed"
drop_request "setfattr -n trusted.foo -v $orig $DIR/$tdir/$tfile" ||
error "drop_request for setfattr failed"
test_59() {
remote_ost_nodsh && skip "remote OST with nodsh" && return 0
test_59() {
remote_ost_nodsh && skip "remote OST with nodsh" && return 0
- mkdir $DIR/$tdir || error "mkdir $DIR/$tdir failed"
+ mkdir_on_mdt0 $DIR/$tdir || error "mkdir $DIR/$tdir failed"
createmany -o $DIR/$tdir/$tfile-%d 200 ||
error "createmany create files failed"
sync
createmany -o $DIR/$tdir/$tfile-%d 200 ||
error "createmany create files failed"
sync
# race between add unlink llog vs cat log init in post_recovery (only for b1_6)
# bug 12086: should no oops and No ctxt error for this test
test_60() {
# race between add unlink llog vs cat log init in post_recovery (only for b1_6)
# bug 12086: should no oops and No ctxt error for this test
test_60() {
- mkdir $DIR/$tdir || error "mkdir $DIR/$tdir failed"
+ mkdir_on_mdt0 $DIR/$tdir || error "mkdir $DIR/$tdir failed"
createmany -o $DIR/$tdir/$tfile-%d 200 ||
error "createmany create files failed"
replay_barrier $SINGLEMDS
createmany -o $DIR/$tdir/$tfile-%d 200 ||
error "createmany create files failed"
replay_barrier $SINGLEMDS
run_test 61d "error in llog_setup should cleanup the llog context correctly"
test_62() { # Bug 15756 - don't mis-drop resent replay
run_test 61d "error in llog_setup should cleanup the llog context correctly"
test_62() { # Bug 15756 - don't mis-drop resent replay
- mkdir $DIR/$tdir || error "mkdir $DIR/$tdir failed"
+ mkdir_on_mdt0 $DIR/$tdir || error "mkdir $DIR/$tdir failed"
replay_barrier $SINGLEMDS
createmany -o $DIR/$tdir/$tfile- 25 ||
error "createmany create files failed"
replay_barrier $SINGLEMDS
createmany -o $DIR/$tdir/$tfile- 25 ||
error "createmany create files failed"
local MDTIDX=1
local remote_dir=$DIR/$tdir/remote_dir
local MDTIDX=1
local remote_dir=$DIR/$tdir/remote_dir
- mkdir -p $DIR/$tdir || error "mkdir $DIR/$tdir failed"
+ mkdir_on_mdt0 $DIR/$tdir || error "mkdir $DIR/$tdir failed"
#define OBD_FAIL_OUT_UPDATE_NET_REP 0x1701
do_facet mds${MDTIDX} lctl set_param fail_loc=0x1701
$LFS mkdir -i $MDTIDX $remote_dir &
#define OBD_FAIL_OUT_UPDATE_NET_REP 0x1701
do_facet mds${MDTIDX} lctl set_param fail_loc=0x1701
$LFS mkdir -i $MDTIDX $remote_dir &
local MDTIDX=1
local remote_dir=$DIR/$tdir/remote_dir
local MDTIDX=1
local remote_dir=$DIR/$tdir/remote_dir
- mkdir $DIR/$tdir || error "mkdir $DIR/$tdir failed"
+ mkdir_on_mdt0 $DIR/$tdir || error "mkdir $DIR/$tdir failed"
#define OBD_FAIL_OUT_UPDATE_NET_REP 0x1701
do_facet mds${MDTIDX} lctl set_param fail_loc=0x1701
$LFS mkdir -i $MDTIDX $remote_dir &
#define OBD_FAIL_OUT_UPDATE_NET_REP 0x1701
do_facet mds${MDTIDX} lctl set_param fail_loc=0x1701
$LFS mkdir -i $MDTIDX $remote_dir &
local MDTIDX=1
local remote_dir=$DIR/$tdir/remote_dir
local MDTIDX=1
local remote_dir=$DIR/$tdir/remote_dir
- mkdir $DIR/$tdir || error "mkdir $DIR/$tdir failed"
+ mkdir_on_mdt0 $DIR/$tdir || error "mkdir $DIR/$tdir failed"
#define OBD_FAIL_OUT_UPDATE_NET_REP 0x1701
do_facet mds${MDTIDX} lctl set_param fail_loc=0x1701
$LFS mkdir -i $MDTIDX $remote_dir &
#define OBD_FAIL_OUT_UPDATE_NET_REP 0x1701
do_facet mds${MDTIDX} lctl set_param fail_loc=0x1701
$LFS mkdir -i $MDTIDX $remote_dir &
local MDTIDX=1
local remote_dir=$DIR/$tdir/remote_dir
local MDTIDX=1
local remote_dir=$DIR/$tdir/remote_dir
- mkdir $DIR/$tdir || error "mkdir $DIR/$tdir failed"
+ mkdir_on_mdt0 $DIR/$tdir || error "mkdir $DIR/$tdir failed"
#define OBD_FAIL_OUT_UPDATE_NET_REP 0x1701
do_facet mds${MDTIDX} lctl set_param fail_loc=0x1701
$LFS mkdir -i $MDTIDX $remote_dir &
#define OBD_FAIL_OUT_UPDATE_NET_REP 0x1701
do_facet mds${MDTIDX} lctl set_param fail_loc=0x1701
$LFS mkdir -i $MDTIDX $remote_dir &
local MDTIDX=1
local remote_dir=$DIR/$tdir/remote_dir
local MDTIDX=1
local remote_dir=$DIR/$tdir/remote_dir
- mkdir $DIR/$tdir || error "mkdir $DIR/$tdir failed"
+ mkdir_on_mdt0 $DIR/$tdir || error "mkdir $DIR/$tdir failed"
# OBD_FAIL_MDS_REINT_NET_REP 0x119
do_facet mds$((MDTIDX + 1)) lctl set_param fail_loc=0x119
$LFS mkdir -i $MDTIDX $remote_dir &
# OBD_FAIL_MDS_REINT_NET_REP 0x119
do_facet mds$((MDTIDX + 1)) lctl set_param fail_loc=0x119
$LFS mkdir -i $MDTIDX $remote_dir &
local MDTIDX=1
local remote_dir=$DIR/$tdir/remote_dir
local MDTIDX=1
local remote_dir=$DIR/$tdir/remote_dir
- mkdir $DIR/$tdir || error "mkdir $DIR/$tdir failed"
+ mkdir_on_mdt0 $DIR/$tdir || error "mkdir $DIR/$tdir failed"
# OBD_FAIL_MDS_REINT_NET_REP 0x119
do_facet mds$((MDTIDX + 1)) lctl set_param fail_loc=0x119
$LFS mkdir -i $MDTIDX $remote_dir &
# OBD_FAIL_MDS_REINT_NET_REP 0x119
do_facet mds$((MDTIDX + 1)) lctl set_param fail_loc=0x119
$LFS mkdir -i $MDTIDX $remote_dir &
local MDTIDX=1
local remote_dir=$DIR/$tdir/remote_dir
local MDTIDX=1
local remote_dir=$DIR/$tdir/remote_dir
- mkdir $DIR/$tdir || error "mkdir $DIR/$tdir failed"
+ mkdir_on_mdt0 $DIR/$tdir || error "mkdir $DIR/$tdir failed"
# OBD_FAIL_MDS_REINT_NET_REP 0x119
do_facet mds$((MDTIDX + 1)) lctl set_param fail_loc=0x119
$LFS mkdir -i $MDTIDX $remote_dir &
# OBD_FAIL_MDS_REINT_NET_REP 0x119
do_facet mds$((MDTIDX + 1)) lctl set_param fail_loc=0x119
$LFS mkdir -i $MDTIDX $remote_dir &
local MDTIDX=1
local remote_dir=$DIR/$tdir/remote_dir
local MDTIDX=1
local remote_dir=$DIR/$tdir/remote_dir
- mkdir $DIR/$tdir || error "mkdir $DIR/$tdir failed"
+ mkdir_on_mdt0 $DIR/$tdir || error "mkdir $DIR/$tdir failed"
# OBD_FAIL_MDS_REINT_NET_REP 0x119
do_facet mds$((MDTIDX + 1)) lctl set_param fail_loc=0x119
$LFS mkdir -i $MDTIDX $remote_dir &
# OBD_FAIL_MDS_REINT_NET_REP 0x119
do_facet mds$((MDTIDX + 1)) lctl set_param fail_loc=0x119
$LFS mkdir -i $MDTIDX $remote_dir &
local MDTIDX=1
local remote_dir=$DIR/$tdir/remote_dir
local MDTIDX=1
local remote_dir=$DIR/$tdir/remote_dir
- mkdir $DIR/$tdir || error "mkdir $DIR/$tdir failed"
+ mkdir_on_mdt0 $DIR/$tdir || error "mkdir $DIR/$tdir failed"
$LFS mkdir -i $MDTIDX $remote_dir || error "lfs mkdir failed"
touch $remote_dir || error "touch $remote_dir failed"
$LFS mkdir -i $MDTIDX $remote_dir || error "lfs mkdir failed"
touch $remote_dir || error "touch $remote_dir failed"
local MDTIDX=1
local remote_dir=$DIR/$tdir/remote_dir
local MDTIDX=1
local remote_dir=$DIR/$tdir/remote_dir
- mkdir $DIR/$tdir || error "mkdir $DIR/$tdir failed"
+ mkdir_on_mdt0 $DIR/$tdir || error "mkdir $DIR/$tdir failed"
$LFS mkdir -i $MDTIDX $remote_dir || error "lfs mkdir failed"
# OBD_FAIL_OUT_UPDATE_NET_REP 0x1701
$LFS mkdir -i $MDTIDX $remote_dir || error "lfs mkdir failed"
# OBD_FAIL_OUT_UPDATE_NET_REP 0x1701
local MDTIDX=1
local remote_dir=$DIR/$tdir/remote_dir
local MDTIDX=1
local remote_dir=$DIR/$tdir/remote_dir
- mkdir $DIR/$tdir || error "mkdir $DIR/$tdir failed"
+ mkdir_on_mdt0 $DIR/$tdir || error "mkdir $DIR/$tdir failed"
$LFS mkdir -i $MDTIDX $remote_dir || error "lfs mkdir failed"
# OBD_FAIL_OUT_UPDATE_NET_REP 0x1701
$LFS mkdir -i $MDTIDX $remote_dir || error "lfs mkdir failed"
# OBD_FAIL_OUT_UPDATE_NET_REP 0x1701
local MDTIDX=1
local remote_dir=$DIR/$tdir/remote_dir
local MDTIDX=1
local remote_dir=$DIR/$tdir/remote_dir
- mkdir $DIR/$tdir || error "mkdir $DIR/$tdir failed"
+ mkdir_on_mdt0 $DIR/$tdir || error "mkdir $DIR/$tdir failed"
$LFS mkdir -i $MDTIDX $remote_dir || error "lfs mkdir failed"
# OBD_FAIL_OUT_UPDATE_NET_REP 0x1701
$LFS mkdir -i $MDTIDX $remote_dir || error "lfs mkdir failed"
# OBD_FAIL_OUT_UPDATE_NET_REP 0x1701
local MDTIDX=1
local remote_dir=$DIR/$tdir/remote_dir
local MDTIDX=1
local remote_dir=$DIR/$tdir/remote_dir
- mkdir $DIR/$tdir || error "mkdir $DIR/$tdir failed"
+ mkdir_on_mdt0 $DIR/$tdir || error "mkdir $DIR/$tdir failed"
$LFS mkdir -i $MDTIDX $remote_dir || error "lfs mkdir failed"
# OBD_FAIL_MDS_REINT_NET_REP 0x119
$LFS mkdir -i $MDTIDX $remote_dir || error "lfs mkdir failed"
# OBD_FAIL_MDS_REINT_NET_REP 0x119
local MDTIDX=1
local remote_dir=$DIR/$tdir/remote_dir
local MDTIDX=1
local remote_dir=$DIR/$tdir/remote_dir
- mkdir $DIR/$tdir || error "mkdir $DIR/$tdir failed"
+ mkdir_on_mdt0 $DIR/$tdir || error "mkdir $DIR/$tdir failed"
$LFS mkdir -i $MDTIDX $remote_dir || error "lfs mkdir failed"
# OBD_FAIL_MDS_REINT_NET_REP 0x119
$LFS mkdir -i $MDTIDX $remote_dir || error "lfs mkdir failed"
# OBD_FAIL_MDS_REINT_NET_REP 0x119
local MDTIDX=1
local remote_dir=$DIR/$tdir/remote_dir
local MDTIDX=1
local remote_dir=$DIR/$tdir/remote_dir
- mkdir $DIR/$tdir || error "mkdir $DIR/$tdir failed"
+ mkdir_on_mdt0 $DIR/$tdir || error "mkdir $DIR/$tdir failed"
$LFS mkdir -i $MDTIDX $remote_dir || error "lfs mkdir failed"
# OBD_FAIL_MDS_REINT_NET_REP 0x119
$LFS mkdir -i $MDTIDX $remote_dir || error "lfs mkdir failed"
# OBD_FAIL_MDS_REINT_NET_REP 0x119
local MDTIDX=1
local remote_dir=$DIR/$tdir/remote_dir
local MDTIDX=1
local remote_dir=$DIR/$tdir/remote_dir
- mkdir $DIR/$tdir || error "mkdir $DIR/$tdir failed"
+ mkdir_on_mdt0 $DIR/$tdir || error "mkdir $DIR/$tdir failed"
$LFS mkdir -i $MDTIDX $remote_dir || error "lfs mkdir failed"
# OBD_FAIL_MDS_REINT_NET_REP 0x119
$LFS mkdir -i $MDTIDX $remote_dir || error "lfs mkdir failed"
# OBD_FAIL_MDS_REINT_NET_REP 0x119
run_test 87b "write replay with changed data (checksum resend)"
test_88() { #bug 17485
run_test 87b "write replay with changed data (checksum resend)"
test_88() { #bug 17485
- mkdir $DIR/$tdir || error "mkdir $DIR/$tdir failed"
+ mkdir_on_mdt0 $DIR/$tdir || error "mkdir $DIR/$tdir failed"
mkdir -p $TMP/$tdir || error "mkdir $TMP/$tdir failed"
$LFS setstripe -i 0 -c 1 $DIR/$tdir || error "$LFS setstripe failed"
mkdir -p $TMP/$tdir || error "mkdir $TMP/$tdir failed"
$LFS setstripe -i 0 -c 1 $DIR/$tdir || error "$LFS setstripe failed"
test_89() {
cancel_lru_locks osc
test_89() {
cancel_lru_locks osc
- mkdir $DIR/$tdir || error "mkdir $DIR/$tdir failed"
+ mkdir_on_mdt0 $DIR/$tdir || error "mkdir $DIR/$tdir failed"
rm -f $DIR/$tdir/$tfile
wait_mds_ost_sync || error "initial MDS-OST sync timed out"
wait_delete_completed || error "initial wait delete timed out"
rm -f $DIR/$tdir/$tfile
wait_mds_ost_sync || error "initial MDS-OST sync timed out"
wait_delete_completed || error "initial wait delete timed out"
local striped_dir=$DIR/$tdir/striped_dir
local MDTIDX=1
local striped_dir=$DIR/$tdir/striped_dir
local MDTIDX=1
- mkdir $DIR/$tdir || error "mkdir $DIR/$tdir failed"
+ mkdir_on_mdt0 $DIR/$tdir || error "mkdir $DIR/$tdir failed"
#To make sure MDT1 and MDT0 are connected
#otherwise it may create single stripe dir here
#To make sure MDT1 and MDT0 are connected
#otherwise it may create single stripe dir here
local striped_dir=$DIR/$tdir/striped_dir
local MDTIDX=1
local striped_dir=$DIR/$tdir/striped_dir
local MDTIDX=1
- mkdir $DIR/$tdir || error "mkdir $DIR/$tdir failed"
+ mkdir_on_mdt0 $DIR/$tdir || error "mkdir $DIR/$tdir failed"
#To make sure MDT1 and MDT0 are connected
#otherwise it may create single stripe dir here
#To make sure MDT1 and MDT0 are connected
#otherwise it may create single stripe dir here
local striped_dir=$DIR/$tdir/striped_dir
local striped_dir=$DIR/$tdir/striped_dir
- mkdir $DIR/$tdir || error "mkdir $DIR/$tdir failed"
+ mkdir_on_mdt0 $DIR/$tdir || error "mkdir $DIR/$tdir failed"
#To make sure MDT1 and MDT0 are connected
#otherwise it may create single stripe dir here
#To make sure MDT1 and MDT0 are connected
#otherwise it may create single stripe dir here
local clients=${CLIENTS:-$HOSTNAME}
local time_min=$(recovery_time_min)
local clients=${CLIENTS:-$HOSTNAME}
local time_min=$(recovery_time_min)
+ mkdir_on_mdt0 $DIR/$tdir
mkdir $DIR/$tdir/tmp
rmdir $DIR/$tdir/tmp
mkdir $DIR/$tdir/tmp
rmdir $DIR/$tdir/tmp
[ "$MDS1_VERSION" -lt $(version_code 2.10.90) ] &&
skip "Do not support Data-on-MDT before 2.11"
[ "$MDS1_VERSION" -lt $(version_code 2.10.90) ] &&
skip "Do not support Data-on-MDT before 2.11"
+ mkdir_on_mdt0 $DIR/$tdir
$LFS setstripe -E 1M -L mdt -E EOF -c 2 $DIR/$tdir
replay_barrier $SINGLEMDS
touch $DIR/$tdir/$tfile
$LFS setstripe -E 1M -L mdt -E EOF -c 2 $DIR/$tdir
replay_barrier $SINGLEMDS
touch $DIR/$tdir/$tfile