Fam Zheng 751ebd76e6 blockjob: Allow nested pause
This patch changes block_job_pause to increase the pause counter and
block_job_resume to decrease it.

The counter will allow calling block_job_pause/block_job_resume
unconditionally on a job when we need to suspend the IO temporarily.

From now on, each block_job_resume must be paired with a block_job_pause
to keep the counter balanced.

The user pause from QMP or HMP will only trigger block_job_pause once
until it's resumed, this is achieved by adding a user_paused flag in
BlockJob.

One occurrence of block_job_resume in mirror_complete is replaced with
block_job_enter which does what is necessary.

In block_job_cancel, the cancel flag is good enough to instruct
coroutines to quit loop, so use block_job_enter to replace the unpaired
block_job_resume.

Upon block job IO error, user is notified about the entering to the
pause state, so this pause belongs to user pause, set the flag
accordingly and expect a matching QMP resume.

[Extended doc comments as suggested by Paolo Bonzini
<pbonzini@redhat.com>.
--Stefan]

Signed-off-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Alberto Garcia <berto@igalia.com>
Message-id: 1428069921-2957-2-git-send-email-famz@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2015-04-28 15:36:09 +02:00
2015-04-28 15:36:09 +02:00
2015-02-06 16:11:38 +00:00
2015-03-19 11:30:37 +03:00
2015-04-28 15:36:09 +02:00
2015-03-09 09:14:28 +00:00
2015-04-26 16:49:26 +01:00
2015-04-28 12:22:20 +01:00
2015-04-27 20:00:57 +01:00
2015-04-04 09:45:59 +03:00
2015-04-28 15:36:09 +02:00
2015-04-28 15:36:09 +02:00
2015-03-25 13:38:07 +01:00
2015-04-26 16:49:24 +01:00
2015-04-17 14:27:42 +01:00
2015-03-17 14:31:15 +01:00
2015-04-02 15:58:39 +02:00
2015-02-05 17:16:14 +01:00
2015-04-28 10:31:03 +01:00
2015-02-16 15:07:19 +00:00
2015-03-19 17:47:08 +00:00
2015-04-27 20:00:57 +01:00
2015-01-14 10:38:57 +01:00
2015-04-26 16:49:24 +01:00
2015-02-12 21:21:38 -08:00
2015-03-10 09:26:22 +01:00
2015-04-25 22:05:07 +01:00
2015-03-26 15:31:46 +01:00

Read the documentation in qemu-doc.html or on http://wiki.qemu-project.org

- QEMU team
Description
QEMU With E2K User Support
Readme 459 MiB
Languages
C 83.1%
C++ 6.3%
Python 3.2%
Dylan 2.8%
Shell 1.6%
Other 2.8%