[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [OSSTest Nested v12 20/21] Don't lvextend if actually no more space to extend



Though passes if judgement, the
        overall_limit_pe(\$vg_more_free_pe);
may final judge no more free_pe to extend.
So, check if $vg_more_free_pe is 0, if so, we don't lvextend,
otherwise lvextend will report error on nonsense operation.

Signed-off-by: Robert Ho <robert.hu@xxxxxxxxx>
---
 ts-xen-build-prep | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/ts-xen-build-prep b/ts-xen-build-prep
index 03ad35c..d3f9d01 100755
--- a/ts-xen-build-prep
+++ b/ts-xen-build-prep
@@ -155,7 +155,8 @@ sub lvextend1 ($$$) {
         logm("$what: unstriped $vg_more_free_pe PEs");
         overall_limit_pe(\$vg_more_free_pe);
         $more_pe += $vg_more_free_pe;
-        target_cmd_root($ho, "lvextend -i1 -l +$vg_more_free_pe $lv");
+        target_cmd_root($ho, "lvextend -i1 -l +$vg_more_free_pe $lv")
+               if $vg_more_free_pe != 0;
     }
 
     my $timeout = 2000 + int($pe_size * 0.000003 * $more_pe);
-- 
1.8.3.1


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.