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

Re: [Xen-devel] [PATCH 6 of 9 v2] libxl: execute hotplug scripts directly from libxl



2011/11/24 Ian Campbell <Ian.Campbell@xxxxxxxxxx>:
> I was just looking at this again because someone was talking about
> hotplug issues on Linux and something new occurred to me.
>
> On Fri, 2011-11-18 at 11:59 +0000, Roger Pau Monne wrote:
>> [...]
>> +++ b/tools/libxl/hotplug_linux.c    Fri Sep 30 14:38:55 2011 +0200
>> [...]
>> +int libxl_disk_hotplug(libxl__gc *gc, libxl__device *dev)
>> [...]
>> +int libxl_nic_hotplug_connect(libxl__gc *gc, libxl__device *dev)
>> [...]
>> +++ b/tools/libxl/hotplug_netbsd.c   ÂFri Sep 30 14:38:55 2011 +0200
>> [...]
>> +int libxl__disk_hotplug(libxl__gc *gc, libxl__device *dev)
>> [...]
>> +int libxl__nic_hotplug(libxl__gc *gc, libxl__device *dev)
>
> Although Linux doesn't do hotplug this way now I think it will/should in
> the future and the code will look very much like the netbsd one. So I
> think that the code which actually handles calling the script should
> probably be a generic function, only the selector on whether to do so
> needs to be platform specific.

Sorry for the delay, I've been ill most of this week. From what I saw,
the problem is that NetBSD and Linux hotplug scripts have different
parameters, that's why I've split the calling functions into two
different files, and made them OS-dependent. I think I said that
before, but I would be good to agree on the calling parameters passed
to hotplug scripts. Currently NetBSD has the following parameters:

 * block: <backend path> <status> <type>
          where <type> can be "file" or "phy"

 * vif-bridge: <backend path> <status>

 * vif-ip: <backend path> <status>

Also Linux hotplug scripts need a good clean up, hard tabs and spaces
are all mixed, and makes the code really hard to understand.

Regards, Roger.

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

 


Rackspace

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