From: Alexander Boyko Date: Wed, 24 Apr 2019 14:14:57 +0000 (-0400) Subject: LU-12219 obdfilter: changes PAGE_SIZE variable X-Git-Tag: 2.12.55~32 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=74632b8013ef1b307bb9ab3c73b7b3c5b46bb876;hp=85db9b258cfcab25eccec52ce45b838ed0df0404 LU-12219 obdfilter: changes PAGE_SIZE variable obdfilter-survey uses PAGE_SIZE in KBytes. After LU-11597 PAGE_SIZE exported from test-framework.sh in bytes. So it confuses obdfilter-survey and lead to error: /usr/bin/obdfilter-survey: line 509: size * 1024 / (actual_rsz * thr): division by 0 (error token is ")") Patch changes the name to PAGE_SIZE_KB. Fixes: f602b5ec7f4 ("LU-11597 tests: fix O_DIRECT test usage for ARM") Test-Parameters: trivial testlist=obdfilter-survey Signed-off-by: Alexander Boyko Cray-bug-id: LUS-7214 Change-Id: Ie8be852c9634569c59a770ba49c3d1c36f53fdb2 Reviewed-on: https://review.whamcloud.com/34754 Reviewed-by: Elena Gryaznova Reviewed-by: Andreas Dilger Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Oleg Drokin --- diff --git a/lustre-iokit/obdfilter-survey/obdfilter-survey b/lustre-iokit/obdfilter-survey/obdfilter-survey index 382db0c..adb5b6b 100755 --- a/lustre-iokit/obdfilter-survey/obdfilter-survey +++ b/lustre-iokit/obdfilter-survey/obdfilter-survey @@ -310,8 +310,8 @@ restart_thr=1 restart_nobj=1 # machine's page size (KB) -PAGE_SIZE=${PAGE_SIZE:-$(($(getconf PAGE_SIZE) / 1024))} -PAGE_SIZE=${PAGE_SIZE:-4} +PAGE_SIZE_KB=${PAGE_SIZE_KB:-$(( ${PAGE_SIZE:-$(getconf PAGE_SIZE)} / 1024))} +PAGE_SIZE_KB=${PAGE_SIZE_KB:-4} snap=1 clean_srv_OSS=0 @@ -504,8 +504,8 @@ for ((rsz = $rszlo; rsz <= $rszhi; rsz*=2)); do # compute parameters total_thr=$((ndevs * thr)) total_nobj=$((ndevs * nobj)) - pages=$((rsz / PAGE_SIZE)) - actual_rsz=$((pages * PAGE_SIZE)) + pages=$(( (rsz + PAGE_SIZE_KB - 1) / PAGE_SIZE_KB)) + actual_rsz=$((pages * PAGE_SIZE_KB)) count=$((size * 1024 / (actual_rsz * thr))) actual_size=$((actual_rsz * count * thr)) total_size=$((actual_size * ndevs))