[Ocfs2-test-devel] [PATCH 1/2] Resize_test: Kill a deadloop case in resize_test.sh
Marcos E. Matsunaga
Marcos.Matsunaga at oracle.com
Tue Mar 16 08:10:55 PDT 2010
Signed-off-by: Marcos Matsunaga <Marcos.Matsunaga at oracle.com>
Regards,
Marcos Eduardo Matsunaga
Oracle USA
Linux Engineering
“The statements and opinions expressed here are my own and do not
necessarily represent those of Oracle Corporation.”
On 03/16/2010 03:10 AM, Tristan Ye wrote:
> Currently, resize_test will be running into a deadloop if our partition size
> didn't align with clustersize when growing the volumesize to the end of the
> partition, in that case, ${blocks} will never be equal to ${partsz}, which caused
> while loop endless.
>
> This patch attempts to kill this by checking the above case to break the loop.
>
> Signed-off-by: Tristan Ye <tristan.ye at oracle.com>
> ---
> programs/resize_test/resize_test.sh | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/programs/resize_test/resize_test.sh b/programs/resize_test/resize_test.sh
> index b779d97..bc483d1 100755
> --- a/programs/resize_test/resize_test.sh
> +++ b/programs/resize_test/resize_test.sh
> @@ -270,7 +270,7 @@ normal_resize_test() {
>
> do_fsck ${fsckout}
>
> - if [ $alldone -eq 1 ] || [ ${blocks} -eq 0 ] || [ ${blocks} -eq ${partsz} ]
> + if [ $alldone -eq 1 ] || [ ${blocks} -eq 0 ] || [ ${blocks} -eq ${partsz} ] || [ $((${blocks}+%{bpc})) -gt ${partsz} ]
> then
> break;
> fi
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://oss.oracle.com/pipermail/ocfs2-test-devel/attachments/20100316/df9e89dc/attachment.html
More information about the Ocfs2-test-devel
mailing list