By adding a delay between lock cancel and stat, it can avoid the
problem that the locks are still held by ldlm lock thread while
'cancel_lru_locks osc' is called.
Test-Parameters: trivial envdefinitions="ONLY=120e" testlist=sanity,sanity,sanity,sanity,sanity,sanity,sanity,sanity,sanity,sanity
Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: I2095cb1df05ff45c2671edaed5a61bcdd4a56266
Reviewed-on: https://review.whamcloud.com/24811
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
stat $DIR/$tdir $DIR/$tdir/f1 > /dev/null
# XXX client can not do early lock cancel of OST lock
# during unlink (LU-4206), so cancel osc lock now.
stat $DIR/$tdir $DIR/$tdir/f1 > /dev/null
# XXX client can not do early lock cancel of OST lock
# during unlink (LU-4206), so cancel osc lock now.
cancel_lru_locks osc
can1=$(do_facet $SINGLEMDS \
"$LCTL get_param -n ldlm.services.ldlm_canceld.stats" |
cancel_lru_locks osc
can1=$(do_facet $SINGLEMDS \
"$LCTL get_param -n ldlm.services.ldlm_canceld.stats" |
stat $DIR/$tdir/d1 $DIR/$tdir/d2 $DIR/$tdir/d1/f1 $DIR/$tdir/d2/f2 > /dev/null
# XXX client can not do early lock cancel of OST lock
# during rename (LU-4206), so cancel osc lock now.
stat $DIR/$tdir/d1 $DIR/$tdir/d2 $DIR/$tdir/d1/f1 $DIR/$tdir/d2/f2 > /dev/null
# XXX client can not do early lock cancel of OST lock
# during rename (LU-4206), so cancel osc lock now.
cancel_lru_locks osc
can1=$(do_facet $SINGLEMDS \
"$LCTL get_param -n ldlm.services.ldlm_canceld.stats" |
cancel_lru_locks osc
can1=$(do_facet $SINGLEMDS \
"$LCTL get_param -n ldlm.services.ldlm_canceld.stats" |