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] [PATCH 7/9] libxl: disks: allow specification of "backen

To: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH 7/9] libxl: disks: allow specification of "backendtype=phy|tap|qdisk"
From: Ian Campbell <Ian.Campbell@xxxxxxxxxx>
Date: Fri, 3 Jun 2011 11:27:01 +0100
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Fri, 03 Jun 2011 03:27:53 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1307037346-31251-8-git-send-email-ian.jackson@xxxxxxxxxxxxx>
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>
Organization: Citrix Systems, Inc.
References: <1307037346-31251-1-git-send-email-ian.jackson@xxxxxxxxxxxxx> <1307037346-31251-2-git-send-email-ian.jackson@xxxxxxxxxxxxx> <1307037346-31251-3-git-send-email-ian.jackson@xxxxxxxxxxxxx> <1307037346-31251-4-git-send-email-ian.jackson@xxxxxxxxxxxxx> <1307037346-31251-5-git-send-email-ian.jackson@xxxxxxxxxxxxx> <1307037346-31251-6-git-send-email-ian.jackson@xxxxxxxxxxxxx> <1307037346-31251-7-git-send-email-ian.jackson@xxxxxxxxxxxxx> <1307037346-31251-8-git-send-email-ian.jackson@xxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Thu, 2011-06-02 at 18:55 +0100, Ian Jackson wrote:
> Signed-off-by: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
> ---
>  docs/misc/xl-disk-configuration.txt |   17 +
>  tools/libxl/libxlu_disk_l.c         |  690 
> +++++++++++++++++++----------------
>  tools/libxl/libxlu_disk_l.h         |    2 +-
>  tools/libxl/libxlu_disk_l.l         |    9 +
>  4 files changed, 395 insertions(+), 323 deletions(-)
> 
> diff --git a/docs/misc/xl-disk-configuration.txt 
> b/docs/misc/xl-disk-configuration.txt
> index de0a75e..91e0cc7 100644
> --- a/docs/misc/xl-disk-configuration.txt
> +++ b/docs/misc/xl-disk-configuration.txt
> @@ -139,6 +139,23 @@ cdrom
>  Convenience alias for "devtype=cdrom".
> 
> 
> +backendtype=<backend-type>
> +--------------------------
> +
> +Description:           Specifies the backend implementation to use
> +Supported values:      phy, tap, qdisk
> +Mandatory:             No
> +Default value:         Automatically determine which backend to use.
> +
> +This does not affect the guest's view of the device.  It controls
> +which software implementation of the Xen backend driver us used.
> +
> +Not all backend drivers support all combinations of other options.
> +For example, "phy" does not support formats other than "raw".
> +Normally this option should not be specified, in which case libxl will
> +automatically determine the most suitable backend.

The deprecated prefixes ("tapdisk:", "phy:" etc) are explicitly not
aliases for any of these, right?

In any case...
Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx>

Not really related to this patch but it occurs to me that there probably
ought to be backend types for the non-Linux dom0, e.g. *BSD backendd.

Ian.

> +
> +
>  script=<script>
>  ---------------
...
> diff --git a/tools/libxl/libxlu_disk_l.l b/tools/libxl/libxlu_disk_l.l
> index 48a1314..e9d43c9 100644
> --- a/tools/libxl/libxlu_disk_l.l
> +++ b/tools/libxl/libxlu_disk_l.l
> @@ -100,6 +100,14 @@ static void setformat(DiskParseContext *dpc, const char 
> *str) {
>      else xlu__disk_err(dpc,str,"unknown value for format");
>  }
> 
> +/* Sets ->backend from the string.  IDL should provide something for this. */
> +static void setbackendtype(DiskParseContext *dpc, const char *str) {
> +    if (     !strcmp(str,"phy"))   DSET(dpc,backend,BACKEND,str,PHY);
> +    else if (!strcmp(str,"tap"))   DSET(dpc,backend,BACKEND,str,TAP);
> +    else if (!strcmp(str,"qdisk")) DSET(dpc,backend,BACKEND,str,QDISK);
> +    else xlu__disk_err(dpc,str,"unknown value for backendtype");
> +}
> +
>  #define DEPRECATE(usewhatinstead) /* not currently reported */
> 
>  %}
> @@ -131,6 +139,7 @@ devtype=disk,?      { DPC->disk->is_cdrom = 0; }
>  devtype=[^,]*,?        { xlu__disk_err(DPC,yytext,"unknown value for type"); 
> }
> 
>  access=[^,]*,? { STRIP(','); setaccess(DPC, FROMEQUALS); }
> +backendtype=[^,]*? { STRIP(','); setbackendtype(DPC,yytext); }
> 
>  vdev=[^,]*,?   { STRIP(','); SAVESTRING("vdev", vdev, FROMEQUALS); }
>  script=[^,]*,? { STRIP(','); SAVESTRING("script", script, FROMEQUALS); }
> --
> 1.5.6.5
> 
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel



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

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