[Ocfs2-test-devel] [PATCH 1/1] Ocfs2-test: Fix a minor bug in resize_test.sh

Tao Ma tao.ma at oracle.com
Sun Sep 6 20:22:45 PDT 2009


sob.

Tristan Ye wrote:
> Set the 'blk' variable with a maxinum block number when it's NULLed, then the
> following checking code therefore can perform checking and adjusting in a
> right way.
> 
> Signed-off-by: Tristan Ye <tristan.ye at oracle.com>
> ---
>  programs/resize_test/resize_test.sh |    3 +++
>  1 files changed, 3 insertions(+), 0 deletions(-)
> 
> diff --git a/programs/resize_test/resize_test.sh b/programs/resize_test/resize_test.sh
> index 26129fe..96915c2 100755
> --- a/programs/resize_test/resize_test.sh
> +++ b/programs/resize_test/resize_test.sh
> @@ -189,6 +189,9 @@ do_tunefs() {
>      if [ $? -eq 0 ]; then
>  	 g_size=`${DEBUGFS} -R "stat //global_bitmap" ${device} 2>/dev/null | awk '/Size:/ {print $8;}'`
>  	 blocks=$((${g_size}/${blocksz}))
> +	 if [ -z ${blk} ];then
> +		blk=${partsz}
> +	 fi
>  	 #In the case when blk number didn't align to cluster
>  	 if [ "$((${blk}%${bpc}))" != "0" ];then
>  		blk=$((${blk}+${bpc}-$((${blk}%${bpc}))))



More information about the Ocfs2-test-devel mailing list