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

Re: [Xen-devel] [PATCH] libxl: Make domain_shutdown fail if graceful not possible



Ian Campbell writes ("Re: [Xen-devel] [PATCH] libxl: Make domain_shutdown fail 
if graceful not possible"):
> Acked/Reviewd-by: Ian Campbell <ian.campbell@xxxxxxxxxx>

Thanks, I've applied it.

> Not related to this patch, other than I happened to notice it while
> reviewingm but the "req" paramter to libxl_domain_shutdown is pretty
> nasty. It can apparently taken a number from 0-4 inclusive, with no
> symbolic names, but which are translated per:
> 
> static char *req_table[] = {
>     [0] = "poweroff",
>     [1] = "reboot",
>     [2] = "suspend",
>     [3] = "crash",
>     [4] = "halt",
> };

Yuk.

> However only 0 and 1 are ever actually passed by xl and I'd wager that
> only 0, 1 and 4 are even vaguely valid in this context. suspend has it's
> own libxl function and iirc crash is something only a guest does...

Yes.

> I'm not sure what the distinction between poweroff and halt is (pvops
> Linux apparently treats them the same) but I'd suggest that having
> libxl_domain_shutdown => "poweroff" and libxl_domain_reboot => "reboot"
> with the existing function becoming a common internal backend makes
> sense.

Yes, but for 4.2 I think.

Ian.

_______________________________________________
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®.