diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2017-12-04 17:19:04 +0000 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2017-12-04 17:19:04 +0000 |
commit | 2a4c7e839101a52f7bf9ba4dd64e466518565352 (patch) | |
tree | af320e36bd9bcaccf85fe6ff0149524674093fdd | |
parent | e80a25611c67a93947ae99f4057b850410a54497 (diff) | |
parent | 3d5d319e1221082974711af1d09d82f0755c1698 (diff) | |
download | qemu-2a4c7e839101a52f7bf9ba4dd64e466518565352.zip qemu-2a4c7e839101a52f7bf9ba4dd64e466518565352.tar.gz qemu-2a4c7e839101a52f7bf9ba4dd64e466518565352.tar.bz2 |
Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging
Block layer patches for 2.11.0-rc4
# gpg: Signature made Mon 04 Dec 2017 16:46:07 GMT
# gpg: using RSA key 0x7F09B272C88F2FD6
# gpg: Good signature from "Kevin Wolf <kwolf@redhat.com>"
# Primary key fingerprint: DC3D EB15 9A9A F95D 3D74 56FE 7F09 B272 C88F 2FD6
* remotes/kevin/tags/for-upstream:
blockjob: Make block_job_pause_all() keep a reference to the jobs
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-rw-r--r-- | blockjob.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -730,6 +730,7 @@ void block_job_pause_all(void) AioContext *aio_context = blk_get_aio_context(job->blk); aio_context_acquire(aio_context); + block_job_ref(job); block_job_pause(job); aio_context_release(aio_context); } @@ -808,12 +809,14 @@ void coroutine_fn block_job_pause_point(BlockJob *job) void block_job_resume_all(void) { - BlockJob *job = NULL; - while ((job = block_job_next(job))) { + BlockJob *job, *next; + + QLIST_FOREACH_SAFE(job, &block_jobs, job_list, next) { AioContext *aio_context = blk_get_aio_context(job->blk); aio_context_acquire(aio_context); block_job_resume(job); + block_job_unref(job); aio_context_release(aio_context); } } |