Whamcloud - gitweb
LU-12470 tests: clear MDT-MDT locks for pdo tests
[fs/lustre-release.git] / lustre / tests / sanityn.sh
index b2f41a7..516c390 100755 (executable)
@@ -1471,6 +1471,17 @@ pdo_sched() {
        # 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
@@ -1491,7 +1502,7 @@ check_pdo_conflict() {
 # 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
@@ -1522,7 +1533,7 @@ run_test 40a "pdirops: create vs others =============="
 
 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 &
@@ -1553,7 +1564,7 @@ run_test 40b "pdirops: open|create and others =============="
 
 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
@@ -1585,7 +1596,7 @@ run_test 40c "pdirops: link and others =============="
 
 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
@@ -1616,7 +1627,7 @@ run_test 40d "pdirops: unlink and others =============="
 
 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
@@ -1646,7 +1657,7 @@ run_test 40e "pdirops: rename and others =============="
 
 # 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 &
@@ -1662,7 +1673,7 @@ test_41a() {
 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 &
@@ -1678,7 +1689,7 @@ test_41b() {
 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
@@ -1695,7 +1706,7 @@ test_41c() {
 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 &
@@ -1711,7 +1722,7 @@ test_41d() {
 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
@@ -1728,7 +1739,7 @@ test_41e() {
 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 &
@@ -1744,7 +1755,7 @@ test_41f() {
 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 &
@@ -1760,7 +1771,7 @@ test_41g() {
 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 &
@@ -1777,7 +1788,7 @@ run_test 41h "pdirops: create vs readdir =============="
 
 # 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 &
@@ -1793,7 +1804,7 @@ test_42a() {
 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 &
@@ -1809,7 +1820,7 @@ test_42b() {
 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
@@ -1826,7 +1837,7 @@ test_42c() {
 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 &
@@ -1842,7 +1853,7 @@ test_42d() {
 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
@@ -1859,7 +1870,7 @@ test_42e() {
 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 &
@@ -1875,7 +1886,7 @@ test_42f() {
 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 &
@@ -1891,7 +1902,7 @@ test_42g() {
 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 &
@@ -1908,7 +1919,7 @@ run_test 42h "pdirops: mkdir vs readdir =============="
 
 # 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
@@ -1925,7 +1936,7 @@ test_43a() {
 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
@@ -1942,7 +1953,7 @@ test_43b() {
 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
@@ -1960,7 +1971,7 @@ test_43c() {
 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
@@ -1977,7 +1988,7 @@ test_43d() {
 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
@@ -1995,7 +2006,7 @@ test_43e() {
 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
@@ -2012,7 +2023,7 @@ test_43f() {
 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
@@ -2029,7 +2040,7 @@ test_43g() {
 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
@@ -2047,7 +2058,7 @@ run_test 43h "pdirops: unlink vs readdir =============="
 
 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
@@ -2066,7 +2077,7 @@ run_test 43i "pdirops: unlink vs remote mkdir"
 
 # 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
@@ -2084,7 +2095,7 @@ test_44a() {
 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
@@ -2101,7 +2112,7 @@ test_44b() {
 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
@@ -2119,7 +2130,7 @@ test_44c() {
 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
@@ -2136,7 +2147,7 @@ test_44d() {
 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
@@ -2155,7 +2166,7 @@ test_44e() {
 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
@@ -2173,7 +2184,7 @@ test_44f() {
 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
@@ -2190,7 +2201,7 @@ test_44g() {
 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
@@ -2209,7 +2220,7 @@ run_test 44h "pdirops: rename tgt vs readdir =============="
 # 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
@@ -2228,7 +2239,7 @@ run_test 44i "pdirops: rename tgt vs remote mkdir"
 
 # 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
@@ -2245,7 +2256,7 @@ test_45a() {
 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
@@ -2262,7 +2273,7 @@ test_45b() {
 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
@@ -2280,7 +2291,7 @@ test_45c() {
 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
@@ -2297,7 +2308,7 @@ test_45d() {
 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
@@ -2315,7 +2326,7 @@ test_45e() {
 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
@@ -2332,7 +2343,7 @@ test_45f() {
 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
@@ -2349,7 +2360,7 @@ test_45g() {
 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
@@ -2366,7 +2377,7 @@ run_test 45h "pdirops: unlink vs readdir =============="
 
 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
@@ -2385,7 +2396,7 @@ run_test 45i "pdirops: rename src vs remote mkdir"
 
 # 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
@@ -2402,7 +2413,7 @@ test_46a() {
 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
@@ -2419,7 +2430,7 @@ test_46b() {
 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
@@ -2436,7 +2447,7 @@ test_46c() {
 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
@@ -2453,7 +2464,7 @@ test_46d() {
 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
@@ -2471,7 +2482,7 @@ test_46e() {
 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
@@ -2489,7 +2500,7 @@ test_46f() {
 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
@@ -2506,7 +2517,7 @@ test_46g() {
 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
@@ -2524,7 +2535,7 @@ run_test 46h "pdirops: link vs readdir =============="
 
 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
@@ -2543,10 +2554,9 @@ run_test 46i "pdirops: link vs remote mkdir"
 
 # 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
@@ -2563,7 +2573,7 @@ run_test 47a "pdirops: remote mkdir vs mkdir"
 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
@@ -2581,7 +2591,7 @@ run_test 47b "pdirops: remote mkdir vs create"
 
 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
@@ -2599,7 +2609,7 @@ run_test 47c "pdirops: remote mkdir vs link"
 
 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 &
@@ -2617,7 +2627,7 @@ run_test 47d "pdirops: remote mkdir vs unlink"
 
 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
@@ -2636,7 +2646,7 @@ run_test 47e "pdirops: remote mkdir and rename (tgt)"
 
 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 &
@@ -2656,7 +2666,7 @@ test_47g() {
        [ $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 &