On 05/09/2018 12:26 PM, Kevin Wolf wrote: > There is nothing block layer specific about block_job_sleep_ns(), so > move the function to Job. > > Signed-off-by: Kevin Wolf <kw...@redhat.com> > --- > include/block/blockjob_int.h | 11 ----------- > include/qemu/job.h | 17 +++++++++++++++++ > block/backup.c | 2 +- > block/commit.c | 2 +- > block/mirror.c | 4 ++-- > block/stream.c | 2 +- > blockjob.c | 27 --------------------------- > job.c | 32 ++++++++++++++++++++++++++++++++ > tests/test-bdrv-drain.c | 8 ++++---- > tests/test-blockjob-txn.c | 2 +- > tests/test-blockjob.c | 2 +- > 11 files changed, 60 insertions(+), 49 deletions(-) > > diff --git a/include/block/blockjob_int.h b/include/block/blockjob_int.h > index 0a614a89b8..8937f5b163 100644 > --- a/include/block/blockjob_int.h > +++ b/include/block/blockjob_int.h > @@ -134,17 +134,6 @@ void *block_job_create(const char *job_id, const > BlockJobDriver *driver, > void block_job_free(Job *job); > > /** > - * block_job_sleep_ns: > - * @job: The job that calls the function. > - * @ns: How many nanoseconds to stop for. > - * > - * Put the job to sleep (assuming that it wasn't canceled) for @ns > - * %QEMU_CLOCK_REALTIME nanoseconds. Canceling the job will immediately > - * interrupt the wait. > - */ > -void block_job_sleep_ns(BlockJob *job, int64_t ns); > - > -/** > * block_job_yield: > * @job: The job that calls the function. > * > diff --git a/include/qemu/job.h b/include/qemu/job.h > index 00c7cda9a3..ddfa824315 100644 > --- a/include/qemu/job.h > +++ b/include/qemu/job.h > @@ -168,6 +168,13 @@ void job_enter_cond(Job *job, bool(*fn)(Job *job)); > void job_start(Job *job); > > /** > + * @job: The job to enter. > + * > + * Continue the specified job by entering the coroutine. > + */ > +void job_enter(Job *job); > +
Is this a holdout from #18? Eh, either way. Reviewed-by: John Snow <js...@redhat.com>