xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Ian Campbell <ian.campbell@citrix.com>
To: ian.jackson@eu.citrix.com, xen-devel@lists.xen.org
Cc: Ian Campbell <ian.campbell@citrix.com>
Subject: [PATCH OSSTEST v2 2/8] TestSupport: Use lv_dev_mapper in guest_find_lv
Date: Tue, 6 Oct 2015 13:47:00 +0100	[thread overview]
Message-ID: <1444135626-1771-2-git-send-email-ian.campbell@citrix.com> (raw)
In-Reply-To: <1444135606.5302.145.camel@citrix.com>

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@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
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

  parent reply	other threads:[~2015-10-06 12:47 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-06 12:46 [PATCH OSSTEST v2 0/8] Fixes for switching to Jessie as base OS for test hosts Ian Campbell
2015-10-06 12:46 ` [PATCH OSSTEST v2 1/8] Debian: uboot: Use di_vg_name() and lv_dev_mapper() for root= Ian Campbell
2015-10-06 12:47 ` Ian Campbell [this message]
2015-10-06 12:47 ` [PATCH OSSTEST v2 3/8] ts-freebsd-install: Use $gho->{Lvdev} instead of target_guest_lv_name Ian Campbell
2015-10-06 12:47 ` [PATCH OSSTEST v2 4/8] TestSupport: Remove now unused target_guest_lv_name Ian Campbell
2015-10-06 12:47 ` [PATCH OSSTEST v2 5/8] ts-kernel-build: Explicitly enable CONFIG_CGROUPS Ian Campbell
2015-10-06 15:05   ` Ian Jackson
2015-10-06 15:19     ` Ian Campbell
2015-10-06 15:32       ` Ian Jackson
2015-10-06 12:47 ` [PATCH OSSTEST v2 6/8] ts-debian-di-install: Use correct per-arch name for kernel Ian Campbell
2015-10-06 15:15   ` Ian Jackson
2015-10-06 12:47 ` [PATCH OSSTEST v2 7/8] ts-freebsd-install: Pass -s option to kpartx Ian Campbell
2015-10-06 15:16   ` Ian Jackson
2015-10-06 15:39     ` Ian Campbell
2015-10-06 12:47 ` [PATCH OSSTEST v2 8/8] Switch to Debian 8.0 (jessie) as OS for test hosts Ian Campbell
2015-10-08 16:17 ` [PATCH OSSTEST v2 0/8] Fixes for switching to Jessie as base " Ian Campbell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1444135626-1771-2-git-send-email-ian.campbell@citrix.com \
    --to=ian.campbell@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).