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

Re: [Xen-devel] [OSSTEST PATCH 09/22] LVM: Break out lv_create



On Tue, 2015-11-10 at 19:53 +0000, Ian Jackson wrote:
>Â
> +sub lv_create ($$$$) {
> +ÂÂÂÂmy ($ho, $vg, $lv, $mb) = @_;
> +ÂÂÂÂmy $lvdev = "/dev/$vg/$lv";

In the original code it was using $gho->{Lvdev}, is this semantic change
deliberate or a rebase-o? If the former then I think it warrants a comment
in the commit message.

> +ÂÂÂÂ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;
> @@ -1692,9 +1701,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");
> +ÂÂÂÂlv_create($ho, $gho->{Vg}, $gho->{Lv}, $disk_mb);
> Â}
> Â
> Âsub make_vhd ($$$) {

_______________________________________________
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®.