On Thu, Jul 14, 2011 at 10:55 AM, Kevin Wolf <kw...@redhat.com> wrote: > Am 14.07.2011 11:39, schrieb Stefan Hajnoczi: >> Events: >> >> On completion the BLOCK_STREAM_COMPLETED event is raised with the following >> fields: >> >> - device: device name (json-string) >> - len: size of the device, in bytes (json-int) >> - offset: last offset of completed I/O, in bytes (json-int) >> - error: error message (json-string, only on error) >> >> The completion event is raised both on success and on failure. > > Why do len/offset matter in a completion event?
For completeness. You could see it as telling you how much progress was made before an error occurred. In the success case offset will always be equal to len. But in the error case you get the last completed progress before error, which could be useful (for example if you weren't polling but want to display "Streaming virtio-blk0 failed at 33%"). Stefan