aboutsummaryrefslogtreecommitdiff
path: root/blockdev.c
diff options
context:
space:
mode:
authorVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>2021-05-06 17:13:53 +0300
committerVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>2021-12-28 15:18:23 +0100
commitdf9a31650505278e72c6b453f1679f66eac6e633 (patch)
tree990cb96314cda5eeac7f3a8b783d0ac3d8a4a4c8 /blockdev.c
parent252f40913a87e1e89539a08b57e1740b3482906d (diff)
blockjob: implement and use block_job_get_aio_context
We are going to drop BlockJob.blk. So let's retrieve block job context from underlying job instead of main node. Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Reviewed-by: Nikita Lapshin <nikita.lapshin@virtuozzo.com>
Diffstat (limited to 'blockdev.c')
-rw-r--r--blockdev.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/blockdev.c b/blockdev.c
index 0eb2823b1b..b5ff9b854e 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -3315,7 +3315,7 @@ static BlockJob *find_block_job(const char *id, AioContext **aio_context,
return NULL;
}
- *aio_context = blk_get_aio_context(job->blk);
+ *aio_context = block_job_get_aio_context(job);
aio_context_acquire(*aio_context);
return job;
@@ -3420,7 +3420,7 @@ void qmp_block_job_finalize(const char *id, Error **errp)
* automatically acquires the new one), so make sure we release the correct
* one.
*/
- aio_context = blk_get_aio_context(job->blk);
+ aio_context = block_job_get_aio_context(job);
job_unref(&job->job);
aio_context_release(aio_context);
}
@@ -3711,7 +3711,7 @@ BlockJobInfoList *qmp_query_block_jobs(Error **errp)
if (block_job_is_internal(job)) {
continue;
}
- aio_context = blk_get_aio_context(job->blk);
+ aio_context = block_job_get_aio_context(job);
aio_context_acquire(aio_context);
value = block_job_query(job, errp);
aio_context_release(aio_context);