From: Stefan Hajnoczi <stefanha@redhat.com>
To: qemu-devel@nongnu.org
Cc: qemu-block@nongnu.org, Peter Maydell <peter.maydell@linaro.org>
Subject: [Qemu-devel] [PULL 1/8] blockjob: drop block_job_pause/resume_all()
Date: Sat, 12 May 2018 10:28:17 +0100 [thread overview]
Message-ID: <20180512092824.13848-2-stefanha@redhat.com> (raw)
In-Reply-To: <20180512092824.13848-1-stefanha@redhat.com>
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>
---
include/block/blockjob_int.h | 14 --------------
blockjob.c | 27 ---------------------------
2 files changed, 41 deletions(-)
diff --git a/include/block/blockjob_int.h b/include/block/blockjob_int.h
index 642adce68b..d5a515de9b 100644
--- a/include/block/blockjob_int.h
+++ b/include/block/blockjob_int.h
@@ -168,20 +168,6 @@ void block_job_sleep_ns(BlockJob *job, int64_t ns);
*/
void block_job_yield(BlockJob *job);
-/**
- * block_job_pause_all:
- *
- * Asynchronously pause all jobs.
- */
-void block_job_pause_all(void);
-
-/**
- * block_job_resume_all:
- *
- * Resume all block jobs. Must be paired with a preceding block_job_pause_all.
- */
-void block_job_resume_all(void);
-
/**
* block_job_early_fail:
* @bs: The block device.
diff --git a/blockjob.c b/blockjob.c
index 27f957e571..dfffad921a 100644
--- a/blockjob.c
+++ b/blockjob.c
@@ -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.
--
2.17.0
next prev parent reply other threads:[~2018-05-12 9:29 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-12 9:28 [Qemu-devel] [PULL 0/8] Block patches Stefan Hajnoczi
2018-05-12 9:28 ` Stefan Hajnoczi [this message]
2018-05-12 9:28 ` [Qemu-devel] [PULL 2/8] checkpatch: add a --strict check for utf-8 in commit logs Stefan Hajnoczi
2018-05-12 9:28 ` [Qemu-devel] [PULL 3/8] checkpatch: check utf-8 content from a commit log when it's missing from charset Stefan Hajnoczi
2018-05-12 9:28 ` [Qemu-devel] [PULL 4/8] checkpatch: ignore email headers better Stefan Hajnoczi
2018-05-12 9:28 ` [Qemu-devel] [PULL 5/8] checkpatch: emit a warning on file add/move/delete Stefan Hajnoczi
2018-05-17 15:27 ` Peter Maydell
2018-05-12 9:28 ` [Qemu-devel] [PULL 6/8] checkpatch: reduce MAINTAINERS update message frequency Stefan Hajnoczi
2018-05-12 9:28 ` [Qemu-devel] [PULL 7/8] block/file-posix: implement bdrv_co_invalidate_cache() on Linux Stefan Hajnoczi
2018-05-12 9:28 ` [Qemu-devel] [PULL 8/8] block/file-posix: add x-check-page-cache=on|off option Stefan Hajnoczi
2018-05-12 9:42 ` [Qemu-devel] [PULL 0/8] Block patches no-reply
2018-05-14 13:15 ` Peter Maydell
2018-05-14 16:02 ` Peter Maydell
2018-05-14 17:53 ` Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180512092824.13848-2-stefanha@redhat.com \
--to=stefanha@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).