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] xm list d flag?

On Sat, Oct 01, 2005 at 08:47:16PM -0500, Anthony Liguori wrote:
> >I'd like to see @releaseDomain also pass along the domain id, so
> >that we don't need to scan all domains in several places.
> >
> This would be equally useful for @introduceDomain too.  It should 
> simplify the code in a number of places (at least in Xend and consoled).

Of course.

> Is changing the order of token and path really necessary?  It's a 
> considerably simplier change if we maintain the same order.  I've always 
> thought of the token as an argument so this order makes more sense to me 
> (and I reckon to Rusty since he did it this way to begin with :-)).

It's not absolutely necessary, but makes the code simpler sinceat least
within the kernel, we don't pass the token to the watch callback, only
the path and as pointed out in a footnote, you can then get the additional
arguments by adding strlen(path)+1 and so on.

It's odd that you would think of the token as an argument since it
will always be the same while the node which caused the watch to fire
is always different.

> The only adjustment to the userspace API would be that instead of 
> returning an char *[2] we would return a char *[] that was terminated by 
> a NULL.  xenbus needs a little more but it's not too bad.

Wasn't there a patch which got rid of that array?  Also, with a
variable number of paths, using an array will become quite complicated
since you won't know how big to allocate the array.

Also, I'd like to see something like XS_WATCH_TOKEN and XS_WATCH_PATH
as indexes into the array instead of sprinking 0/1 althrough the code,
whether we reverse the order or not...

    christian


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

<Prev in Thread] Current Thread [Next in Thread>