On Tue, Jan 24, 2012 at 11:57:23 -0500, Federico Simoncelli wrote:
> +/**
> + * 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?
We could certainly add more error codes but doing so only makes sense when
there is a hypervisor that can report them. Current qemu has three io-status
values: ok, nospace, failed and these values are mapped to
VIR_DOMAIN_IOERROR_NONE, VIR_DOMAIN_IOERROR_NO_SPACE, and
VIR_DOMAIN_IOERROR_UNSPEC. I believe that EIO would be reported as "failed" by
qemu and thus VIR_DOMAIN_IOERROR_UNSPEC by libvirt. It's possible that
VIR_DOMAIN_IOERROR_UNSPEC is not the best name, though :-)
Jirka