From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Jackson Subject: Re: [OSSTest Nested v12 20/21] Don't lvextend if actually no more space to extend Date: Tue, 22 Sep 2015 17:05:01 +0100 Message-ID: <22017.31789.280614.710463@mariner.uk.xensource.com> References: <1440774490-16725-1-git-send-email-robert.hu@intel.com> <1440774490-16725-21-git-send-email-robert.hu@intel.com> <22009.31835.658085.403421@mariner.uk.xensource.com> <1442937374.10338.186.camel@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1442937374.10338.186.camel@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell Cc: Robert Ho , gordon.jin@intel.com, wei.liu2@citrix.com, di.zheng@intel.com, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org Ian Campbell writes ("Re: [OSSTest Nested v12 20/21] Don't lvextend if actually no more space to extend"): > On Wed, 2015-09-16 at 15:27 +0100, Ian Jackson wrote: > > I think this should be done by moving the start of the if block to > > after overall_limit_pe. That would avoid a tested if (and various > > other slight anomalies). > > IOW move the overall_limit_pe outside the if? > > Like so: > > diff --git a/ts-xen-build-prep b/ts-xen-build-prep > index 03ad35c..b35e91b 100755 > --- a/ts-xen-build-prep > +++ b/ts-xen-build-prep > @@ -151,9 +151,9 @@ sub lvextend1 ($$$) { > > $do_limit_pe->(\$vg_more_free_pe, 'unstriped'); > > + overall_limit_pe(\$vg_more_free_pe); > if ($vg_more_free_pe) { > 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"); > } > > (untested, but I've just tripped over this in a standalone run myself). Yes. With a suitable commit message: Acked-by: Ian Jackson