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

Re: [Xen-devel] xl block-attach


  • To: Ian Campbell <Ian.Campbell@xxxxxxxxxxxxx>
  • 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
  • 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=
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.