diff mbox

[14/14] blockjob: Remove BlockJob.bs

Message ID 1462354765-14037-15-git-send-email-kwolf@redhat.com
State New, archived
Headers show

Commit Message

Kevin Wolf May 4, 2016, 9:39 a.m. UTC
There is a single remaining user in qemu-img, which can be trivially
converted to using BlockJob.blk instead.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
 blockjob.c               | 1 -
 include/block/blockjob.h | 1 -
 qemu-img.c               | 2 +-
 3 files changed, 1 insertion(+), 3 deletions(-)

Comments

Max Reitz May 13, 2016, 3:37 p.m. UTC | #1
On 04.05.2016 11:39, Kevin Wolf wrote:
> There is a single remaining user in qemu-img, which can be trivially
> converted to using BlockJob.blk instead.
> 
> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
> ---
>  blockjob.c               | 1 -
>  include/block/blockjob.h | 1 -
>  qemu-img.c               | 2 +-
>  3 files changed, 1 insertion(+), 3 deletions(-)

Reviewed-by: Max Reitz <mreitz@redhat.com>
diff mbox

Patch

diff --git a/blockjob.c b/blockjob.c
index 01b58c7..c0d8ee9 100644
--- a/blockjob.c
+++ b/blockjob.c
@@ -83,7 +83,6 @@  void *block_job_create(const BlockJobDriver *driver, BlockDriverState *bs,
 
     job->driver        = driver;
     job->id            = g_strdup(bdrv_get_device_name(bs));
-    job->bs            = bs;
     job->blk           = blk;
     job->cb            = cb;
     job->opaque        = opaque;
diff --git a/include/block/blockjob.h b/include/block/blockjob.h
index 32012af..86d2807 100644
--- a/include/block/blockjob.h
+++ b/include/block/blockjob.h
@@ -82,7 +82,6 @@  struct BlockJob {
     const BlockJobDriver *driver;
 
     /** The block device on which the job is operating.  */
-    BlockDriverState *bs; /* TODO Remove */
     BlockBackend *blk;
 
     /**
diff --git a/qemu-img.c b/qemu-img.c
index 46f2a6d..77148c2 100644
--- a/qemu-img.c
+++ b/qemu-img.c
@@ -775,7 +775,7 @@  static void common_block_job_cb(void *opaque, int ret)
 
 static void run_block_job(BlockJob *job, Error **errp)
 {
-    AioContext *aio_context = bdrv_get_aio_context(job->bs);
+    AioContext *aio_context = blk_get_aio_context(job->blk);
 
     do {
         aio_poll(aio_context, true);