All of lore.kernel.org
 help / color / mirror / Atom feed
From: George Dunlap <george.dunlap@eu.citrix.com>
To: Ian Campbell <Ian.Campbell@citrix.com>
Cc: "sstanisi@cbnco.com" <sstanisi@cbnco.com>,
	"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>,
	Ian Jackson <Ian.Jackson@eu.citrix.com>,
	Roger Pau Monne <roger.pau@citrix.com>
Subject: Re: [PATCH v5 1/2] libxl: Introduce functions to add and remove USB devices to an HVM guest
Date: Fri, 19 Apr 2013 12:00:03 +0100	[thread overview]
Message-ID: <517123B3.30108@eu.citrix.com> (raw)
In-Reply-To: <1366368646.19111.93.camel@zakaz.uk.xensource.com>

On 19/04/13 11:50, Ian Campbell wrote:
> On Fri, 2013-04-19 at 11:18 +0100, George Dunlap wrote:
>>
>> We could add an option that says "attempt to do the remove even if
>> you
>> don't see the device in xenstore" I suppose.  But I'm not really sure
>> how to document that in a useful way without basically describing the
>> internal mechanics of the command.
>>
>> There's nothing we can really do about usb-list though.
> You could write it to xenstore before attempting the qmp commands. That
> just relies on the qmp remove failing gracefully for devices which
> aren't actually attached.

qmp remove will just return an error if you attempt to remove a device 
id it doesn't know about.  I suppose that could work.  It's also a bit 
more robust against, say, the xenstore add failing for whatever reason.

> You might also be able to come up with some complicated, prepare, do it,
> commit in xenstore like approach -- but that's probably a) difficult (if
> not impossibly due to races) and b) unnecessary.

Well if the failure mode is the process executing the libxl function 
being killed at a random point, I don't think we can do a transaction 
thing -- it would have to coordinate between qmp and xenstore.  AFAIK 
qmp doesn't have any transaction support, so who is going to do the 
cleanup?  The process that was just killed?  If it could, it could just 
finish whatever it was doing anyway.

  -George

  reply	other threads:[~2013-04-19 11:00 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-18 14:46 [PATCH v5 1/2] libxl: Introduce functions to add and remove USB devices to an HVM guest George Dunlap
2013-04-18 14:46 ` [PATCH v5 2/2] xl: Add commands for usb hot-plug George Dunlap
2013-04-18 17:41   ` Ian Jackson
2013-04-19 10:02     ` George Dunlap
2013-04-18 17:51 ` [PATCH v5 1/2] libxl: Introduce functions to add and remove USB devices to an HVM guest Ian Jackson
2013-04-19 10:18   ` George Dunlap
2013-04-19 10:50     ` Ian Campbell
2013-04-19 11:00       ` George Dunlap [this message]
2013-04-19 14:14         ` George Dunlap
2013-04-19 10:53   ` George Dunlap

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=517123B3.30108@eu.citrix.com \
    --to=george.dunlap@eu.citrix.com \
    --cc=Ian.Campbell@citrix.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=roger.pau@citrix.com \
    --cc=sstanisi@cbnco.com \
    --cc=xen-devel@lists.xen.org \
    /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.