[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] OSSTest RFC: ts-xen-build-prep, lvextend1(), don't call lvextend if "-l 0"
On Fri, 2015-08-14 at 03:54 +0000, Hu, Robert wrote: > Hi, > > lvextend will report error if doing with "-l 0". > So I propose to add an judgment regarding $vg_more_free_pe. > > diff --git a/ts-xen-build-prep b/ts-xen-build-prep > index 9a3b523..f1d1255 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; > } In my tree at least the } is closing a "if ($vg_more_free_pe)". Perhaps it would make more sense to extend that to also check for ? 0? if (($vg_more_free_pe//0) > 0) is probably nicer than if ($vg_more_free_pe && $vg_more_free_pe > 0) I suppose. Or maybe add //0 to the my $vg_more_free_pe= $vginfo[15]; Ian. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |