}
run_test 39d "sync write should update mtime"
+pdo_sched() {
+ # how long 40-47 take with specific delay
+ # sleep 0.1 # 78s
+ sleep 0.2 # 103s
+ # sleep 0.3 # 124s
+ # sleep 0.5 # 164s
+}
+
# check that pid exists hence second operation wasn't blocked by first one
# if it is so then there is no conflict, return 0
# else second operation is conflicting with first one, return 1
check_pdo_conflict() {
local pid=$1
local conflict=0
- sleep 1 # to ensure OP1 is finished on client if OP2 is blocked by OP1
+ pdo_sched # to ensure OP1 is finished on client if OP2 is blocked by OP1
if [[ `ps --pid $pid | wc -l` == 1 ]]; then
conflict=1
echo "Conflict"
do_facet $SINGLEMDS lctl set_param fail_loc=0x80000145
touch $DIR2
mkdir $DIR1/$tfile &
- PID1=$!
- sleep 1
+ PID1=$!; pdo_sched
touch $DIR2/$tfile-2
check_pdo_conflict $PID1 || error "create is blocked"
mkdir $DIR2/$tfile-3
# all operations above shouldn't wait the first one
check_pdo_conflict $PID1 || error "parallel operation is blocked"
+ do_facet $SINGLEMDS lctl set_param fail_loc=0
wait $PID1
rm -rf $DIR/$tfile*
return 0
#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_facet $SINGLEMDS lctl set_param fail_loc=0x80000145
touch $DIR1/$tfile &
- PID1=$!
- sleep 1
+ PID1=$!; pdo_sched
# open|create
touch $DIR2/$tfile-2
check_pdo_conflict $PID1 || error "create is blocked"
# all operations above shouldn't wait the first one
check_pdo_conflict $PID1 || error "parallel operation is blocked"
+ do_facet $SINGLEMDS lctl set_param fail_loc=0
wait $PID1
rm -rf $DIR/$tfile*
return 0
#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_facet $SINGLEMDS lctl set_param fail_loc=0x80000145
link $DIR1/$tfile $DIR1/$tfile-0 &
- PID1=$!
- sleep 1
+ PID1=$!; pdo_sched
# open|create
touch $DIR2/$tfile-2
check_pdo_conflict $PID1 || error "create is blocked"
# all operations above shouldn't wait the first one
check_pdo_conflict $PID1 || error "parallel operation is blocked"
+ do_facet $SINGLEMDS lctl set_param fail_loc=0
wait $PID1
rm -rf $DIR/$tfile*
return 0
#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_facet $SINGLEMDS lctl set_param fail_loc=0x80000145
rm $DIR1/$tfile &
- PID1=$!
- sleep 1
+ PID1=$!; pdo_sched
# open|create
touch $DIR2/$tfile-2
check_pdo_conflict $PID1 || error "create is blocked"
# all operations above shouldn't wait the first one
check_pdo_conflict $PID1 || error "parallel operation is blocked"
+ do_facet $SINGLEMDS lctl set_param fail_loc=0
wait $PID1
return 0
}
#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_facet $SINGLEMDS lctl set_param fail_loc=0x80000145
mv $DIR1/$tfile $DIR1/$tfile-0 &
- PID1=$!
- sleep 1
+ PID1=$!; pdo_sched
# open|create
touch $DIR2/$tfile-2
check_pdo_conflict $PID1 || error "create is blocked"
# all operations above shouldn't wait the first one
check_pdo_conflict $PID1 || error "parallel operation is blocked"
+ do_facet $SINGLEMDS lctl set_param fail_loc=0
wait $PID1
rm -rf $DIR/$tfile*
return 0
#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_facet $SINGLEMDS lctl set_param fail_loc=0x80000145
$MULTIOP $DIR1/$tfile oO_CREAT:O_RDWR:c &
- PID1=$!
- sleep 1
- mkdir $DIR2/$tfile && error "mkdir must fail"
+ PID1=$! ; pdo_sched
+ mkdir $DIR2/$tfile &
+ PID2=$! ; pdo_sched
+ do_facet $SINGLEMDS lctl set_param fail_loc=0
check_pdo_conflict $PID1 && { wait $PID1; echo "mkdir isn't blocked"; }
+ wait $PID2 ; [ $? -ne 0 ] || error "mkdir must fail"
rm -rf $DIR/$tfile*
return 0
}
#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_facet $SINGLEMDS lctl set_param fail_loc=0x80000145
$MULTIOP $DIR1/$tfile oO_CREAT:O_RDWR:c &
- PID1=$!
- sleep 1
- $MULTIOP $DIR2/$tfile oO_CREAT:O_EXCL:c && error "create must fail"
+ PID1=$! ; pdo_sched
+ $MULTIOP $DIR2/$tfile oO_CREAT:O_EXCL:c &
+ PID2=$! ; pdo_sched
+ do_facet $SINGLEMDS lctl set_param fail_loc=0
check_pdo_conflict $PID1 && { wait $PID1; error "create isn't blocked"; }
+ wait $PID2 ; [ $? -ne 0 ] || error "create must fail"
rm -rf $DIR/$tfile*
return 0
}
#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_facet $SINGLEMDS lctl set_param fail_loc=0x80000145
$MULTIOP $DIR1/$tfile oO_CREAT:O_RDWR:c &
- PID1=$!
- sleep 1
- link $DIR2/$tfile-2 $DIR2/$tfile && error "link must fail"
+ PID1=$! ; pdo_sched
+ link $DIR2/$tfile-2 $DIR2/$tfile &
+ PID2=$! ; pdo_sched
+ do_facet $SINGLEMDS lctl set_param fail_loc=0
check_pdo_conflict $PID1 && { wait $PID1; error "link isn't blocked"; }
+ wait $PID2 ; [ $? -ne 0 ] || error "link must fail"
rm -rf $DIR/$tfile*
return 0
}
#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_facet $SINGLEMDS lctl set_param fail_loc=0x80000145
$MULTIOP $DIR1/$tfile oO_CREAT:O_RDWR:c &
- PID1=$!
- sleep 1
- rm $DIR2/$tfile || error "unlink must succeed"
+ PID1=$! ; pdo_sched
+ rm $DIR2/$tfile &
+ PID2=$! ; pdo_sched
+ do_facet $SINGLEMDS lctl set_param fail_loc=0
check_pdo_conflict $PID1 && { wait $PID1; error "unlink isn't blocked"; }
+ wait $PID2 ; [ $? -eq 0 ] || error "unlink must succeed"
rm -rf $DIR/$tfile*
return 0
}
#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_facet $SINGLEMDS lctl set_param fail_loc=0x80000145
$MULTIOP $DIR1/$tfile oO_CREAT:O_RDWR:c &
- PID1=$!
- sleep 1
- mv $DIR2/$tfile-2 $DIR2/$tfile || error "rename must succeed"
+ PID1=$! ; pdo_sched
+ mv $DIR2/$tfile-2 $DIR2/$tfile &
+ PID2=$! ; pdo_sched
+ do_facet $SINGLEMDS lctl set_param fail_loc=0
check_pdo_conflict $PID1 && { wait $PID1; error "rename isn't blocked"; }
+ wait $PID2 ; [ $? -eq 0 ] || error "rename must succeed"
rm -rf $DIR/$tfile*
return 0
}
#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_facet $SINGLEMDS lctl set_param fail_loc=0x80000145
$MULTIOP $DIR1/$tfile oO_CREAT:O_RDWR:c &
- PID1=$!
- sleep 1
- mv $DIR2/$tfile $DIR2/$tfile-2 || error "rename must succeed"
+ PID1=$! ; pdo_sched
+ mv $DIR2/$tfile $DIR2/$tfile-2 &
+ PID2=$! ; pdo_sched
+ do_facet $SINGLEMDS lctl set_param fail_loc=0
check_pdo_conflict $PID1 && { wait $PID1; error "rename isn't blocked"; }
+ wait $PID2 ; [ $? -eq 0 ] || error "rename must succeed"
rm -rf $DIR/$tfile*
return 0
}
#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_facet $SINGLEMDS lctl set_param fail_loc=0x80000145
$MULTIOP $DIR1/$tfile oO_CREAT:O_RDWR:c &
- PID1=$!
- sleep 1
- stat $DIR2/$tfile > /dev/null || error "stat must succeed"
+ PID1=$! ; pdo_sched
+ stat $DIR2/$tfile > /dev/null &
+ PID2=$! ; pdo_sched
+ do_facet $SINGLEMDS lctl set_param fail_loc=0
check_pdo_conflict $PID1 && { wait $PID1; error "getattr isn't blocked"; }
+ wait $PID2 ; [ $? -eq 0 ] || error "stat must succeed"
rm -rf $DIR/$tfile*
return 0
}
#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_facet $SINGLEMDS lctl set_param fail_loc=0x80000145
$MULTIOP $DIR1/$tfile oO_CREAT:O_RDWR:c &
- PID1=$!
- sleep 1
- ls -lia $DIR2/ > /dev/null
+ PID1=$! ; pdo_sched
+ ls -lia $DIR2/ > /dev/null &
+ PID2=$! ; pdo_sched
+ do_facet $SINGLEMDS lctl set_param fail_loc=0
check_pdo_conflict $PID1 && { wait $PID1; error "readdir isn't blocked"; }
+ wait $PID2
rm -rf $DIR/$tfile*
return 0
}
#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_facet $SINGLEMDS lctl set_param fail_loc=0x80000145
mkdir $DIR1/$tfile &
- PID1=$!
- sleep 1
- mkdir $DIR2/$tfile && error "mkdir must fail"
+ PID1=$! ; pdo_sched
+ mkdir $DIR2/$tfile &
+ PID2=$! ; pdo_sched
+ do_facet $SINGLEMDS lctl set_param fail_loc=0
check_pdo_conflict $PID1 && { wait $PID1; error "mkdir isn't blocked"; }
+ wait $PID2 ; [ $? -ne 0 ] || error "mkdir must fail"
rm -rf $DIR/$tfile*
return 0
}
#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_facet $SINGLEMDS lctl set_param fail_loc=0x80000145
mkdir $DIR1/$tfile &
- PID1=$!
- sleep 1
- $MULTIOP $DIR2/$tfile oO_CREAT:O_EXCL:c && error "create must fail"
+ PID1=$! ; pdo_sched
+ $MULTIOP $DIR2/$tfile oO_CREAT:O_EXCL:c &
+ PID2=$! ; pdo_sched
+ do_facet $SINGLEMDS lctl set_param fail_loc=0
check_pdo_conflict $PID1 && { wait $PID1; error "create isn't blocked"; }
+ wait $PID2 ; [ $? -ne 0 ] || error "create must fail"
rm -rf $DIR/$tfile*
return 0
}
#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_facet $SINGLEMDS lctl set_param fail_loc=0x80000145
mkdir $DIR1/$tfile &
- PID1=$!
- sleep 1
- link $DIR2/$tfile-2 $DIR2/$tfile && error "link must fail"
+ PID1=$! ; pdo_sched
+ link $DIR2/$tfile-2 $DIR2/$tfile &
+ PID2=$! ; pdo_sched
+ do_facet $SINGLEMDS lctl set_param fail_loc=0
check_pdo_conflict $PID1 && { wait $PID1; error "link isn't blocked"; }
+ wait $PID2 ; [ $? -ne 0 ] || error "link must fail"
rm -rf $DIR/$tfile*
return 0
}
#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_facet $SINGLEMDS lctl set_param fail_loc=0x80000145
mkdir $DIR1/$tfile &
- PID1=$!
- sleep 1
- rmdir $DIR2/$tfile || error "unlink must succeed"
+ PID1=$! ; pdo_sched
+ rmdir $DIR2/$tfile &
+ PID2=$! ; pdo_sched
+ do_facet $SINGLEMDS lctl set_param fail_loc=0
check_pdo_conflict $PID1 && { wait $PID1; error "unlink isn't blocked"; }
+ wait $PID2 ; [ $? -eq 0 ] || error "unlink must succeed"
rm -rf $DIR/$tfile*
return 0
}
#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_facet $SINGLEMDS lctl set_param fail_loc=0x80000145
mkdir $DIR1/$tfile &
- PID1=$!
- sleep 1
- mv -T $DIR2/$tfile-2 $DIR2/$tfile && error "rename must fail"
+ PID1=$! ; pdo_sched
+ mv -T $DIR2/$tfile-2 $DIR2/$tfile &
+ PID2=$! ; pdo_sched
+ do_facet $SINGLEMDS lctl set_param fail_loc=0
check_pdo_conflict $PID1 && { wait $PID1; error "rename isn't blocked"; }
+ wait $PID2 ; [ $? -ne 0 ] || error "rename must fail"
rm -rf $DIR/$tfile*
return 0
}
#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_facet $SINGLEMDS lctl set_param fail_loc=0x80000145
mkdir $DIR1/$tfile &
- PID1=$!
- sleep 1
- mv $DIR2/$tfile $DIR2/$tfile-2 || error "rename must succeed"
+ PID1=$! ; pdo_sched
+ mv $DIR2/$tfile $DIR2/$tfile-2 &
+ PID2=$! ; pdo_sched
+ do_facet $SINGLEMDS lctl set_param fail_loc=0
check_pdo_conflict $PID1 && { wait $PID1; error "rename isn't blocked"; }
+ wait $PID2 ; [ $? -eq 0 ] || error "rename must succeed"
rm -rf $DIR/$tfile*
return 0
}
#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_facet $SINGLEMDS lctl set_param fail_loc=0x80000145
mkdir $DIR1/$tfile &
- PID1=$!
- sleep 1
- stat $DIR2/$tfile > /dev/null || error "stat must succeed"
+ PID1=$! ; pdo_sched
+ stat $DIR2/$tfile > /dev/null &
+ PID2=$! ; pdo_sched
+ do_facet $SINGLEMDS lctl set_param fail_loc=0
check_pdo_conflict $PID1 && { wait $PID1; error "getattr isn't blocked"; }
+ wait $PID2 ; [ $? -eq 0 ] || error "stat must succeed"
rm -rf $DIR/$tfile*
return 0
}
#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_facet $SINGLEMDS lctl set_param fail_loc=0x80000145
mkdir $DIR1/$tfile &
- PID1=$!
- sleep 1
- ls -lia $DIR2/ > /dev/null
+ PID1=$! ; pdo_sched
+ ls -lia $DIR2/ > /dev/null &
+ PID2=$! ; pdo_sched
+ do_facet $SINGLEMDS lctl set_param fail_loc=0
check_pdo_conflict $PID1 && { wait $PID1; error "readdir isn't blocked"; }
+ wait $PID2
rm -rf $DIR/$tfile*
return 0
}
#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_facet $SINGLEMDS lctl set_param fail_loc=0x80000145
rm $DIR1/$tfile &
- PID1=$!
- sleep 1
- mkdir $DIR2/$tfile || error "mkdir must succeed"
+ PID1=$! ; pdo_sched
+ mkdir $DIR2/$tfile &
+ PID2=$! ; pdo_sched
+ do_facet $SINGLEMDS lctl set_param fail_loc=0
check_pdo_conflict $PID1 && { wait $PID1; error "mkdir isn't blocked"; }
+ wait $PID2 ; [ $? -eq 0 ] || error "mkdir must succeed"
rm -rf $DIR/$tfile*
return 0
}
#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_facet $SINGLEMDS lctl set_param fail_loc=0x80000145
rm $DIR1/$tfile &
- PID1=$!
- sleep 1
- $MULTIOP $DIR2/$tfile oO_CREAT:O_EXCL:c || error "create must succeed"
+ PID1=$! ; pdo_sched
+ $MULTIOP $DIR2/$tfile oO_CREAT:O_EXCL:c &
+ PID2=$! ; pdo_sched
+ do_facet $SINGLEMDS lctl set_param fail_loc=0
check_pdo_conflict $PID1 && { wait $PID1; error "create isn't blocked"; }
+ wait $PID2 ; [ $? -eq 0 ] || error "create must succeed"
rm -rf $DIR/$tfile*
return 0
}
#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_facet $SINGLEMDS lctl set_param fail_loc=0x80000145
rm $DIR1/$tfile &
- PID1=$!
- sleep 1
- link $DIR2/$tfile-2 $DIR2/$tfile || error "link must succeed"
+ PID1=$! ; pdo_sched
+ link $DIR2/$tfile-2 $DIR2/$tfile &
+ PID2=$! ; pdo_sched
+ do_facet $SINGLEMDS lctl set_param fail_loc=0
check_pdo_conflict $PID1 && { wait $PID1; error "link isn't blocked"; }
+ wait $PID2 ; [ $? -eq 0 ] || error "link must succeed"
rm -rf $DIR/$tfile*
return 0
}
#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_facet $SINGLEMDS lctl set_param fail_loc=0x80000145
rm $DIR1/$tfile &
- PID1=$!
- sleep 1
- rm $DIR2/$tfile && error "unlink must fail"
+ PID1=$! ; pdo_sched
+ rm $DIR2/$tfile &
+ PID2=$! ; pdo_sched
+ do_facet $SINGLEMDS lctl set_param fail_loc=0
check_pdo_conflict $PID1 && { wait $PID1; error "unlink isn't blocked"; }
+ wait $PID2 ; [ $? -ne 0 ] || error "unlink must fail"
rm -rf $DIR/$tfile*
return 0
}
#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_facet $SINGLEMDS lctl set_param fail_loc=0x80000145
rm $DIR1/$tfile &
- PID1=$!
- sleep 1
- mv -u $DIR2/$tfile-2 $DIR2/$tfile || error "rename must succeed"
+ PID1=$! ; pdo_sched
+ mv -u $DIR2/$tfile-2 $DIR2/$tfile &
+ PID2=$! ; pdo_sched
+ do_facet $SINGLEMDS lctl set_param fail_loc=0
check_pdo_conflict $PID1 && { wait $PID1; error "rename isn't blocked"; }
+ wait $PID2 ; [ $? -eq 0 ] || error "rename must succeed"
rm -rf $DIR/$tfile*
return 0
}
#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_facet $SINGLEMDS lctl set_param fail_loc=0x80000145
rm $DIR1/$tfile &
- PID1=$!
- sleep 1
- mv $DIR2/$tfile $DIR2/$tfile-2 && error "rename must fail"
+ PID1=$! ; pdo_sched
+ mv $DIR2/$tfile $DIR2/$tfile-2 &
+ PID2=$! ; pdo_sched
+ do_facet $SINGLEMDS lctl set_param fail_loc=0
check_pdo_conflict $PID1 && { wait $PID1; error "rename isn't blocked"; }
+ wait $PID2 ; [ $? -ne 0 ] || error "rename must fail"
rm -rf $DIR/$tfile*
return 0
}
#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_facet $SINGLEMDS lctl set_param fail_loc=0x80000145
rm $DIR1/$tfile &
- PID1=$!
- sleep 1
- stat $DIR2/$tfile > /dev/null && error "stat must fail"
+ PID1=$! ; pdo_sched
+ stat $DIR2/$tfile > /dev/null &
+ PID2=$! ; pdo_sched
+ do_facet $SINGLEMDS lctl set_param fail_loc=0
check_pdo_conflict $PID1 && { wait $PID1; error "getattr isn't blocked"; }
+ wait $PID2 ; [ $? -ne 0 ] || error "stat must fail"
rm -rf $DIR/$tfile*
return 0
}
#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_facet $SINGLEMDS lctl set_param fail_loc=0x80000145
rm $DIR1/$tfile &
- PID1=$!
- sleep 1
- ls -lia $DIR2/ > /dev/null
+ PID1=$! ; pdo_sched
+ ls -lia $DIR2/ > /dev/null &
+ PID2=$! ; pdo_sched
+ do_facet $SINGLEMDS lctl set_param fail_loc=0
check_pdo_conflict $PID1 && { wait $PID1; error "readdir isn't blocked"; }
+ wait $PID2
rm -rf $DIR/$tfile*
return 0
}
#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_facet $SINGLEMDS lctl set_param fail_loc=0x80000145
rm $DIR1/$tfile &
- PID1=$!
- sleep 1
- $LFS mkdir -i 1 $DIR2/$tfile || error "remote mkdir must succeed"
+ PID1=$! ; pdo_sched
+ $LFS mkdir -i 1 $DIR2/$tfile &
+ PID2=$! ; pdo_sched
+ do_facet $SINGLEMDS lctl set_param fail_loc=0
check_pdo_conflict $PID1 &&
{ wait $PID1; error "remote mkdir isn't blocked"; }
+ wait $PID2 ; [ $? -eq 0 ] || error "remote mkdir must succeed"
rm -rf $DIR/$tfile*
return 0
}
#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK2 0x146
do_facet $SINGLEMDS lctl set_param fail_loc=0x80000146
mv $DIR1/$tfile-2 $DIR1/$tfile &
- PID1=$!
- sleep 1
- mkdir $DIR2/$tfile && error "mkdir must fail"
- check_pdo_conflict $PID1 && { wait $PID1; error "mkdir isn't blocked"; }
+ PID1=$! ; pdo_sched
+ mkdir $DIR2/$tfile &
+ PID2=$! ; pdo_sched
+ do_facet $SINGLEMDS lctl set_param fail_loc=0
+ check_pdo_conflict $PID1 && { wait $PID1; date;error "mkdir isn't blocked"; }
+ wait $PID2 ; [ $? -ne 0 ] || error "mkdir must fail"
+ date
rm -rf $DIR/$tfile*
return 0
}
#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK2 0x146
do_facet $SINGLEMDS lctl set_param fail_loc=0x80000146
mv $DIR1/$tfile-2 $DIR1/$tfile &
- PID1=$!
- sleep 1
- $MULTIOP $DIR2/$tfile oO_CREAT:O_EXCL:c && error "create must fail"
+ PID1=$! ; pdo_sched
+ $MULTIOP $DIR2/$tfile oO_CREAT:O_EXCL:c &
+ PID2=$! ; pdo_sched
+ do_facet $SINGLEMDS lctl set_param fail_loc=0
check_pdo_conflict $PID1 && { wait $PID1; error "create isn't blocked"; }
+ wait $PID2 ; [ $? -ne 0 ] || error "create must fail"
rm -rf $DIR/$tfile*
return 0
}
#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK2 0x146
do_facet $SINGLEMDS lctl set_param fail_loc=0x80000146
mv $DIR1/$tfile-2 $DIR1/$tfile &
- PID1=$!
- sleep 1
- link $DIR2/$tfile-3 $DIR2/$tfile && error "link must fail"
+ PID1=$! ; pdo_sched
+ link $DIR2/$tfile-3 $DIR2/$tfile &
+ PID2=$! ; pdo_sched
+ do_facet $SINGLEMDS lctl set_param fail_loc=0
check_pdo_conflict $PID1 && { wait $PID1; error "link isn't blocked"; }
+ wait $PID2 ; [ $? -ne 0 ] || error "link must fail"
rm -rf $DIR/$tfile*
return 0
}
#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK2 0x146
do_facet $SINGLEMDS lctl set_param fail_loc=0x80000146
mv $DIR1/$tfile-2 $DIR1/$tfile &
- PID1=$!
- sleep 1
- rm $DIR2/$tfile || error "unlink must succeed"
+ PID1=$! ; pdo_sched
+ rm $DIR2/$tfile &
+ PID2=$! ; pdo_sched
+ do_facet $SINGLEMDS lctl set_param fail_loc=0
check_pdo_conflict $PID1 && { wait $PID1; error "unlink isn't blocked"; }
+ wait $PID2 ; [ $? -eq 0 ] || error "unlink must succeed"
rm -rf $DIR/$tfile*
return 0
}
#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK2 0x146
do_facet $SINGLEMDS lctl set_param fail_loc=0x80000146
mv $DIR1/$tfile-2 $DIR1/$tfile &
- PID1=$!
- sleep 1
- mv $DIR2/$tfile-3 $DIR2/$tfile || error "rename must succeed"
+ PID1=$! ; pdo_sched
+ mv $DIR2/$tfile-3 $DIR2/$tfile &
+ PID2=$! ; pdo_sched
+ do_facet $SINGLEMDS lctl set_param fail_loc=0
check_pdo_conflict $PID1 && { wait $PID1; error "rename isn't blocked"; }
+ wait $PID2 ; [ $? -eq 0 ] || error "rename must succeed"
rm -rf $DIR/$tfile*
return 0
}
#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK2 0x146
do_facet $SINGLEMDS lctl set_param fail_loc=0x80000146
mv $DIR1/$tfile-2 $DIR1/$tfile &
- PID1=$!
- sleep 1
- mv $DIR2/$tfile $DIR2/$tfile-3 || error "rename must succeed"
+ PID1=$! ; pdo_sched
+ mv $DIR2/$tfile $DIR2/$tfile-3 &
+ PID2=$! ; pdo_sched
+ do_facet $SINGLEMDS lctl set_param fail_loc=0
check_pdo_conflict $PID1 && { wait $PID1; error "rename isn't blocked"; }
+ wait $PID2 ; [ $? -eq 0 ] || error "rename must succeed"
rm -rf $DIR/$tfile*
return 0
}
#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK2 0x146
do_facet $SINGLEMDS lctl set_param fail_loc=0x80000146
mv $DIR1/$tfile-2 $DIR1/$tfile &
- PID1=$!
- sleep 1
- stat $DIR2/$tfile > /dev/null || error "stat must succeed"
+ PID1=$! ; pdo_sched
+ stat $DIR2/$tfile > /dev/null &
+ PID2=$! ; pdo_sched
+ do_facet $SINGLEMDS lctl set_param fail_loc=0
check_pdo_conflict $PID1 && { wait $PID1; error "getattr isn't blocked"; }
+ wait $PID2 ; [ $? -eq 0 ] || error "stat must succeed"
rm -rf $DIR/$tfile*
return 0
}
#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK2 0x146
do_facet $SINGLEMDS lctl set_param fail_loc=0x80000146
mv $DIR1/$tfile-2 $DIR1/$tfile &
- PID1=$!
- sleep 1
- ls -lia $DIR2/ > /dev/null
+ PID1=$! ; pdo_sched
+ ls -lia $DIR2/ > /dev/null &
+ PID2=$! ; pdo_sched
+ do_facet $SINGLEMDS lctl set_param fail_loc=0
check_pdo_conflict $PID1 && { wait $PID1; error "readdir isn't blocked"; }
+ wait $PID2
rm -rf $DIR/$tfile*
return 0
}
#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK2 0x146
do_facet $SINGLEMDS lctl set_param fail_loc=0x80000146
mv $DIR1/$tfile-2 $DIR1/$tfile &
- PID1=$!
- sleep 1
- $LFS mkdir -i 1 $DIR2/$tfile && error "remote mkdir must fail"
+ PID1=$! ; pdo_sched
+ $LFS mkdir -i 1 $DIR2/$tfile &
+ PID2=$! ; pdo_sched
+ do_facet $SINGLEMDS lctl set_param fail_loc=0
check_pdo_conflict $PID1 && { wait $PID1;
error "remote mkdir isn't blocked"; }
+ wait $PID2 ; [ $? -ne 0 ] || error "remote mkdir must fail"
rm -rf $DIR/$tfile*
return 0
}
#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_facet $SINGLEMDS lctl set_param fail_loc=0x80000145
mv $DIR1/$tfile $DIR1/$tfile-2 &
- PID1=$!
- sleep 1
- mkdir $DIR2/$tfile || error "mkdir must succeed"
+ PID1=$! ; pdo_sched
+ mkdir $DIR2/$tfile &
+ PID2=$! ; pdo_sched
+ do_facet $SINGLEMDS lctl set_param fail_loc=0
check_pdo_conflict $PID1 && { wait $PID1; error "mkdir isn't blocked"; }
+ wait $PID2 ; [ $? -eq 0 ] || error "mkdir must succeed"
rm -rf $DIR/$tfile*
return 0
}
#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_facet $SINGLEMDS lctl set_param fail_loc=0x80000145
mv $DIR1/$tfile $DIR1/$tfile-2 &
- PID1=$!
- sleep 1
- $MULTIOP $DIR2/$tfile oO_CREAT:O_EXCL:c || error "create must succeed"
+ PID1=$! ; pdo_sched
+ $MULTIOP $DIR2/$tfile oO_CREAT:O_EXCL:c &
+ PID2=$! ; pdo_sched
+ do_facet $SINGLEMDS lctl set_param fail_loc=0
check_pdo_conflict $PID1 && { wait $PID1; error "create isn't blocked"; }
+ wait $PID2 ; [ $? -eq 0 ] || error "create must succeed"
rm -rf $DIR/$tfile*
return 0
}
#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_facet $SINGLEMDS lctl set_param fail_loc=0x80000145
mv $DIR1/$tfile $DIR1/$tfile-2 &
- PID1=$!
- sleep 1
- link $DIR2/$tfile-3 $DIR2/$tfile || error "link must succeed"
+ PID1=$! ; pdo_sched
+ link $DIR2/$tfile-3 $DIR2/$tfile &
+ PID2=$! ; pdo_sched
+ do_facet $SINGLEMDS lctl set_param fail_loc=0
check_pdo_conflict $PID1 && { wait $PID1; error "link isn't blocked"; }
+ wait $PID2 ; [ $? -eq 0 ] || error "link must succeed"
rm -rf $DIR/$tfile*
return 0
}
#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_facet $SINGLEMDS lctl set_param fail_loc=0x80000145
mv $DIR1/$tfile $DIR1/$tfile-2 &
- PID1=$!
- sleep 1
- rm $DIR2/$tfile && error "unlink must fail"
+ PID1=$! ; pdo_sched
+ rm $DIR2/$tfile &
+ PID2=$! ; pdo_sched
+ do_facet $SINGLEMDS lctl set_param fail_loc=0
check_pdo_conflict $PID1 && { wait $PID1; error "unlink isn't blocked"; }
+ wait $PID2 ; [ $? -ne 0 ] || error "unlink must fail"
rm -rf $DIR/$tfile*
return 0
}
#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_facet $SINGLEMDS lctl set_param fail_loc=0x80000145
mv $DIR1/$tfile $DIR1/$tfile-2 &
- PID1=$!
- sleep 1
- mv $DIR2/$tfile-3 $DIR2/$tfile || error "rename must succeed"
+ PID1=$! ; pdo_sched
+ mv $DIR2/$tfile-3 $DIR2/$tfile &
+ PID2=$! ; pdo_sched
+ do_facet $SINGLEMDS lctl set_param fail_loc=0
check_pdo_conflict $PID1 && { wait $PID1; error "rename isn't blocked"; }
+ wait $PID2 ; [ $? -eq 0 ] || error "rename must succeed"
rm -rf $DIR/$tfile*
return 0
}
#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_facet $SINGLEMDS lctl set_param fail_loc=0x80000145
mv $DIR1/$tfile $DIR1/$tfile-2 &
- PID1=$!
- sleep 1
- mv $DIR2/$tfile $DIR2/$tfile-3 && error "rename must fail"
+ PID1=$! ; pdo_sched
+ mv $DIR2/$tfile $DIR2/$tfile-3 &
+ PID2=$! ; pdo_sched
+ do_facet $SINGLEMDS lctl set_param fail_loc=0
check_pdo_conflict $PID1 && { wait $PID1; error "rename isn't blocked"; }
+ wait $PID2 ; [ $? -ne 0 ] || error "rename must fail"
rm -rf $DIR/$tfile*
return 0
}
#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_facet $SINGLEMDS lctl set_param fail_loc=0x80000145
mv $DIR1/$tfile $DIR1/$tfile-2 &
- PID1=$!
- sleep 1
- stat $DIR2/$tfile > /dev/null && error "stat must fail"
+ PID1=$! ; pdo_sched
+ stat $DIR2/$tfile > /dev/null &
+ PID2=$! ; pdo_sched
+ do_facet $SINGLEMDS lctl set_param fail_loc=0
check_pdo_conflict $PID1 && { wait $PID1; error "getattr isn't blocked"; }
+ wait $PID2 ; [ $? -ne 0 ] || error "stat must fail"
rm -rf $DIR/$tfile*
return 0
}
#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_facet $SINGLEMDS lctl set_param fail_loc=0x80000145
mv $DIR1/$tfile $DIR1/$tfile-2 &
- PID1=$!
- sleep 1
- ls -lia $DIR2/ > /dev/null
+ PID1=$! ; pdo_sched
+ ls -lia $DIR2/ > /dev/null &
+ do_facet $SINGLEMDS lctl set_param fail_loc=0
check_pdo_conflict $PID1 && { wait $PID1; error "readdir isn't blocked"; }
+ wait $PID2
rm -rf $DIR/$tfile*
return 0
}
#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_facet $SINGLEMDS lctl set_param fail_loc=0x80000145
mv $DIR1/$tfile $DIR1/$tfile-2 &
- PID1=$!
- sleep 1
- $LFS mkdir -i 1 $DIR2/$tfile || error "create remote dir must succeed"
+ PID1=$! ; pdo_sched
+ $LFS mkdir -i 1 $DIR2/$tfile &
+ PID2=$! ; pdo_sched
+ do_facet $SINGLEMDS lctl set_param fail_loc=0
check_pdo_conflict $PID1 && { wait $PID1;
error "create remote dir isn't blocked"; }
+ wait $PID2 ; [ $? -eq 0 ] || error "create remote dir must succeed"
rm -rf $DIR/$tfile*
return 0
}
#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_facet $SINGLEMDS lctl set_param fail_loc=0x80000145
link $DIR1/$tfile-2 $DIR1/$tfile &
- PID1=$!
- sleep 1
- mkdir $DIR2/$tfile && error "mkdir must fail"
+ PID1=$! ; pdo_sched
+ mkdir $DIR2/$tfile &
+ PID2=$! ; pdo_sched
+ do_facet $SINGLEMDS lctl set_param fail_loc=0
check_pdo_conflict $PID1 && { wait $PID1; error "mkdir isn't blocked"; }
+ wait $PID2 ; [ $? -ne 0 ] || error "mkdir must fail"
rm -rf $DIR/$tfile*
return 0
}
#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_facet $SINGLEMDS lctl set_param fail_loc=0x80000145
link $DIR1/$tfile-2 $DIR1/$tfile &
- PID1=$!
- sleep 1
- $MULTIOP $DIR2/$tfile oO_CREAT:O_EXCL:c && error "create must fail"
+ PID1=$! ; pdo_sched
+ $MULTIOP $DIR2/$tfile oO_CREAT:O_EXCL:c &
+ PID2=$! ; pdo_sched
+ do_facet $SINGLEMDS lctl set_param fail_loc=0
check_pdo_conflict $PID1 && { wait $PID1; error "create isn't blocked"; }
+ wait $PID2 ; [ $? -ne 0 ] || error "create must fail"
rm -rf $DIR/$tfile*
return 0
}
#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_facet $SINGLEMDS lctl set_param fail_loc=0x80000145
link $DIR1/$tfile-2 $DIR1/$tfile &
- PID1=$!
- sleep 1
- link $DIR2/$tfile $DIR2/$tfile && error "link must fail"
+ PID1=$! ; pdo_sched
+ link $DIR2/$tfile $DIR2/$tfile &
+ PID2=$! ; pdo_sched
+ do_facet $SINGLEMDS lctl set_param fail_loc=0
check_pdo_conflict $PID1 && { wait $PID1; error "link isn't blocked"; }
+ wait $PID2 ; [ $? -ne 0 ] || error "link must fail"
rm -rf $DIR/$tfile*
return 0
}
#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_facet $SINGLEMDS lctl set_param fail_loc=0x80000145
link $DIR1/$tfile-2 $DIR1/$tfile &
- PID1=$!
- sleep 1
- rm $DIR2/$tfile || error "unlink must succeed"
+ PID1=$! ; pdo_sched
+ rm $DIR2/$tfile &
+ PID2=$! ; pdo_sched
+ do_facet $SINGLEMDS lctl set_param fail_loc=0
check_pdo_conflict $PID1 && { wait $PID1; error "unlink isn't blocked"; }
+ wait $PID2 ; [ $? -eq 0 ] || error "unlink must succeed"
rm -rf $DIR/$tfile*
return 0
}
#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_facet $SINGLEMDS lctl set_param fail_loc=0x80000145
link $DIR1/$tfile-2 $DIR1/$tfile &
- PID1=$!
- sleep 1
- mv $DIR2/$tfile-3 $DIR2/$tfile || error "rename must succeed"
+ PID1=$! ; pdo_sched
+ mv $DIR2/$tfile-3 $DIR2/$tfile &
+ PID2=$! ; pdo_sched
+ do_facet $SINGLEMDS lctl set_param fail_loc=0
check_pdo_conflict $PID1 && { wait $PID1; error "rename isn't blocked"; }
+ wait $PID2 ; [ $? -eq 0 ] || error "rename must succeed"
rm -rf $DIR/$tfile*
return 0
}
#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_facet $SINGLEMDS lctl set_param fail_loc=0x80000145
link $DIR1/$tfile-2 $DIR1/$tfile &
- PID1=$!
- sleep 1
- mv $DIR2/$tfile $DIR2/$tfile-3 || error "rename must succeed"
+ PID1=$! ; pdo_sched
+ mv $DIR2/$tfile $DIR2/$tfile-3 &
+ PID2=$! ; pdo_sched
+ do_facet $SINGLEMDS lctl set_param fail_loc=0
check_pdo_conflict $PID1 && { wait $PID1; error "rename isn't blocked"; }
+ wait $PID2 ; [ $? -eq 0 ] || error "rename must succeed"
rm -rf $DIR/$tfile*
return 0
}
#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_facet $SINGLEMDS lctl set_param fail_loc=0x80000145
link $DIR1/$tfile-2 $DIR1/$tfile &
- PID1=$!
- sleep 1
- stat $DIR2/$tfile > /dev/null || error "stat must succeed"
+ PID1=$! ; pdo_sched
+ stat $DIR2/$tfile > /dev/null &
+ PID2=$! ; pdo_sched
+ do_facet $SINGLEMDS lctl set_param fail_loc=0
check_pdo_conflict $PID1 && { wait $PID1; error "getattr isn't blocked"; }
+ wait $PID2 ; [ $? -eq 0 ] || error "stat must succeed"
rm -rf $DIR/$tfile*
return 0
}
#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_facet $SINGLEMDS lctl set_param fail_loc=0x80000145
link $DIR1/$tfile-2 $DIR1/$tfile &
- PID1=$!
- sleep 1
- ls -lia $DIR2/ > /dev/null
- check_pdo_conflict $PID1 && { wait $PID1;
- error "readdir isn't blocked"; }
+ PID1=$! ; pdo_sched
+ ls -lia $DIR2/ > /dev/null &
+ PID2=$! ; pdo_sched
+ do_facet $SINGLEMDS lctl set_param fail_loc=0
+ check_pdo_conflict $PID1 && { wait $PID1; error "readdir isn't blocked"; }
+ wait $PID2
rm -rf $DIR/$tfile*
return 0
}
#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_facet $SINGLEMDS lctl set_param fail_loc=0x80000145
link $DIR1/$tfile-2 $DIR1/$tfile &
- PID1=$!
- sleep 1
- $LFS mkdir -i 1 $DIR2/$tfile && error "remote mkdir must fail"
+ PID1=$! ; pdo_sched
+ $LFS mkdir -i 1 $DIR2/$tfile &
+ PID2=$! ; pdo_sched
+ do_facet $SINGLEMDS lctl set_param fail_loc=0
check_pdo_conflict $PID1 && { wait $PID1;
error "remote mkdir isn't blocked"; }
+ wait $PID2 ; [ $? -ne 0 ] || error "remote mkdir must fail"
rm -rf $DIR/$tfile*
return 0
}
[ $MDSCOUNT -lt 2 ] && skip "needs >= 2 MDTs" && return
do_facet $SINGLEMDS lctl set_param fail_loc=0x80000145
$LFS mkdir -i 1 $DIR1/$tfile &
- PID1=$!
- sleep 1
- mkdir $DIR2/$tfile && error "mkdir must fail"
+ PID1=$! ; pdo_sched
+ mkdir $DIR2/$tfile &
+ PID2=$! ; pdo_sched
+ do_facet $SINGLEMDS lctl set_param fail_loc=0
check_pdo_conflict $PID1 && { wait $PID1; error "mkdir isn't blocked"; }
+ wait $PID2 ; [ $? -ne 0 ] || error "mkdir must fail"
rm -rf $DIR/$tfile*
return 0
}
[ $MDSCOUNT -lt 2 ] && skip "needs >= 2 MDTs" && return
do_facet $SINGLEMDS lctl set_param fail_loc=0x80000145
$LFS mkdir -i 1 $DIR1/$tfile &
- PID1=$!
- sleep 1
- multiop $DIR2/$tfile oO_CREAT:O_EXCL:c && error "create must fail"
+ PID1=$! ; pdo_sched
+ multiop $DIR2/$tfile oO_CREAT:O_EXCL:c &
+ PID2=$! ; pdo_sched
+ do_facet $SINGLEMDS lctl set_param fail_loc=0
check_pdo_conflict $PID1 && { wait $PID1;
error "create isn't blocked"; }
+ wait $PID2 ; [ $? -ne 0 ] || error "create must fail"
rm -rf $DIR/$tfile*
return 0
}
#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_facet $SINGLEMDS lctl set_param fail_loc=0x80000145
$LFS mkdir -i 1 $DIR1/$tfile &
- PID1=$!
- sleep 1
- link $DIR2/$tfile-2 $DIR2/$tfile && error "link must fail"
+ PID1=$! ; pdo_sched
+ link $DIR2/$tfile-2 $DIR2/$tfile &
+ PID2=$! ; pdo_sched
+ do_facet $SINGLEMDS lctl set_param fail_loc=0
check_pdo_conflict $PID1 && { wait $PID1; error "link isn't blocked"; }
+ wait $PID2 ; [ $? -ne 0 ] || error "link must fail"
rm -rf $DIR/$tfile*
return 0
}
#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_facet $SINGLEMDS lctl set_param fail_loc=0x80000145
$LFS mkdir -i 1 $DIR1/$tfile &
- PID1=$!
- sleep 1
- rmdir $DIR2/$tfile || error "unlink must succeed"
+ PID1=$! ; pdo_sched
+ rmdir $DIR2/$tfile &
+ PID2=$! ; pdo_sched
+ do_facet $SINGLEMDS lctl set_param fail_loc=0
check_pdo_conflict $PID1 && { wait $PID1;
error "unlink isn't blocked"; }
+ wait $PID2 ; [ $? -eq 0 ] || error "rmdir must succeed"
rm -rf $DIR/$tfile*
return 0
}
#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_facet $SINGLEMDS lctl set_param fail_loc=0x80000145
$LFS mkdir -i 1 $DIR1/$tfile &
- PID1=$!
- sleep 1
- mv -T $DIR2/$tfile-2 $DIR2/$tfile && error "rename must fail"
+ PID1=$! ; pdo_sched
+ mv -T $DIR2/$tfile-2 $DIR2/$tfile &
+ PID2=$! ; pdo_sched
+ do_facet $SINGLEMDS lctl set_param fail_loc=0
check_pdo_conflict $PID1 && { wait $PID1;
error "rename isn't blocked"; }
+ wait $PID2 ; [ $? -ne 0 ] || error "rename must fail"
rm -rf $DIR/$tfile*
return 0
}
#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_facet $SINGLEMDS lctl set_param fail_loc=0x80000145
$LFS mkdir -i 1 $DIR1/$tfile &
- PID1=$!
- sleep 1
- mv $DIR2/$tfile $DIR2/$tfile-2 || error "rename must succeed"
+ PID1=$! ; pdo_sched
+ mv $DIR2/$tfile $DIR2/$tfile-2 &
+ PID2=$! ; pdo_sched
+ do_facet $SINGLEMDS lctl set_param fail_loc=0
check_pdo_conflict $PID1 && { wait $PID1;
error "rename isn't blocked"; }
+ wait $PID2 ; [ $? -eq 0 ] || error "rename must succeed"
rm -rf $DIR/$tfile*
return 0
}
#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_facet $SINGLEMDS lctl set_param fail_loc=0x80000145
$LFS mkdir -i 1 $DIR1/$tfile &
- PID1=$!
- sleep 2
- stat $DIR2/$tfile > /dev/null || error "stat must succeed"
+ PID1=$! ; pdo_sched
+ stat $DIR2/$tfile > /dev/null &
+ PID2=$! ; pdo_sched
+ do_facet $SINGLEMDS lctl set_param fail_loc=0
check_pdo_conflict $PID1 && { wait $PID1;
error "getattr isn't blocked"; }
+ wait $PID2 ; [ $? -eq 0 ] || error "stat must succeed"
rm -rf $DIR/$tfile*
return 0
}