@@ -252,7 +252,7 @@ void block_job_pause(BlockJob *job)
job->pause_count++;
}
-bool block_job_is_paused(BlockJob *job)
+static bool block_job_should_pause(BlockJob *job)
{
return job->pause_count > 0;
}
@@ -361,7 +361,7 @@ void block_job_sleep_ns(BlockJob *job, QEMUClockType type, int64_t ns)
}
job->busy = false;
- if (block_job_is_paused(job)) {
+ if (block_job_should_pause(job)) {
qemu_coroutine_yield();
} else {
co_aio_sleep_ns(blk_get_aio_context(job->blk), type, ns);
@@ -348,15 +348,6 @@ void block_job_event_completed(BlockJob *job, const char *msg);
void block_job_event_ready(BlockJob *job);
/**
- * block_job_is_paused:
- * @job: The job being queried.
- *
- * Returns whether the job is currently paused, or will pause
- * as soon as it reaches a sleeping point.
- */
-bool block_job_is_paused(BlockJob *job);
-
-/**
* block_job_cancel_sync:
* @job: The job to be canceled.
*
The block_job_is_paused() function name is not great because callers only use it to determine whether pausing has been requested. Rename it to highlight those semantics and remove it from the public header file as there are no external callers. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> --- blockjob.c | 4 ++-- include/block/blockjob.h | 9 --------- 2 files changed, 2 insertions(+), 11 deletions(-)