On Mon, Jan 30, 2012 at 15:56:11 -0700, Eric Blake wrote:
On 01/30/2012 09:00 AM, Jiri Denemark wrote:
> We already provide ways to detect when a domain has been paused as a
> result of I/O error, but there was no way of getting the exact error or
> even the device that experienced it. This new API may be used for both.
> ---
> daemon/remote.c | 40 ++++++++++++++++++++++++++++++++
> include/libvirt/libvirt.h.in | 32 +++++++++++++++++++++++++
> python/generator.py | 3 +-
> src/driver.h | 7 +++++
> src/libvirt.c | 52 ++++++++++++++++++++++++++++++++++++++++++
> src/libvirt_public.syms | 1 +
> src/remote/remote_driver.c | 34 +++++++++++++++++++++++++++
> src/remote/remote_protocol.x | 22 +++++++++++++++++-
> src/remote_protocol-structs | 16 +++++++++++++
> src/rpc/gendispatch.pl | 47 +++++++++++++++++++++++++++++++++++++
> 10 files changed, 252 insertions(+), 2 deletions(-)
This is big enough that I might have split it into public API (include,
python, src/{driver.h,libvirt.c,libvirt_public.syms}) and RPC
implementation (daemon, src/remote, src/rpc). But I'll go ahead and
review this, whether or not you split it.
I did so and addressed the other comments in v3.
...
> /*----- Protocol. -----*/
>
> @@ -2708,7 +2727,8 @@ enum remote_procedure {
> REMOTE_PROC_STORAGE_VOL_RESIZE = 260, /* autogen autogen */
>
> REMOTE_PROC_DOMAIN_PM_SUSPEND_FOR_DURATION = 261, /* autogen autogen */
> - REMOTE_PROC_DOMAIN_GET_CPU_STATS = 262 /* skipgen skipgen */
> + REMOTE_PROC_DOMAIN_GET_CPU_STATS = 262, /* skipgen skipgen */
> + REMOTE_PROC_DOMAIN_GET_DISK_ERRORS = 263 /* autogen autogen */
Nice that you figured out how to autogen the serialize/deserialize
calls.
Yeah, although I didn't try so hard after making this a multi-return call, so
v3 now uses skipgen skipgen :-)
We should probably do the same for a lot of the virTypedParameter
clients
someday
The generator already seems to know how to deal with virTypedParameter but
only for APIs with only one item in their *_ret structure.
Jirka