|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] Xenstore watch interface in the kernel
Juergen Gross writes ("Xenstore watch interface in the kernel"):
> While working on the Linux xenbus kernel driver I stumbled over a rather
> strange interface: a Xenstore watch event is delivered via a callback
> defined as:
>
> void (*callback)(struct xenbus_watch *,
> const char **vec, unsigned int len);
>
> vec is an array of strings and len the number of strings in that
> array.
>
> Looking at the Xenstore interface I don't see how there could ever be
> an array with another len than 2 be presented (the first string being
> the modified path, the second the token specified when registering
> the watch).
Yes, this is an anomaly.
IIRC (from the last time I looked at this) a long time ago in a galaxy
far far away someone thought it might be a good idea to introduce some
kind of payload to watch events, so that watches could be explicitly
fired with a payload.
However, this wasn't in any deployed implementation.
> I'd like to modify the callback's prototype to:
>
> void (*callback)(struct xenbus_watch *,
> const char *path, const char *token);
I think this would be a fine idea.
> Is there any reason not to change the interface in the kernel?
No.
> BTW: The handling of more than 2 strings as watch event parameters is
> even repeated in the interface to libxenstore. I looked through the Xen
> sources and could find no use of the number of strings returned in case
> of a watch event. While we can't change the interface of libxenstore
> I don't think we have to be prepared for an arbitrary number of strings
> for a watch event at the kernel interface.
Yes.
Ian.
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |