Whamcloud - gitweb
LU-2194 test: avoid wrong eviction in recovery_small
authorHongchao Zhang <hongchao.zhang@intel.com>
Fri, 8 Feb 2013 21:24:48 +0000 (05:24 +0800)
committerOleg Drokin <oleg.drokin@intel.com>
Mon, 18 Mar 2013 22:52:59 +0000 (18:52 -0400)
in subtest 19a and 19b of recovery_small, the locks from OST/MDT
should be cancelled before "drop_ldlm_cancel" to avoid wrong eviction
from OST/MDT for it will also drop its lock cancellation request.

Change-Id: I49d1d189f6791224a3f132dc8cf2dd8b3d51d43e
Signed-off-by: Hongchao Zhang <hongchao.zhang@intel.com>
Reviewed-on: http://review.whamcloud.com/5679
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Tested-by: Hudson
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/tests/recovery-small.sh

index c2cbac1..9641565 100755 (executable)
@@ -415,6 +415,9 @@ test_19a() {
 
        mount_client $DIR2 || error "failed to mount $DIR2"
 
+       # cancel cached locks from OST to avoid eviction from it
+       cancel_lru_locks osc
+
        do_facet client "stat $DIR > /dev/null"  ||
                error "failed to stat $DIR: $?"
        drop_ldlm_cancel "chmod 0777 $DIR2" ||
@@ -439,6 +442,9 @@ test_19b() {
 
        mount_client $DIR2 || error "failed to mount $DIR2: $?"
 
+       # cancel cached locks from MDT to avoid eviction from it
+       cancel_lru_locks mdc
+
        do_facet client $MULTIOP $DIR/$tfile Ow ||
                error "failed to run multiop: $?"
        drop_ldlm_cancel $MULTIOP $DIR2/$tfile Ow ||