From: Bobi Jam Date: Tue, 27 Sep 2016 01:22:20 +0000 (+0800) Subject: LU-8413 llite: specify READA debug mask for sanity_101f X-Git-Tag: 2.8.59~11 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=refs%2Fchanges%2F53%2F22753%2F4;p=fs%2Flustre-release.git LU-8413 llite: specify READA debug mask for sanity_101f So that debug log only contains relevant messages for debugging purpose. Test-Parameters: trivial Signed-off-by: Bobi Jam Change-Id: Ia02e6ed41a3a2166dcf6b04441027517594bb35d Reviewed-on: http://review.whamcloud.com/22753 Reviewed-by: Andreas Dilger Tested-by: Jenkins Reviewed-by: Fan Yong Tested-by: Maloo Reviewed-by: Oleg Drokin --- diff --git a/lustre/llite/rw.c b/lustre/llite/rw.c index 00ae698..761dd04 100644 --- a/lustre/llite/rw.c +++ b/lustre/llite/rw.c @@ -737,6 +737,9 @@ static void ras_update(struct ll_sb_info *sbi, struct inode *inode, spin_lock(&ras->ras_lock); + if (!hit) + CDEBUG(D_READA, DFID " pages at %lu miss.\n", + PFID(ll_inode2fid(inode)), index); ll_ra_stats_inc_sbi(sbi, hit ? RA_STAT_HIT : RA_STAT_MISS); /* reset the read-ahead window in two cases. First when the app seeks diff --git a/lustre/tests/sanity.sh b/lustre/tests/sanity.sh index ca79475..f8478a2 100755 --- a/lustre/tests/sanity.sh +++ b/lustre/tests/sanity.sh @@ -6715,6 +6715,9 @@ run_test 101e "check read-ahead for small read(1k) for small files(500k)" test_101f() { which iozone || { skip "no iozone installed" && return; } + local old_debug=$($LCTL get_param debug) + $LCTL set_param debug="reada mmap" + # create a test file iozone -i 0 -+n -r 1m -s 128m -w -f $DIR/$tfile > /dev/null 2>&1 @@ -6728,10 +6731,12 @@ test_101f() { iozone -i 1 -+n -r 32k -s 128m -B -f $DIR/$tfile > /dev/null 2>&1 echo checking missing pages + $LCTL get_param llite.*.read_ahead_stats local miss=$($LCTL get_param -n llite.*.read_ahead_stats | get_named_value 'misses' | cut -d" " -f1 | calc_total) - [ $miss -lt 3 ] || error "misses too much pages!" + $LCTL set_param debug=$old_debug + [ $miss -lt 3 ] || error "misses too much pages ('$miss')!" rm -f $DIR/$tfile } run_test 101f "check mmap read performance"