]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemuProcessHandleBlockJob: Take status into account
authorMichal Privoznik <mprivozn@redhat.com>
Tue, 10 Feb 2015 15:24:45 +0000 (16:24 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Thu, 19 Feb 2015 13:12:38 +0000 (14:12 +0100)
commit76c61cdca20c106960af033e5d0f5da70177af0f
treefc0bc83cc4de7857d7bcdec9cb4e7c5cccda6e80
parentc37943a0687a8fdb08e6eda8ae4b9f4f43f4f2ed
qemuProcessHandleBlockJob: Take status into account

Upon BLOCK_JOB_COMPLETED event delivery, we check if the job has
completed (in qemuMonitorJSONHandleBlockJobImpl()). For better image,
the event looks something like this:

"timestamp": {"seconds": 1423582694, "microseconds": 372666}, "event":
"BLOCK_JOB_COMPLETED", "data": {"device": "drive-virtio-disk0", "len":
8412790784, "offset": 409993216, "speed": 8796093022207, "type":
"mirror", "error": "No space left on device"}}

If "len" does not equal "offset" it's considered an error, and we can
clearly see "error" field filled in. However, later in the event
processing this case was handled no differently to case of job being
aborted via separate API. It's time that we start differentiate these
two because of the future work.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
src/qemu/qemu_process.c