[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 7/9] libxl: disks: allow specification of "backendtype=phy|tap|qdisk"
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
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |