# sleep 0.5 # 164s
}
+# for pdo testing, we must cancel MDT-MDT locks as well as client locks to
+# avoid unexpected delays due to previous tests
+pdo_lru_clear() {
+ cancel_lru_locks mdc
+ do_nodes $(comma_list $(mdts_nodes)) \
+ $LCTL set_param -n ldlm.namespaces.*mdt*.lru_size=clear
+ do_nodes $(comma_list $(mdts_nodes)) \
+ $LCTL get_param ldlm.namespaces.*mdt*.lock_unused_count \
+ ldlm.namespaces.*mdt*.lock_count | grep -v '=0'
+}
+
# 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
# test 40: check non-blocking operations
test_40a() {
remote_mds_nodsh && skip "remote MDS with nodsh" && return
- cancel_lru_locks mdc
+ pdo_lru_clear
#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_facet $SINGLEMDS lctl set_param fail_loc=0x80000145
touch $DIR2
test_40b() {
remote_mds_nodsh && skip "remote MDS with nodsh" && return
- cancel_lru_locks mdc
+ pdo_lru_clear
#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_facet $SINGLEMDS lctl set_param fail_loc=0x80000145
touch $DIR1/$tfile &
test_40c() {
remote_mds_nodsh && skip "remote MDS with nodsh" && return
- cancel_lru_locks mdc
+ pdo_lru_clear
touch $DIR1/$tfile
#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_facet $SINGLEMDS lctl set_param fail_loc=0x80000145
test_40d() {
remote_mds_nodsh && skip "remote MDS with nodsh" && return
- cancel_lru_locks mdc
+ pdo_lru_clear
touch $DIR1/$tfile
#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_facet $SINGLEMDS lctl set_param fail_loc=0x80000145
test_40e() {
remote_mds_nodsh && skip "remote MDS with nodsh" && return
- cancel_lru_locks mdc
+ pdo_lru_clear
touch $DIR1/$tfile
#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_facet $SINGLEMDS lctl set_param fail_loc=0x80000145
# test 41: create blocking operations
test_41a() {
- cancel_lru_locks mdc
+ pdo_lru_clear
#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 &
run_test 41a "pdirops: create vs mkdir =============="
test_41b() {
- cancel_lru_locks mdc
+ pdo_lru_clear
#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 &
run_test 41b "pdirops: create vs create =============="
test_41c() {
- cancel_lru_locks mdc
+ pdo_lru_clear
touch $DIR1/$tfile-2
#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_facet $SINGLEMDS lctl set_param fail_loc=0x80000145
run_test 41c "pdirops: create vs link =============="
test_41d() {
- cancel_lru_locks mdc
+ pdo_lru_clear
#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 &
run_test 41d "pdirops: create vs unlink =============="
test_41e() {
- cancel_lru_locks mdc
+ pdo_lru_clear
touch $DIR1/$tfile-2
#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_facet $SINGLEMDS lctl set_param fail_loc=0x80000145
run_test 41e "pdirops: create and rename (tgt) =============="
test_41f() {
- cancel_lru_locks mdc
+ pdo_lru_clear
#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 &
run_test 41f "pdirops: create and rename (src) =============="
test_41g() {
- cancel_lru_locks mdc
+ pdo_lru_clear
#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 &
run_test 41g "pdirops: create vs getattr =============="
test_41h() {
- cancel_lru_locks mdc
+ pdo_lru_clear
#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 &
# test 42: unlink and blocking operations
test_42a() {
- cancel_lru_locks mdc
+ pdo_lru_clear
#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_facet $SINGLEMDS lctl set_param fail_loc=0x80000145
mkdir $DIR1/$tfile &
run_test 42a "pdirops: mkdir vs mkdir =============="
test_42b() {
- cancel_lru_locks mdc
+ pdo_lru_clear
#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_facet $SINGLEMDS lctl set_param fail_loc=0x80000145
mkdir $DIR1/$tfile &
run_test 42b "pdirops: mkdir vs create =============="
test_42c() {
- cancel_lru_locks mdc
+ pdo_lru_clear
touch $DIR1/$tfile-2
#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_facet $SINGLEMDS lctl set_param fail_loc=0x80000145
run_test 42c "pdirops: mkdir vs link =============="
test_42d() {
- cancel_lru_locks mdc
+ pdo_lru_clear
#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_facet $SINGLEMDS lctl set_param fail_loc=0x80000145
mkdir $DIR1/$tfile &
run_test 42d "pdirops: mkdir vs unlink =============="
test_42e() {
- cancel_lru_locks mdc
+ pdo_lru_clear
touch $DIR1/$tfile-2
#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_facet $SINGLEMDS lctl set_param fail_loc=0x80000145
run_test 42e "pdirops: mkdir and rename (tgt) =============="
test_42f() {
- cancel_lru_locks mdc
+ pdo_lru_clear
#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_facet $SINGLEMDS lctl set_param fail_loc=0x80000145
mkdir $DIR1/$tfile &
run_test 42f "pdirops: mkdir and rename (src) =============="
test_42g() {
- cancel_lru_locks mdc
+ pdo_lru_clear
#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_facet $SINGLEMDS lctl set_param fail_loc=0x80000145
mkdir $DIR1/$tfile &
run_test 42g "pdirops: mkdir vs getattr =============="
test_42h() {
- cancel_lru_locks mdc
+ pdo_lru_clear
#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_facet $SINGLEMDS lctl set_param fail_loc=0x80000145
mkdir $DIR1/$tfile &
# test 43: unlink and blocking operations
test_43a() {
- cancel_lru_locks mdc
+ pdo_lru_clear
touch $DIR1/$tfile
#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_facet $SINGLEMDS lctl set_param fail_loc=0x80000145
run_test 43a "pdirops: unlink vs mkdir =============="
test_43b() {
- cancel_lru_locks mdc
+ pdo_lru_clear
touch $DIR1/$tfile
#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_facet $SINGLEMDS lctl set_param fail_loc=0x80000145
run_test 43b "pdirops: unlink vs create =============="
test_43c() {
- cancel_lru_locks mdc
+ pdo_lru_clear
touch $DIR1/$tfile
touch $DIR1/$tfile-2
#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
run_test 43c "pdirops: unlink vs link =============="
test_43d() {
- cancel_lru_locks mdc
+ pdo_lru_clear
touch $DIR1/$tfile
#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_facet $SINGLEMDS lctl set_param fail_loc=0x80000145
run_test 43d "pdirops: unlink vs unlink =============="
test_43e() {
- cancel_lru_locks mdc
+ pdo_lru_clear
touch $DIR1/$tfile
touch $DIR1/$tfile-2
#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
run_test 43e "pdirops: unlink and rename (tgt) =============="
test_43f() {
- cancel_lru_locks mdc
+ pdo_lru_clear
touch $DIR1/$tfile
#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_facet $SINGLEMDS lctl set_param fail_loc=0x80000145
run_test 43f "pdirops: unlink and rename (src) =============="
test_43g() {
- cancel_lru_locks mdc
+ pdo_lru_clear
touch $DIR1/$tfile
#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_facet $SINGLEMDS lctl set_param fail_loc=0x80000145
run_test 43g "pdirops: unlink vs getattr =============="
test_43h() {
- cancel_lru_locks mdc
+ pdo_lru_clear
touch $DIR1/$tfile
#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_facet $SINGLEMDS lctl set_param fail_loc=0x80000145
test_43i() {
[ $MDSCOUNT -lt 2 ] && skip "needs >= 2 MDTs" && return
- cancel_lru_locks mdc
+ pdo_lru_clear
touch $DIR1/$tfile
#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_facet $SINGLEMDS lctl set_param fail_loc=0x80000145
# test 44: rename tgt and blocking operations
test_44a() {
- cancel_lru_locks mdc
+ pdo_lru_clear
touch $DIR1/$tfile-2
#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK2 0x146
do_facet $SINGLEMDS lctl set_param fail_loc=0x80000146
run_test 44a "pdirops: rename tgt vs mkdir =============="
test_44b() {
- cancel_lru_locks mdc
+ pdo_lru_clear
touch $DIR1/$tfile-2
#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK2 0x146
do_facet $SINGLEMDS lctl set_param fail_loc=0x80000146
run_test 44b "pdirops: rename tgt vs create =============="
test_44c() {
- cancel_lru_locks mdc
+ pdo_lru_clear
touch $DIR1/$tfile-2
touch $DIR1/$tfile-3
#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK2 0x146
run_test 44c "pdirops: rename tgt vs link =============="
test_44d() {
- cancel_lru_locks mdc
+ pdo_lru_clear
touch $DIR1/$tfile-2
#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK2 0x146
do_facet $SINGLEMDS lctl set_param fail_loc=0x80000146
run_test 44d "pdirops: rename tgt vs unlink =============="
test_44e() {
- cancel_lru_locks mdc
+ pdo_lru_clear
touch $DIR1/$tfile
touch $DIR1/$tfile-2
touch $DIR1/$tfile-3
run_test 44e "pdirops: rename tgt and rename (tgt) =============="
test_44f() {
- cancel_lru_locks mdc
+ pdo_lru_clear
touch $DIR1/$tfile-2
touch $DIR1/$tfile-3
#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK2 0x146
run_test 44f "pdirops: rename tgt and rename (src) =============="
test_44g() {
- cancel_lru_locks mdc
+ pdo_lru_clear
touch $DIR1/$tfile-2
#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK2 0x146
do_facet $SINGLEMDS lctl set_param fail_loc=0x80000146
run_test 44g "pdirops: rename tgt vs getattr =============="
test_44h() {
- cancel_lru_locks mdc
+ pdo_lru_clear
touch $DIR1/$tfile-2
#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK2 0x146
do_facet $SINGLEMDS lctl set_param fail_loc=0x80000146
# test 44: rename tgt and blocking operations
test_44i() {
[ $MDSCOUNT -lt 2 ] && skip "needs >= 2 MDTs" && return
- cancel_lru_locks mdc
+ pdo_lru_clear
touch $DIR1/$tfile-2
#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK2 0x146
do_facet $SINGLEMDS lctl set_param fail_loc=0x80000146
# test 45: rename src and blocking operations
test_45a() {
- cancel_lru_locks mdc
+ pdo_lru_clear
touch $DIR1/$tfile
#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_facet $SINGLEMDS lctl set_param fail_loc=0x80000145
run_test 45a "pdirops: rename src vs mkdir =============="
test_45b() {
- cancel_lru_locks mdc
+ pdo_lru_clear
touch $DIR1/$tfile
#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_facet $SINGLEMDS lctl set_param fail_loc=0x80000145
run_test 45b "pdirops: rename src vs create =============="
test_45c() {
- cancel_lru_locks mdc
+ pdo_lru_clear
touch $DIR1/$tfile
touch $DIR1/$tfile-3
#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
run_test 45c "pdirops: rename src vs link =============="
test_45d() {
- cancel_lru_locks mdc
+ pdo_lru_clear
touch $DIR1/$tfile
#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_facet $SINGLEMDS lctl set_param fail_loc=0x80000145
run_test 45d "pdirops: rename src vs unlink =============="
test_45e() {
- cancel_lru_locks mdc
+ pdo_lru_clear
touch $DIR1/$tfile
touch $DIR1/$tfile-3
#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
run_test 45e "pdirops: rename src and rename (tgt) =============="
test_45f() {
- cancel_lru_locks mdc
+ pdo_lru_clear
touch $DIR1/$tfile
#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_facet $SINGLEMDS lctl set_param fail_loc=0x80000145
run_test 45f "pdirops: rename src and rename (src) =============="
test_45g() {
- cancel_lru_locks mdc
+ pdo_lru_clear
touch $DIR1/$tfile
#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_facet $SINGLEMDS lctl set_param fail_loc=0x80000145
run_test 45g "pdirops: rename src vs getattr =============="
test_45h() {
- cancel_lru_locks mdc
+ pdo_lru_clear
touch $DIR1/$tfile
#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_facet $SINGLEMDS lctl set_param fail_loc=0x80000145
test_45i() {
[ $MDSCOUNT -lt 2 ] && skip "needs >= 2 MDTs" && return
- cancel_lru_locks mdc
+ pdo_lru_clear
touch $DIR1/$tfile
#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_facet $SINGLEMDS lctl set_param fail_loc=0x80000145
# test 46: link and blocking operations
test_46a() {
- cancel_lru_locks mdc
+ pdo_lru_clear
touch $DIR1/$tfile-2
#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_facet $SINGLEMDS lctl set_param fail_loc=0x80000145
run_test 46a "pdirops: link vs mkdir =============="
test_46b() {
- cancel_lru_locks mdc
+ pdo_lru_clear
touch $DIR1/$tfile-2
#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_facet $SINGLEMDS lctl set_param fail_loc=0x80000145
run_test 46b "pdirops: link vs create =============="
test_46c() {
- cancel_lru_locks mdc
+ pdo_lru_clear
touch $DIR1/$tfile-2
#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_facet $SINGLEMDS lctl set_param fail_loc=0x80000145
run_test 46c "pdirops: link vs link =============="
test_46d() {
- cancel_lru_locks mdc
+ pdo_lru_clear
touch $DIR1/$tfile-2
#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_facet $SINGLEMDS lctl set_param fail_loc=0x80000145
run_test 46d "pdirops: link vs unlink =============="
test_46e() {
- cancel_lru_locks mdc
+ pdo_lru_clear
touch $DIR1/$tfile-2
touch $DIR1/$tfile-3
#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
run_test 46e "pdirops: link and rename (tgt) =============="
test_46f() {
- cancel_lru_locks mdc
+ pdo_lru_clear
touch $DIR1/$tfile-2
touch $DIR1/$tfile-3
#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
run_test 46f "pdirops: link and rename (src) =============="
test_46g() {
- cancel_lru_locks mdc
+ pdo_lru_clear
touch $DIR1/$tfile-2
#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_facet $SINGLEMDS lctl set_param fail_loc=0x80000145
run_test 46g "pdirops: link vs getattr =============="
test_46h() {
- cancel_lru_locks mdc
+ pdo_lru_clear
touch $DIR1/$tfile-2
#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_facet $SINGLEMDS lctl set_param fail_loc=0x80000145
test_46i() {
[ $MDSCOUNT -lt 2 ] && skip "needs >= 2 MDTs" && return
- cancel_lru_locks mdc
+ pdo_lru_clear
touch $DIR1/$tfile-2
#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_facet $SINGLEMDS lctl set_param fail_loc=0x80000145
# test 47: remote mkdir and blocking operations
test_47a() {
- cancel_lru_locks mdc
#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
[ $MDSCOUNT -lt 2 ] && skip "needs >= 2 MDTs" && return
- cancel_lru_locks mdc
+ pdo_lru_clear
do_facet $SINGLEMDS lctl set_param fail_loc=0x80000145
$LFS mkdir -i 1 $DIR1/$tfile &
PID1=$! ; pdo_sched
test_47b() {
#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
[ $MDSCOUNT -lt 2 ] && skip "needs >= 2 MDTs" && return
- cancel_lru_locks mdc
+ pdo_lru_clear
do_facet $SINGLEMDS lctl set_param fail_loc=0x80000145
$LFS mkdir -i 1 $DIR1/$tfile &
PID1=$! ; pdo_sched
test_47c() {
[ $MDSCOUNT -lt 2 ] && skip "needs >= 2 MDTs" && return
- cancel_lru_locks mdc
+ pdo_lru_clear
touch $DIR1/$tfile-2
#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_facet $SINGLEMDS lctl set_param fail_loc=0x80000145
test_47d() {
[ $MDSCOUNT -lt 2 ] && skip "needs >= 2 MDTs" && return
- cancel_lru_locks mdc
+ pdo_lru_clear
#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 &
test_47e() {
[ $MDSCOUNT -lt 2 ] && skip "needs >= 2 MDTs" && return
- cancel_lru_locks mdc
+ pdo_lru_clear
touch $DIR1/$tfile-2
#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_facet $SINGLEMDS lctl set_param fail_loc=0x80000145
test_47f() {
[ $MDSCOUNT -lt 2 ] && skip "needs >= 2 MDTs" && return
- cancel_lru_locks mdc
+ pdo_lru_clear
#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 &
[ $MDSCOUNT -lt 2 ] && skip "needs >= 2 MDTs" && return
sync
sync_all_data
- cancel_lru_locks mdc
+ pdo_lru_clear
#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 &