qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2 14/45] block: introduce block job error


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH v2 14/45] block: introduce block job error
Date: Wed, 26 Sep 2012 13:10:26 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120911 Thunderbird/15.0.1

On 09/26/2012 09:56 AM, Paolo Bonzini wrote:
> The following behaviors are possible:
> 
> 'report': The behavior is the same as in 1.1.  An I/O error,
> respectively during a read or a write, will complete the job immediately
> with an error code.
> 
> 'ignore': An I/O error, respectively during a read or a write, will be
> ignored.  For streaming, the job will complete with an error and the
> backing file will be left in place.  For mirroring, the sector will be
> marked again as dirty and re-examined later.
> 
> 'stop': The job will be paused and the job iostatus will be set to
> failed or nospace, while the VM will keep running.  This can only be
> specified if the block device has rerror=stop and werror=stop or enospc.
> 
> 'enospc': Behaves as 'stop' for ENOSPC errors, 'report' for others.
> 

> +Emitted when a block job encounters an error.
> +
> +Data:
> +
> +- "device": device name (json-string)
> +- "operation": I/O operation (json-string, "read" or "write")

For symmetry with BLOCK_JOB_{CANCELLED,COMPLETED}, you also need:
- "type":     Job type ("stream" for image streaming, json-string)

Libvirt would like to key off of the 'type' field for all three events.
 Besides, if management issues several block commands in a row, and only
then starts processing the pending event queue, it would be nice to know
whether the error stemmed from a 'stream', 'mirror', or (when combined
with Jeff's patches) 'commit' job.


> +++ b/qapi-schema.json
> @@ -1127,11 +1127,14 @@
>  #
>  # @speed: the rate limit, bytes per second
>  #
> +# @io-status: the status of the job (since 1.2)

1.3

-- 
Eric Blake   address@hidden    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]