From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [OSSTEST PATCH 18/26] LVM: Break out lv_create Date: Mon, 12 Oct 2015 09:49:15 +0100 Message-ID: <1444639755.1410.441.camel@citrix.com> References: <1443181028-22705-1-git-send-email-ian.jackson@eu.citrix.com> <1443208522-24905-1-git-send-email-ian.jackson@eu.citrix.com> <1443208522-24905-10-git-send-email-ian.jackson@eu.citrix.com> <9E79D1C9A97CFD4097BCE431828FDD31F3FBBB@SHSMSX103.ccr.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1ZlYnI-0005xD-2t for xen-devel@lists.xenproject.org; Mon, 12 Oct 2015 08:49:20 +0000 In-Reply-To: <9E79D1C9A97CFD4097BCE431828FDD31F3FBBB@SHSMSX103.ccr.corp.intel.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: "Hu, Robert" , Ian Jackson , "xen-devel@lists.xenproject.org" List-Id: xen-devel@lists.xenproject.org On Mon, 2015-10-12 at 07:42 +0000, Hu, Robert wrote: > > -----Original Message----- > > From: Ian Jackson [mailto:ian.jackson@eu.citrix.com] > > Sent: Saturday, September 26, 2015 3:15 AM > > To: xen-devel@lists.xenproject.org > > Cc: Hu, Robert ; Ian Campbell > > ; Ian Jackson ; Ian > > Jackson > > Subject: [OSSTEST PATCH 18/26] LVM: Break out lv_create > > > > We are going to want to reuse this. > > > > Signed-off-by: Ian Jackson > > --- > > v14: New patch > > --- > > Osstest/TestSupport.pm | 15 +++++++++++---- > > 1 file changed, 11 insertions(+), 4 deletions(-) > > > > diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm > > index ad017a4..2d1db5d 100644 > > --- a/Osstest/TestSupport.pm > > +++ b/Osstest/TestSupport.pm > > @@ -62,7 +62,7 @@ BEGIN { > > target_install_packages > > target_install_packages_norec > > target_jobdir target_extract_jobdistpath_subdir > > target_extract_jobdistpath > > - lv_dev_mapper target_guest_lv_name > > + lv_create lv_dev_mapper target_guest_lv_name > 'target_guest_lv_name' seems lacking in my work directory. Would you > double check if it is in production tree? I checked, seems not. It was dropped from the production version over the weekend due to my patch from [0] landing. The previous production was 24d79ce9cbde907c7907b3d24bd96d9642953d40, so if you are unable to resolve the conflict yourself this might be a better baseline until Ian can rebase. Ian. [0] http://lists.xen.org/archives/html/xen-devel/2015-10/msg00596.html > > > > poll_loop tcpconnect await_tcp > > contents_make_cpio > > file_simple_write_contents > > @@ -702,6 +702,15 @@ sub poll_loop ($$$&) { > > logm("$what: ok. (${waited}s)"); > > } > > > > +sub lv_create ($$$) { > > + my ($ho, $vg, $lv, $mb) = @_; > > + my $lvdev = "/dev/$lv/$vg"; > > + target_cmd_root($ho, "lvremove -f $lvdev ||:"); > > + target_cmd_root($ho, "lvcreate -L ${mb}M -n $lv $vg"); > > + target_cmd_root($ho, "dd if=/dev/zero of=$lvdev count=10"); > > + return $lvdev; > > +} > > + > > sub lv_dev_mapper ($$) { > > my ($vg,$lv) = @_; > > $vg =~ s/-/--/g; > > @@ -1685,9 +1694,7 @@ sub prepareguest ($$$$$$) { > > > > sub prepareguest_part_lvmdisk ($$$) { > > my ($ho, $gho, $disk_mb) = @_; > > - target_cmd_root($ho, "lvremove -f $gho->{Lvdev} ||:"); > > - target_cmd_root($ho, "lvcreate -L ${disk_mb}M -n $gho->{Lv} > > $gho->{Vg}"); > > - target_cmd_root($ho, "dd if=/dev/zero of=$gho->{Lvdev} count=10"); > > + lvm_lv_create($ho, $gho->{Vg}, $gho->{Lv}, $disk_mb); > > } > > > > sub make_vhd ($$$) { > > -- > > 1.7.10.4 >