aboutsummaryrefslogtreecommitdiff
path: root/blockjob.c
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2018-01-19 15:54:40 +0100
committerKevin Wolf <kwolf@redhat.com>2018-05-15 16:11:50 +0200
commitbd21935b50d100d8da8c05cd3c2009f0f3432cb4 (patch)
treea72b8ecf4fc95088942038d0e9da20fa78093e2b /blockjob.c
parentdee81d5111ff0e24ac63ab0dbbd19e84c2f87904 (diff)
downloadqemu-bd21935b50d100d8da8c05cd3c2009f0f3432cb4.zip
qemu-bd21935b50d100d8da8c05cd3c2009f0f3432cb4.tar.gz
qemu-bd21935b50d100d8da8c05cd3c2009f0f3432cb4.tar.bz2
blockjob: Add block_job_driver()
The backup block job directly accesses the driver field in BlockJob. Add a wrapper for getting it. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Reviewed-by: John Snow <jsnow@redhat.com>
Diffstat (limited to 'blockjob.c')
-rw-r--r--blockjob.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/blockjob.c b/blockjob.c
index 04416f1..36c5fde 100644
--- a/blockjob.c
+++ b/blockjob.c
@@ -359,6 +359,11 @@ static bool block_job_started(BlockJob *job)
return job->co;
}
+const BlockJobDriver *block_job_driver(BlockJob *job)
+{
+ return job->driver;
+}
+
/**
* All jobs must allow a pause point before entering their job proper. This
* ensures that jobs can be paused prior to being started, then resumed later.