[libvirt] [PATCH 1/4] virDomainIOError public API and remote protocol

Federico Simoncelli fsimonce at redhat.com
Tue Jan 24 16:57:23 UTC 2012


----- Original Message -----
> From: "Jiri Denemark" <jdenemar at redhat.com>
> To: libvir-list at redhat.com
> Sent: Monday, January 23, 2012 2:30:54 PM
> Subject: [libvirt] [PATCH 1/4] virDomainIOError public API and remote	protocol
> 
> 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.
> ---
>  include/libvirt/libvirt.h.in |   19 +++++++++++++++
>  src/driver.h                 |    6 ++++
>  src/libvirt.c                |   53
>  ++++++++++++++++++++++++++++++++++++++++++
>  src/libvirt_public.syms      |    5 ++++
>  src/remote/remote_driver.c   |    1 +
>  src/remote/remote_protocol.x |   13 +++++++++-
>  src/remote_protocol-structs  |    9 +++++++
>  7 files changed, 105 insertions(+), 1 deletions(-)
> 
> diff --git a/include/libvirt/libvirt.h.in
> b/include/libvirt/libvirt.h.in
> index 958e5a6..2c3423a 100644
> --- a/include/libvirt/libvirt.h.in
> +++ b/include/libvirt/libvirt.h.in
> @@ -3746,6 +3746,25 @@ int virConnectSetKeepAlive(virConnectPtr conn,
>                             int interval,
>                             unsigned int count);
>  
> +/**
> + * virDomainIoError:
> + *
> + * Disk I/O error.
> + */
> +typedef enum {
> +    VIR_DOMAIN_IOERROR_NONE     = 0, /* no error */
> +    VIR_DOMAIN_IOERROR_NO_SPACE = 1, /* no space left on the device
> */
> +    VIR_DOMAIN_IOERROR_UNSPEC   = 2, /* unspecified I/O error */
> +
> +#ifdef VIR_ENUM_SENTINELS
> +    VIR_DOMAIN_IOERROR_LAST
> +#endif
> +} virDomainIoError;
> +
>

Hi Jiri, how do we detect an EIO error? We should need an additional
error type here?

-- 
Federico




More information about the libvir-list mailing list