WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH 6 of 6] libxl: use hotplug-status to synchronize

To: Ian Campbell <Ian.Campbell@xxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH 6 of 6] libxl: use hotplug-status to synchronize the destruction of block devices
From: Roger Pau Monné <roger.pau@xxxxxxxxxxxxx>
Date: Fri, 23 Sep 2011 10:08:16 +0200
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Fri, 23 Sep 2011 01:09:31 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=IfE0nnkHXCwD6d7U0Xvaaocm7owMS23O6klNwdeNr+I=; b=qb2GxawPbWETvDDiYXOXeJ7ZSlP/SN9blxiU05UouvcYfJvtUvnQCLAcC5i21BKeBI I7O8ovR//MciBfsOIqngJYkmamV4TS/Ouz0AuTgkN5QDnt43u/rV7msdNW8xU29glDGF lOpmfgvBYX+M9AETaF27FyY/LoIe2QCpn3Luw=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1316699095.23371.76.camel@xxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <patchbomb.1316692867@loki> <9e9c68768676b0e1c9c7.1316692873@loki> <1316699095.23371.76.camel@xxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
> I wonder if we can remove the hard coding of the VBD special case
> somehow? For example an ops struct in an array mapping DEVICE_* to
>        int (*watch_for_disconnect)(relevant arguments)
>        int (*has_disconnected)(relevant arguments)
> which would have two implementations, one checking state and the other
> hotplug-status.

This would certainly make the code much cleaner and easy to understand.

> That leaves the change in wait_for_dev_destroy which unfortunately
> doesn't have the context to do much else than what you've done. Perhaps
> that's ok as is until I can finish of the patch series I have which
> fixes that aspect. I suppose a function pointer could be encoded in the
> XS_WATCH_TOKEN and sscanf'd back out again...

This patch it's the best way I came up with to fix the issue without
modifying the structure of the code much. If you have any other ideas,
I'm glad to try to implement them. Anyway, I will try to implement
something similar to what you exposed above and post a patch.

Regards, Roger.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel