WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] xl block-attach

To: Ian Campbell <Ian.Campbell@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] xl block-attach
From: Kamala Narasimhan <kamala.narasimhan@xxxxxxxxx>
Date: Mon, 31 Jan 2011 11:45:54 -0500
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Mon, 31 Jan 2011 08:46:41 -0800
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=Y+3FcSkWCx2FSX2BzQM+lfJVSTjgMZQVoKgiDzEqfas=; b=lZjrPmWxPxZ6bOWyLvixurwF5Mb244nZ7XfCCO3ghoigyCzyL/EjApopL6JpQ0oB88 niwesP0VPiJlNcpOBiAfJn+pw0Bucmei6Bxw8rgMq72lfS/3UsWtKKtouMxI+Az1vmDD /3173zA9rZ4Ll3OBcD+JYSo1Gs+7EnDSdHWYI=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=as5pL2JpThE800cAZGP4dbk948AN0IRh2A1biQjFPg4suG+RWTnCZnvsjc2+WisFut p4kuwuLLVS1T+48GZWc4IARf2rr2JsDiUpeukraqGDYLmQB/HmtiMoS1xuO5bkhyhWeM l2ZGhiGP6LNKxnMhOtIRWQAzaxGHE13prb99c=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1296487379.4037.67.camel@xxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <4D45C257.3060702@xxxxxxxxx> <1296485964.4037.65.camel@xxxxxxxxxxxxxxxxxxxxxx> <4D46D0E9.8030605@xxxxxxxxx> <1296487379.4037.67.camel@xxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 2.0.0.24 (X11/20101027)
Ian Campbell wrote:
> On Mon, 2011-01-31 at 15:10 +0000, Kamala Narasimhan wrote:
> What are the syntaxes and how are they different? I was under the
> impression that (roughly speaking) the comma separated stuff in the
> config file simply became the individual arguments to block-attach, is
> that not the case?
>

Kind of but not quite.

Here is what I get from block-attach help (both xl/xm return the same btw) -

*********

Usage: xl [-v] block-attach <Domain> <BackDev> <FrontDev> [<Mode>] [BackDomain]

Create a new virtual block device.

*********

>From the above it is not very evident what is acceptable for BackDev and
FrontDev.  So I looked at the code that parses these input (in xl).  It takes
backdev and looks for pdev type ('phy' or 'file' or 'tap') and if tap, looks for
'aio' or 'vhd' or 'qcow' or 'qcow2' (here it is mixing format with backend impl
type) followed by pdev path.    It then takes frontdev and interprets it to be
vdev path and then it interprets mode to be read or write attribute.

We could still keep the higher level arguments as is but our parser could
interpret BackDev and FrontDev values the way it does for config file option.
The way I have refactored the disk config parsing code (by dividing it into
pdev/vdev/attrib chunks for parsing, we can simply reuse that parsing code in
block-attach too!

Kamala



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>