[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] Add a --force option to detach operations

  • To: "Keir Fraser" <keir@xxxxxxxxxxxxx>
  • From: "Glauber de Oliveira Costa" <glommer@xxxxxxxxx>
  • Date: Thu, 14 Dec 2006 07:52:49 -0500
  • Cc: xen-devel@xxxxxxxxxxxxxxxxxxx, Glauber de Oliveira Costa <gcosta@xxxxxxxxxx>
  • Delivery-date: Thu, 14 Dec 2006 04:52:45 -0800
  • Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=G6B+nyDin+d3IwbINiGsCyMrvvfF1KykpRvyibW9yuPZBDtLXhD0v8RqiPY08d5pZNKJR54R9V03iNxGjRu3fa+K9KTn046ahzDZ/smwaTRoSno3LsN1HUHO0VmCjTak7tbV4hmnVOq6fLk88AaKE0K2dzfjXn/2N9k++Wr0D58=
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>

On 12/14/06, Keir Fraser <keir@xxxxxxxxxxxxx> wrote:
On 13/12/06 22:35, "Glauber de Oliveira Costa" <gcosta@xxxxxxxxxx> wrote:

> The following patch adds a --force option to detach operations. It
> avoids the device being held forever when frontend fails.

Looks good. I think --force should be more brutal (i.e., assume that we have
already politely requested the disconnection, if that's what we really

How can we be more brutal than that ? The only non-brutal thing I've put there
is denying disconnection when still in Connected state. But if for
some reason the frontend does not want to disconnect, then the tools
have no power over it. It can simply crash guest.

Example: attach a device, mount it at guest, and try to detach it
using --force. It should not force it, as it crashes the guest.
Apart from that, we should remember that if we need to use --force then it
probably indicates a problem in the frontend driver. If you can repro a
situation that requires --force then we should investigate that (and work
out a patch for blkfront).

Not exactly. The example I'm tracking is as follow:
* try attaching a file:///<valid_file> as sda, after modprobing
sd_mod at guest.
* guest is not able to allocate it a major, and fails like this:

Registering block device major 8
register_blkdev: cannot get major 8 for sd
xen_blk: can't get major 8 with name sd

Besides, there are many situations in which the underlying block layer
can fail (out of memory, and so on). And it does not necessarily means
a bug in the frontend device.

I do however agree that in the general case, it is a good indicator.

Glauber de Oliveira Costa.
"Free as in Freedom"

Add your comments to GPLv3 at:

Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.