All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ian Jackson <Ian.Jackson@eu.citrix.com>
To: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
	Ian Campbell <Ian.Campbell@citrix.com>
Subject: Re: [PATCH 5/6] libxl: introduce libxl__alloc_vdev
Date: Mon, 2 Apr 2012 17:15:49 +0100	[thread overview]
Message-ID: <20345.53429.51575.373166@mariner.uk.xensource.com> (raw)
In-Reply-To: <alpine.DEB.2.00.1203301556100.15151@kaball-desktop>

Stefano Stabellini writes ("Re: [Xen-devel] [PATCH 5/6] libxl: introduce libxl__alloc_vdev"):
> On Fri, 30 Mar 2012, Ian Jackson wrote:
> > Since we need to be able to allocate some vbds dynamically, the right
> > approach is to decree that some portion of the dom0 vbd space is
> > reserved for static allocations by the administrator, and that the
> > remainder is for dynamic allocations by software which picks a free
> > vbd.  Naturally the static space should come first.
> 
> When you hotplug a new disk on your system, for example a new USB disk
> to your native Linux box, usually Linux chooses the device name for
> you. I don't see why this should be any different.

It is different because Xen vbds do in practice appear in dom0 with a
stable name.  So this is something that people have reasonably come to
rely on.

> The admin is going to call instead:
>   xl block-attach 0
> and then checkout dmesg.

This is hardly automatable.  Doing the same thing with udev rules is
quite hard work.

> > I don't think that is true.  On each individual guest platform, the
> > relationship between vbd numbers (the actual interface between
> > frontend and backend), and whatever that guest has for device names,
> > needs to be statically defined.
> 
> I disagree: when we introduced docs/txt/misc/vbd-interface.txt we never
> specified what names the guest kernel is allowed to choose for a
> particular vbd encoding. See the following quote:
> 
> "The Xen interface does not specify what name a device should have in the
> guest (nor what major/minor device number it should have in the guest,
> if the guest has such a concept)."

This refers to the promises made by each side of the Xen VBD interface
to the corresponding other side.  The host's environment is not
allowed to assume things about the guest's device naming conventions.

However, that does not mean that the guest should not document its
naming conventions.  Perhaps this needs to be clarified in the
document.

> What I find confusing is that before you say that "the relationship
> between vbd numbers and whatever that guest has for device names needs
> to be statically defined", but then you say that "the device name in the
> guest is not written to xenstore anywhere.  It is private to the guest."

It is private to the guest and the guest administrator and the guest
documentation.  The guest is not required to notify the host of what
name it has chosen.  (And if it does choose a name that name might be
some crazy thing; imagine if the guest is MVS/370 or something.)

> Maybe we can slightly improve the situation moving libxl__alloc_vdev to
> an OS specific file so that we can have a Linux and a BSD implementation.

We only need a specific implementation of the final mapping from vbd
number to guest-specific device name.

Ian.

  reply	other threads:[~2012-04-02 16:15 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-27 13:58 [PATCH 0/6] qdisk local attach Stefano Stabellini
2012-03-27 13:59 ` [PATCH 1/6] libxl: libxl_device_disk_local_attach return a new libxl_device_disk Stefano Stabellini
2012-03-27 14:07   ` Ian Campbell
2012-03-30 10:42     ` Stefano Stabellini
2012-03-27 16:21   ` Ian Jackson
2012-03-30 10:43     ` Stefano Stabellini
2012-03-27 13:59 ` [PATCH 2/6] libxl: introduce libxl__device_generic_add_t Stefano Stabellini
2012-03-27 14:04   ` Ian Campbell
2012-03-30 10:44     ` Stefano Stabellini
2012-03-27 16:50   ` Ian Jackson
2012-03-30 10:46     ` Stefano Stabellini
2012-04-02 16:18       ` Ian Jackson
2012-04-03 12:03         ` Stefano Stabellini
2012-03-27 13:59 ` [PATCH 3/6] libxl: add an xs_transaction_t parameter to two libxl functions Stefano Stabellini
2012-03-27 14:17   ` Ian Campbell
2012-03-27 16:50   ` Ian Jackson
2012-03-27 13:59 ` [PATCH 4/6] libxl: introduce libxl__device_disk_add_t Stefano Stabellini
2012-03-27 13:59 ` [PATCH 5/6] libxl: introduce libxl__alloc_vdev Stefano Stabellini
2012-03-27 14:21   ` Ian Campbell
2012-03-27 17:21     ` Ian Jackson
2012-03-30 11:43     ` Stefano Stabellini
2012-03-30 12:14       ` Ian Campbell
2012-03-30 12:57         ` Stefano Stabellini
2012-03-27 17:19   ` Ian Jackson
2012-03-30 11:57     ` Stefano Stabellini
2012-03-30 14:17       ` Ian Jackson
2012-03-30 15:23         ` Stefano Stabellini
2012-04-02 16:15           ` Ian Jackson [this message]
2012-04-03 13:15             ` Stefano Stabellini
2012-04-03 13:17               ` Ian Jackson
2012-04-03 14:19                 ` Stefano Stabellini
2012-04-03 14:24                   ` Ian Jackson
2012-04-10 17:37                     ` Stefano Stabellini
2012-04-11 15:49                       ` Stefano Stabellini
2012-03-27 13:59 ` [PATCH 6/6] xl/libxl: implement QDISK libxl_device_disk_local_attach Stefano Stabellini
2012-03-27 17:20   ` Ian Jackson
2012-03-30 10:50     ` Stefano Stabellini
2012-03-30 13:47       ` Ian Jackson
2012-03-30 14:55         ` Stefano Stabellini

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=20345.53429.51575.373166@mariner.uk.xensource.com \
    --to=ian.jackson@eu.citrix.com \
    --cc=Ian.Campbell@citrix.com \
    --cc=stefano.stabellini@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.