From a537c4ed5e3f8398f42241121ab18345260e2f29 Mon Sep 17 00:00:00 2001 From: fanyong Date: Wed, 30 Apr 2008 17:23:56 +0000 Subject: [PATCH] Branch b1_6 b=15691 i=huanghua i=tappro 1) Prevent "ll_sa_wrong" from being increased repeatedly when hit ratio is low. 2) Remount client before sanity 123a to eliminate previous test effect. --- lustre/llite/statahead.c | 3 ++- lustre/tests/sanity.sh | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lustre/llite/statahead.c b/lustre/llite/statahead.c index 2692b96..1e45dd9 100644 --- a/lustre/llite/statahead.c +++ b/lustre/llite/statahead.c @@ -908,7 +908,8 @@ void ll_statahead_exit(struct dentry *dentry, int result) sbi->ll_sa_miss++; sai->sai_miss++; sai->sai_consecutive_miss++; - if (sa_low_hit(sai)) { + if (sa_low_hit(sai) && + sai->sai_thread.t_flags & SVC_RUNNING) { sbi->ll_sa_wrong++; CDEBUG(D_READA, "statahead for dir %.*s hit " "ratio too low: hit/miss %u/%u, " diff --git a/lustre/tests/sanity.sh b/lustre/tests/sanity.sh index 0d37861..ddbb039 100644 --- a/lustre/tests/sanity.sh +++ b/lustre/tests/sanity.sh @@ -4643,6 +4643,7 @@ test_123a() { # was test 123, statahead(bug 11401) log "testing on UP system. Performance may be not as good as expected." fi + remount_client $MOUNT mkdir -p $DIR/$tdir error=0 NUMFREE=`df -i -P $DIR | tail -n 1 | awk '{ print $4 }'` -- 1.8.3.1