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

[Xen-devel] [PATCH OSSTEST v2 2/8] TestSupport: Use lv_dev_mapper in guest_find_lv



This has the effect of switching $gho->{Lvdev} from /dev/$VG/$LV to
/dev/mapper/$VG-$LV (where $VG and $LV have an s/-/--/ transformation
applied).

The two paths point to the samedevice and most call sites don't care
about the distinction. Some places which use "kpartx $dev" to Lvdev
expect to be able to append a partition number to $dev, while kpartx
only creates the /dev/mapper form, meaning such places cannot use
Lvdev. By making this switch we allow these places (such as
ts-freebsd-install) to use kpartx.

The only other place I'm aware of which requires one form or the other
is the Debian initramfs code which expects root=/dev/mapper/vg-lv and
does not accept /dev/vg/lv. However this is already handled correctly.

Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
Acked-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---
v2: New(ish, posted in reply to v1)
---
 Osstest/TestSupport.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm
index 09694f4..d8c5762 100644
--- a/Osstest/TestSupport.pm
+++ b/Osstest/TestSupport.pm
@@ -1398,7 +1398,7 @@ sub guest_find_lv ($) {
     $gho->{Vg}= $r{"${gn}_vg"};
     $gho->{Lv}= $r{"${gn}_disk_lv"};
     $gho->{Lvdev}= (defined $gho->{Vg} && defined $gho->{Lv})
-        ? '/dev/'.$gho->{Vg}.'/'.$gho->{Lv} : undef;
+        ? lv_dev_mapper($gho->{Vg},$gho->{Lv}) : undef;
 }
 
 sub guest_find_diskimg($)
-- 
2.5.3


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