Message ID | 1456428318-8318-2-git-send-email-roger.pau@citrix.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Thu, Feb 25, 2016 at 08:25:12PM +0100, Roger Pau Monne wrote: > FreeBSD blkback uses the physical-device xenstore node in order to fetch the > path to the underlying backing storage (either a block device or raw image). > This node is set by the hotplug scripts. > > Signed-off-by: Roger Pau Monné <roger.pau@citrix.com> > --- > Cc: Ian Campbell <ian.campbell@citrix.com> > Cc: Ian Jackson <ian.jackson@eu.citrix.com> > Cc: Jan Beulich <jbeulich@suse.com> > Cc: Tim Deegan <tim@xen.org> > --- > xen/include/public/io/blkif.h | 16 ++++++++++------ > 1 file changed, 10 insertions(+), 6 deletions(-) > > diff --git a/xen/include/public/io/blkif.h b/xen/include/public/io/blkif.h > index 99f0326..9a5baa4 100644 > --- a/xen/include/public/io/blkif.h > +++ b/xen/include/public/io/blkif.h > @@ -89,14 +89,18 @@ > * Values: string > * > * A free formatted string providing sufficient information for the > - * backend driver to open the backing device. (e.g. the path to the > - * file or block device representing the backing store.) > + * hotplug script to attach the device and provide a suitable > + * handler (ie: a block device) for blkback to use. > * > - * physical-device > - * Values: "MAJOR:MINOR" > + * physical-device: > + * Values: OS specific > * > - * MAJOR and MINOR are the major number and minor number of the > - * backing device respectively. > + * A free formatted string that contains the OS specific path to the > + * backing device for this blkback instance. > + * > + * Linux and NetBSD encode the block device major and minor numbers using > + * the following printf format: "%x:%x", while FreeBSD places the path to > + * the file or device in the filesystem. I think this is a sensible approach FWIW. Wei. > * > * type > * Values: "file", "phy", "tap" > -- > 2.5.4 (Apple Git-61) > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xen.org > http://lists.xen.org/xen-devel
Roger Pau Monne writes ("[PATCH v2 1/7] blkif: document how FreeBSD uses the physical-device backend node"): > FreeBSD blkback uses the physical-device xenstore node in order to fetch the > path to the underlying backing storage (either a block device or raw image). > This node is set by the hotplug scripts. I think it is undesirable that the interface to hotplug scripts would be platform-specific. I would prefer it if hotplug scripts always produced a path, and libxl were responsible for converting it into a major/minor if required. (libxl already has to have platform-specific code to drive its driver domain's blkback). This would be a change to the hotplug script protocol but I think it can be done in a backward-compatible way. What do you think ? (This is related to the conversation you and George had on irc.) Ian.
diff --git a/xen/include/public/io/blkif.h b/xen/include/public/io/blkif.h index 99f0326..9a5baa4 100644 --- a/xen/include/public/io/blkif.h +++ b/xen/include/public/io/blkif.h @@ -89,14 +89,18 @@ * Values: string * * A free formatted string providing sufficient information for the - * backend driver to open the backing device. (e.g. the path to the - * file or block device representing the backing store.) + * hotplug script to attach the device and provide a suitable + * handler (ie: a block device) for blkback to use. * - * physical-device - * Values: "MAJOR:MINOR" + * physical-device: + * Values: OS specific * - * MAJOR and MINOR are the major number and minor number of the - * backing device respectively. + * A free formatted string that contains the OS specific path to the + * backing device for this blkback instance. + * + * Linux and NetBSD encode the block device major and minor numbers using + * the following printf format: "%x:%x", while FreeBSD places the path to + * the file or device in the filesystem. * * type * Values: "file", "phy", "tap"
FreeBSD blkback uses the physical-device xenstore node in order to fetch the path to the underlying backing storage (either a block device or raw image). This node is set by the hotplug scripts. Signed-off-by: Roger Pau Monné <roger.pau@citrix.com> --- Cc: Ian Campbell <ian.campbell@citrix.com> Cc: Ian Jackson <ian.jackson@eu.citrix.com> Cc: Jan Beulich <jbeulich@suse.com> Cc: Tim Deegan <tim@xen.org> --- xen/include/public/io/blkif.h | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-)