diff options
Diffstat (limited to 'blockjob.c')
-rw-r--r-- | blockjob.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/blockjob.c b/blockjob.c index 9737a43b27..dea63f8c1f 100644 --- a/blockjob.c +++ b/blockjob.c @@ -161,3 +161,14 @@ void block_job_sleep_ns(BlockJob *job, QEMUClock *clock, int64_t ns) job->busy = true; } } + +BlockJobInfo *block_job_query(BlockJob *job) +{ + BlockJobInfo *info = g_new0(BlockJobInfo, 1); + info->type = g_strdup(job->job_type->job_type); + info->device = g_strdup(bdrv_get_device_name(job->bs)); + info->len = job->len; + info->offset = job->offset; + info->speed = job->speed; + return info; +} |