|
|
ae23c9 |
From 322f7ce7a3bdad03b0185cbf6d16f29bb8685029 Mon Sep 17 00:00:00 2001
|
|
|
ae23c9 |
From: Kevin Wolf <kwolf@redhat.com>
|
|
|
ae23c9 |
Date: Tue, 26 Jun 2018 09:47:49 +0200
|
|
|
ae23c9 |
Subject: [PATCH 081/268] blockjob: drop block_job_pause/resume_all()
|
|
|
ae23c9 |
|
|
|
ae23c9 |
RH-Author: Kevin Wolf <kwolf@redhat.com>
|
|
|
ae23c9 |
Message-id: <20180626094856.6924-7-kwolf@redhat.com>
|
|
|
ae23c9 |
Patchwork-id: 81068
|
|
|
ae23c9 |
O-Subject: [RHV-7.6 qemu-kvm-rhev PATCH v2 06/73] blockjob: drop block_job_pause/resume_all()
|
|
|
ae23c9 |
Bugzilla: 1513543
|
|
|
ae23c9 |
RH-Acked-by: Jeffrey Cody <jcody@redhat.com>
|
|
|
ae23c9 |
RH-Acked-by: Max Reitz <mreitz@redhat.com>
|
|
|
ae23c9 |
RH-Acked-by: Fam Zheng <famz@redhat.com>
|
|
|
ae23c9 |
|
|
|
ae23c9 |
From: Stefan Hajnoczi <stefanha@redhat.com>
|
|
|
ae23c9 |
|
|
|
ae23c9 |
Commit 8119334918e86f45877cfc139192d54f2449a239 ("block: Don't
|
|
|
ae23c9 |
block_job_pause_all() in bdrv_drain_all()") removed the only callers of
|
|
|
ae23c9 |
block_job_pause/resume_all().
|
|
|
ae23c9 |
|
|
|
ae23c9 |
Pausing and resuming now happens in child_job_drained_begin/end() so
|
|
|
ae23c9 |
it's no longer necessary to globally pause/resume jobs.
|
|
|
ae23c9 |
|
|
|
ae23c9 |
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
|
|
|
ae23c9 |
Reviewed-by: John Snow <jsnow@redhat.com>
|
|
|
ae23c9 |
Reviewed-by: Alberto Garcia <berto@igalia.com>
|
|
|
ae23c9 |
Message-id: 20180424085240.5798-1-stefanha@redhat.com
|
|
|
ae23c9 |
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
|
|
|
ae23c9 |
(cherry picked from commit 23d702d898bdd8e6772d83ea9789767ed589e17e)
|
|
|
ae23c9 |
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
|
|
|
ae23c9 |
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
ae23c9 |
---
|
|
|
ae23c9 |
blockjob.c | 27 ---------------------------
|
|
|
ae23c9 |
include/block/blockjob_int.h | 14 --------------
|
|
|
ae23c9 |
2 files changed, 41 deletions(-)
|
|
|
ae23c9 |
|
|
|
ae23c9 |
diff --git a/blockjob.c b/blockjob.c
|
|
|
ae23c9 |
index 7064389..b39d0f8 100644
|
|
|
ae23c9 |
--- a/blockjob.c
|
|
|
ae23c9 |
+++ b/blockjob.c
|
|
|
ae23c9 |
@@ -996,19 +996,6 @@ void *block_job_create(const char *job_id, const BlockJobDriver *driver,
|
|
|
ae23c9 |
return job;
|
|
|
ae23c9 |
}
|
|
|
ae23c9 |
|
|
|
ae23c9 |
-void block_job_pause_all(void)
|
|
|
ae23c9 |
-{
|
|
|
ae23c9 |
- BlockJob *job = NULL;
|
|
|
ae23c9 |
- while ((job = block_job_next(job))) {
|
|
|
ae23c9 |
- AioContext *aio_context = blk_get_aio_context(job->blk);
|
|
|
ae23c9 |
-
|
|
|
ae23c9 |
- aio_context_acquire(aio_context);
|
|
|
ae23c9 |
- block_job_ref(job);
|
|
|
ae23c9 |
- block_job_pause(job);
|
|
|
ae23c9 |
- aio_context_release(aio_context);
|
|
|
ae23c9 |
- }
|
|
|
ae23c9 |
-}
|
|
|
ae23c9 |
-
|
|
|
ae23c9 |
void block_job_early_fail(BlockJob *job)
|
|
|
ae23c9 |
{
|
|
|
ae23c9 |
assert(job->status == BLOCK_JOB_STATUS_CREATED);
|
|
|
ae23c9 |
@@ -1086,20 +1073,6 @@ void coroutine_fn block_job_pause_point(BlockJob *job)
|
|
|
ae23c9 |
}
|
|
|
ae23c9 |
}
|
|
|
ae23c9 |
|
|
|
ae23c9 |
-void block_job_resume_all(void)
|
|
|
ae23c9 |
-{
|
|
|
ae23c9 |
- BlockJob *job, *next;
|
|
|
ae23c9 |
-
|
|
|
ae23c9 |
- QLIST_FOREACH_SAFE(job, &block_jobs, job_list, next) {
|
|
|
ae23c9 |
- AioContext *aio_context = blk_get_aio_context(job->blk);
|
|
|
ae23c9 |
-
|
|
|
ae23c9 |
- aio_context_acquire(aio_context);
|
|
|
ae23c9 |
- block_job_resume(job);
|
|
|
ae23c9 |
- block_job_unref(job);
|
|
|
ae23c9 |
- aio_context_release(aio_context);
|
|
|
ae23c9 |
- }
|
|
|
ae23c9 |
-}
|
|
|
ae23c9 |
-
|
|
|
ae23c9 |
/*
|
|
|
ae23c9 |
* Conditionally enter a block_job pending a call to fn() while
|
|
|
ae23c9 |
* under the block_job_lock critical section.
|
|
|
ae23c9 |
diff --git a/include/block/blockjob_int.h b/include/block/blockjob_int.h
|
|
|
ae23c9 |
index 642adce..d5a515d 100644
|
|
|
ae23c9 |
--- a/include/block/blockjob_int.h
|
|
|
ae23c9 |
+++ b/include/block/blockjob_int.h
|
|
|
ae23c9 |
@@ -169,20 +169,6 @@ void block_job_sleep_ns(BlockJob *job, int64_t ns);
|
|
|
ae23c9 |
void block_job_yield(BlockJob *job);
|
|
|
ae23c9 |
|
|
|
ae23c9 |
/**
|
|
|
ae23c9 |
- * block_job_pause_all:
|
|
|
ae23c9 |
- *
|
|
|
ae23c9 |
- * Asynchronously pause all jobs.
|
|
|
ae23c9 |
- */
|
|
|
ae23c9 |
-void block_job_pause_all(void);
|
|
|
ae23c9 |
-
|
|
|
ae23c9 |
-/**
|
|
|
ae23c9 |
- * block_job_resume_all:
|
|
|
ae23c9 |
- *
|
|
|
ae23c9 |
- * Resume all block jobs. Must be paired with a preceding block_job_pause_all.
|
|
|
ae23c9 |
- */
|
|
|
ae23c9 |
-void block_job_resume_all(void);
|
|
|
ae23c9 |
-
|
|
|
ae23c9 |
-/**
|
|
|
ae23c9 |
* block_job_early_fail:
|
|
|
ae23c9 |
* @bs: The block device.
|
|
|
ae23c9 |
*
|
|
|
ae23c9 |
--
|
|
|
ae23c9 |
1.8.3.1
|
|
|
ae23c9 |
|