<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  <title></title>
</head>
<body text="#000066" bgcolor="#ffffcc">
<tt>Signed-off-by: Marcos Matsunaga <a class="moz-txt-link-rfc2396E" href="mailto:Marcos.Matsunaga@oracle.com">&lt;Marcos.Matsunaga@oracle.com&gt;</a></tt>
<pre class="moz-signature" cols="72">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.”
</pre>
<br>
On 03/16/2010 03:10 AM, Tristan Ye wrote:
<blockquote
 cite="mid:1268723421-24872-1-git-send-email-tristan.ye@oracle.com"
 type="cite">
  <pre wrap="">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 <a class="moz-txt-link-rfc2396E" href="mailto:tristan.ye@oracle.com">&lt;tristan.ye@oracle.com&gt;</a>
---
 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
  </pre>
</blockquote>
</body>
</html>