diff options
author | Stefan Hajnoczi <stefanha@redhat.com> | 2018-04-24 09:52:40 +0100 |
---|---|---|
committer | Stefan Hajnoczi <stefanha@redhat.com> | 2018-05-10 10:41:12 +0100 |
commit | 23d702d898bdd8e6772d83ea9789767ed589e17e (patch) | |
tree | ccbe72a8dd6fb990c9a1b8b95901818e56829ab6 /blockjob.c | |
parent | e5cd695266c5709308aa95b1baae499e4b5d4544 (diff) | |
download | qemu-23d702d898bdd8e6772d83ea9789767ed589e17e.zip qemu-23d702d898bdd8e6772d83ea9789767ed589e17e.tar.gz qemu-23d702d898bdd8e6772d83ea9789767ed589e17e.tar.bz2 |
blockjob: drop block_job_pause/resume_all()
Commit 8119334918e86f45877cfc139192d54f2449a239 ("block: Don't
block_job_pause_all() in bdrv_drain_all()") removed the only callers of
block_job_pause/resume_all().
Pausing and resuming now happens in child_job_drained_begin/end() so
it's no longer necessary to globally pause/resume jobs.
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: John Snow <jsnow@redhat.com>
Reviewed-by: Alberto Garcia <berto@igalia.com>
Message-id: 20180424085240.5798-1-stefanha@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'blockjob.c')
-rw-r--r-- | blockjob.c | 27 |
1 files changed, 0 insertions, 27 deletions
@@ -988,19 +988,6 @@ void *block_job_create(const char *job_id, const BlockJobDriver *driver, return job; } -void block_job_pause_all(void) -{ - BlockJob *job = NULL; - while ((job = block_job_next(job))) { - 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); - } -} - void block_job_early_fail(BlockJob *job) { assert(job->status == BLOCK_JOB_STATUS_CREATED); @@ -1078,20 +1065,6 @@ void coroutine_fn block_job_pause_point(BlockJob *job) } } -void block_job_resume_all(void) -{ - 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); - } -} - /* * Conditionally enter a block_job pending a call to fn() while * under the block_job_lock critical section. |