All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kamala Narasimhan <kamala.narasimhan@gmail.com>
To: Ian Campbell <Ian.Campbell@eu.citrix.com>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Subject: Re: xl block-attach
Date: Mon, 31 Jan 2011 11:45:54 -0500	[thread overview]
Message-ID: <4D46E742.7070606@gmail.com> (raw)
In-Reply-To: <1296487379.4037.67.camel@zakaz.uk.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

  reply	other threads:[~2011-01-31 16:45 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-30 19:56 xl block-attach Kamala Narasimhan
2011-01-31 14:59 ` Ian Campbell
2011-01-31 15:10   ` Kamala Narasimhan
2011-01-31 15:22     ` Ian Campbell
2011-01-31 16:45       ` Kamala Narasimhan [this message]
2011-01-31 17:03         ` 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=4D46E742.7070606@gmail.com \
    --to=kamala.narasimhan@gmail.com \
    --cc=Ian.Campbell@eu.citrix.com \
    --cc=xen-devel@lists.xensource.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.