From: Ian Campbell Subject: Re: [PATCH 10/14] docs: update xl-disk-configuration.txt to describe new syntax Date: Fri, 13 May 2011 13:45:47 +0100 Message-ID: <1305290747.31488.113.camel@zakaz.uk.xensource.com> References: <1305211004-31687-1-git-send-email-ian.jackson@eu.citrix.com> <1305211004-31687-2-git-send-email-ian.jackson@eu.citrix.com> <1305211004-31687-3-git-send-email-ian.jackson@eu.citrix.com> <1305211004-31687-4-git-send-email-ian.jackson@eu.citrix.com> <1305211004-31687-5-git-send-email-ian.jackson@eu.citrix.com> <1305211004-31687-6-git-send-email-ian.jackson@eu.citrix.com> <1305211004-31687-7-git-send-email-ian.jackson@eu.citrix.com> <1305211004-31687-8-git-send-email-ian.jackson@eu.citrix.com> <1305211004-31687-9-git-send-email-ian.jackson@eu.citrix.com> <1305211004-31687-10-git-send-email-ian.jackson@eu.citrix.com> <1305211004-31687-11-git-send-email-ian.jackson@eu.citrix.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-UJDhwPfbFZ7RiBVOwlvZ" Return-path: In-Reply-To: <1305211004-31687-11-git-send-email-ian.jackson@eu.citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Ian Jackson Cc: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org --=-UJDhwPfbFZ7RiBVOwlvZ Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Since this is a bit of a total rewrite I've attached the patched up version of the file too for other people's convenience since the diff itself is almost unusable, hence I have snipped most of the - lines in the diff before commenting on the + bits. On Thu, 2011-05-12 at 15:36 +0100, Ian Jackson wrote: > --- > docs/misc/xl-disk-configuration.txt | 221 +++++++++++++++++++--------------- > 1 files changed, 123 insertions(+), 98 deletions(-) > > diff --git a/docs/misc/xl-disk-configuration.txt b/docs/misc/xl-disk-configuration.txt > index 58332a9..90ba54e 100644 > --- a/docs/misc/xl-disk-configuration.txt > +++ b/docs/misc/xl-disk-configuration.txt > @@ -1,57 +1,99 @@ > + --------------------- > + XL DISK CONFIGURATION > + --------------------- > > +This document specifies the xl config file format disk configuration > +option. It the following form: In ? [...] > + disk = [ '', '', ... ] [...] > +where each diskspec is in this form: > + > + [=|flag]*, > + [, [, [, []]]], > + [=]*, > + [target=] The actual meaning of this is pretty opaque. The paragraphs following "More formally" does a pretty good job of describing it but I still have a few questions/misunderstandings. It's not obvious that the "[, [, [, []]]]," bit specifies the "positional parameters" (I'm assuming they do) nor is it mentioned in the text whether or not the positional parameters must be contiguous if used. Are you using "*" to mean "0 or 1 of the preceding element" as opposed to "0 or more of the preceding element", I initially read it as the second which confused me because it suggests that a valid syntax could be [=|flag][=|flag][=|flag], whereas I expected it would need to be [=|flag],[=|flag],[=|flag], is the placement of either the "," or the "*" wrong and/or did you mean "?" rather than "*"? > +===================== > +POSITIONAL PARAMETERS > +===================== > + > +target > +------ > + > +Description: Block device or image file path. For a > + physical block device a /dev will be prepended > when not specified and when the path doesn't > + start with a '/'. Won't we prepend a /dev/ for any path, regardless of whether it is a physical block device or an image file? Granted it's not likely to be all that useful in the second case but we can't really distinguish the two until too late. [...] > +Deprecated values are acceptable and are intended work compatibly with > +xend and xl from xen 4.1. In future they may print a warning. > +Support for deprecated parameters and syntaxes are likely to be > +dropped in future versions of xl. > > +There is also support for a deprecated old syntax for : > > + [:][],[:], (deprecated) > > +This syntax also supports deprecated prefixes, described below. These > +are found prepended to the format parameter - eg "tap:aio:qcow:". Are valid s a fixed list of existing formats which will not be extended as list of supported formats grows in the future, IOW new formats will only be available via the format positional paramter? > > +: > +----------------- That tag doesn't appear anywhere in the syntax description, so it's not clear where it is allowable. I'd assume it was above if I didn't know any better... > +Description: Specifies the block device type. > +Supported values: phy,file, tap, tap2 ^ whitespace > > +: > +-------------- Spelled above? > +Description: Backend implementation option to choose from > + while accessing block device. > + Example: tap:aio:vhd:/path/to/file > +Supported values: 'aio', 'tapdisk', 'ioemu' > -- > 1.7.2.5 > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel --=-UJDhwPfbFZ7RiBVOwlvZ Content-Disposition: attachment; filename="xl-disk-configuration.txt" Content-Type: text/plain; name="xl-disk-configuration.txt"; charset="UTF-8" Content-Transfer-Encoding: 7bit --------------------- XL DISK CONFIGURATION --------------------- This document specifies the xl config file format disk configuration option. It the following form: disk = [ '', '', ... ] where each diskspec is in this form: [=|flag]*, [, [, [, []]]], [=]*, [target=] For example, these strings are equivalent: /dev/vg/guest-volume,,hda /dev/vg/guest-volume,raw,hda,rw format=raw, vdev=xvda, access=rw, target=/dev/vg/guest-volume raw:/dev/vg/guest-volume,hda,w (deprecated, see below) As are these: /root/image.iso,,hdc,cdrom /root/image.iso,,hdc,,cdrom /root/image.iso,raw,hdc,devtype=cdrom format=raw, vdev=hdc, access=ro, devtype=cdrom, target=/root/image.iso raw:/root/image.iso,hdc:cdrom,ro (deprecated, see below) These might be specified in the domain config file like this: disk = [ '/dev/vg/guest-volume,,hda', '/root/image.iso,,hdc,cdrom' ] More formally, the string is a series of comma-separated keyword/value pairs, flags and positional parameters. Parameters which are not bare keywords and which do not contain "=" symbols are assigned to the so-far-unspecified positional parameters, in the order below. The positional parameters may also be specified explicitly by name. Each parameter may be specified at most once, either as a positional parameter or a named parameter. Default values apply if the parameter is not specified, or if it is specified with an empty value (whether positionally or explicitly). Whitespace may appear before each parameter and will be ignored. ===================== POSITIONAL PARAMETERS ===================== target ------ Description: Block device or image file path. For a physical block device a /dev will be prepended when not specified and when the path doesn't start with a '/'. Supported values: N/A Deprecated values: N/A Default value: None. While a path is provided in most cases there is an exception: for a cdrom device, lack of this attribute would imply an empty cdrom drive. Special syntax: When this parameter is specified by name, ie with the "target=" syntax in the configuration file, it consumes the whole rest of the . Therefore in that case it must come last. This is permissible even if an empty value for the target was already specifed as a positional parameter. This is the only way to specify a target string containing metacharacters such as commas and (in some cases) colons, which would otherwise be misinterpreted. Future parameter and flag names will start with an ascii letter and contain only ascii alphanumerics, hyphens and underscores, and will not be legal as vdevs. Targets which might match that syntax should not be specified as positional parameters. format ------ Description: Specifies the format of image file. Supported values: raw, qcow, qcow2, vhd Deprecated values: None Default value: raw vdev ---- Description: Virtual device as seen by the guest (also referred to as guest drive designation in some specifications). See docs/misc/vbd-interface.txt. Supported values: hd[x], xvd[x], sd[x] etc. Please refer to the above specification for further details. Deprecated values: None Default Value: None, this parameter is mandatory. access ------- Description: Specified access control information. Whether or not the block device is provided to the guest in read-only or read-write mode depends on this attribute. Supported values: ro, r (specifies read-only) rw, w (specifies read/write) Deprecated values: None Default value: rw unless devtype=cdrom, in which case r ========================== OTHER PARAMETERS AND FLAGS ========================== devtype= ----------------- Description: Qualifies virtual device type. Supported values: cdrom Deprecated values: None Mandatory: No cdrom ----- Convenience alias for "devtype=cdrom". script=